Blame SOURCES/hvd-tools-hv-change-http-to-https-in-hv_kvp_daemon.c.patch

a1799d
From e956573e4fd5e489fd68a7d46f0aa715ee19084e Mon Sep 17 00:00:00 2001
a1799d
From: Mohammed Gamal <mgamal@redhat.com>
a1799d
Date: Wed, 25 Nov 2020 15:23:29 +0100
a1799d
Subject: [PATCH] tools: hv: change http to https in hv_kvp_daemon.c
a1799d
a1799d
RH-Author: Mohammed Gamal Morsy (mmorsy)
a1799d
RH-MergeRequest: 1: RHEL 8.4.0 updates
a1799d
RH-Commit: [1/1] b7202f11 (mmorsy/hyperv-daemons)
a1799d
RH-Bugzilla: 1886104
a1799d
a1799d
The patch has no functional change. Only changes the URL pointed to
a1799d
in one of the comments
a1799d
a1799d
commit fa52a4b2d0ab416508538bb47a95167d4c94caac
a1799d
Author: Alexander A. Klimov <grandmaster@al2klimov.de>
a1799d
Date:   Sun Jul 5 23:44:57 2020 +0200
a1799d
a1799d
    tools: hv: change http to https in hv_kvp_daemon.c
a1799d
a1799d
    Rationale:
a1799d
    Reduces attack surface on kernel devs opening the links for MITM
a1799d
    as HTTPS traffic is much harder to manipulate.
a1799d
a1799d
    Deterministic algorithm:
a1799d
    For each file:
a1799d
      If not .svg:
a1799d
        For each line:
a1799d
          If doesn't contain `\bxmlns\b`:
a1799d
            For each link, `\bhttp://[^# \t\r\n]*(?:\w|/)`:
a1799d
              If both the HTTP and HTTPS versions
a1799d
              return 200 OK and serve the same content:
a1799d
                Replace HTTP with HTTPS.
a1799d
a1799d
    Signed-off-by: Alexander A. Klimov <grandmaster@al2klimov.de>
a1799d
    Link: https://lore.kernel.org/r/20200705214457.28433-1-grandmaster@al2klimov.de
a1799d
    [ wei: change subject line to be more specific ]
a1799d
    Signed-off-by: Wei Liu <wei.liu@kernel.org>
a1799d
a1799d
Signed-off-by: Mohammed Gamal <mgamal@redhat.com>
a1799d
---
a1799d
 hv_kvp_daemon.c | 2 +-
a1799d
 1 file changed, 1 insertion(+), 1 deletion(-)
a1799d
a1799d
diff --git a/hv_kvp_daemon.c b/hv_kvp_daemon.c
a1799d
index ee9c1bb..1e6fd6c 100644
a1799d
--- a/hv_kvp_daemon.c
a1799d
+++ b/hv_kvp_daemon.c
a1799d
@@ -437,7 +437,7 @@ void kvp_get_os_info(void)
a1799d
 
a1799d
 	/*
a1799d
 	 * Parse the /etc/os-release file if present:
a1799d
-	 * http://www.freedesktop.org/software/systemd/man/os-release.html
a1799d
+	 * https://www.freedesktop.org/software/systemd/man/os-release.html
a1799d
 	 */
a1799d
 	file = fopen("/etc/os-release", "r");
a1799d
 	if (file != NULL) {
a1799d
-- 
a1799d
2.18.4
a1799d