Blame SOURCES/0104-rhtsupport-never-use-uReport-URL-from-ureport.config.patch

28bab8
From 218ae6bbc9ecd1538bfde2c8033cd1ff82a53bbe Mon Sep 17 00:00:00 2001
28bab8
From: Jakub Filak <jfilak@redhat.com>
28bab8
Date: Wed, 22 Oct 2014 10:21:07 +0200
28bab8
Subject: [LIBREPORT PATCH 104/105] rhtsupport: never use uReport URL from
28bab8
 ureport.config
28bab8
28bab8
The GUI reporter always export uReport_URL, thus reporter-rhtsupport
28bab8
never use the Strata URL.
28bab8
28bab8
Moreover, usage of uReport_URL is really bad idea, because a reporter
28bab8
thinks he is going to send data to the portal but the ureport might end
28bab8
somewhere else.
28bab8
28bab8
Related #1139987
28bab8
28bab8
Signed-off-by: Jakub Filak <jfilak@redhat.com>
28bab8
---
28bab8
 src/plugins/reporter-rhtsupport.c | 24 ++++++++++++------------
28bab8
 1 file changed, 12 insertions(+), 12 deletions(-)
28bab8
28bab8
diff --git a/src/plugins/reporter-rhtsupport.c b/src/plugins/reporter-rhtsupport.c
28bab8
index e1c73d0..4b74c5c 100644
28bab8
--- a/src/plugins/reporter-rhtsupport.c
28bab8
+++ b/src/plugins/reporter-rhtsupport.c
28bab8
@@ -383,18 +383,18 @@ void prepare_ureport_configuration(const char *urcfile,
28bab8
     load_conf_file(urcfile, settings, false);
28bab8
     ureport_server_config_init(urconf);
28bab8
 
28bab8
-    char *url = NULL;
28bab8
-    UREPORT_OPTION_VALUE_FROM_CONF(settings, "URL", url, xstrdup);
28bab8
-    if (url == NULL)
28bab8
-    {
28bab8
-        ureport_server_config_set_url(urconf, concat_path_file(portal_url, "/telemetry/abrt"));
28bab8
-        urconf->ur_ssl_verify = ssl_verify;
28bab8
-    }
28bab8
-    else
28bab8
-    {
28bab8
-        UREPORT_OPTION_VALUE_FROM_CONF(settings, "SSLVerify", urconf->ur_ssl_verify, string_to_bool);
28bab8
-        ureport_server_config_set_url(urconf, url);
28bab8
-    }
28bab8
+    /* The following lines cause that we always use URL from ureport's
28bab8
+     * configuration becuase the GUI reporter always exports uReport_URL env
28bab8
+     * var.
28bab8
+     *
28bab8
+     *   char *url = NULL;
28bab8
+     *   UREPORT_OPTION_VALUE_FROM_CONF(settings, "URL", url, xstrdup);
28bab8
+     *   if (url != NULL)
28bab8
+     *       ureport_server_config_set_url(urconf, url);
28bab8
+     */
28bab8
+
28bab8
+    ureport_server_config_set_url(urconf, concat_path_file(portal_url, "/telemetry/abrt"));
28bab8
+    urconf->ur_ssl_verify = ssl_verify;
28bab8
 
28bab8
     ureport_server_config_set_basic_auth(urconf, login, password);
28bab8
 
28bab8
-- 
28bab8
1.8.3.1
28bab8