Blame SOURCES/0123-abrt-auto-reporting-require-rhtsupport.conf-file-onl.patch

baab13
From 42c35440205e0174af21315277dedac76fb9c8ae Mon Sep 17 00:00:00 2001
baab13
From: Matej Habrnal <mhabrnal@redhat.com>
baab13
Date: Fri, 24 Apr 2015 15:37:15 +0200
baab13
Subject: [PATCH] abrt-auto-reporting: require rhtsupport.conf file only on
baab13
 RHEL
baab13
baab13
abrt-auto-reporting required the rhtsupport.conf on Fedora and CentOS but the conf
baab13
file do not exists in those systems.
baab13
baab13
Resolves abrt/abrt#957
baab13
baab13
Signed-off-by: Matej Habrnal <mhabrnal@redhat.com>
baab13
---
baab13
 configure.ac                                |  11 +++
baab13
 doc/Makefile.am                             |  13 +++-
baab13
 doc/abrt-auto-reporting-authenticated.txt   | 106 ++++++++++++++++++++++++++++
baab13
 doc/abrt-auto-reporting-unauthenticated.txt |  71 +++++++++++++++++++
baab13
 doc/abrt-auto-reporting.txt                 | 106 ----------------------------
baab13
 src/daemon/abrt-auto-reporting.c            |  71 ++++++++++++++-----
baab13
 6 files changed, 254 insertions(+), 124 deletions(-)
baab13
 create mode 100644 doc/abrt-auto-reporting-authenticated.txt
baab13
 create mode 100644 doc/abrt-auto-reporting-unauthenticated.txt
baab13
 delete mode 100644 doc/abrt-auto-reporting.txt
baab13
baab13
diff --git a/configure.ac b/configure.ac
baab13
index d95fc4a..d65bf54 100644
baab13
--- a/configure.ac
baab13
+++ b/configure.ac
baab13
@@ -207,6 +207,17 @@ AC_ARG_ENABLE(suggest-autoreporting,
baab13
 
baab13
 AM_CONDITIONAL(SUGGEST_AUTOREPORTING, test "$enable_suggest_autoreporting" = "yes")
baab13
 
baab13
+# Authenticated autoreporting
baab13
+
baab13
+AC_ARG_ENABLE(authenticated-autoreporting,
baab13
+    AS_HELP_STRING([--enable-authenticated-autoreporting],
baab13
+    [enable authenticated autoreporting]),
baab13
+    [enable_authenticated_autoreporting=$enableval],
baab13
+    [enable_authenticated_autoreporting=no]
baab13
+)
baab13
+
baab13
+AM_CONDITIONAL(AUTHENTICATED_AUTOREPORTING, test "$enable_authenticated_autoreporting" = "yes")
baab13
+
baab13
 # Make satyr use GDB or elfutils/libunwind for unwinding?
baab13
 
baab13
 AC_ARG_ENABLE([native-unwinder],
baab13
diff --git a/doc/Makefile.am b/doc/Makefile.am
baab13
index 0480114..309a330 100644
baab13
--- a/doc/Makefile.am
baab13
+++ b/doc/Makefile.am
baab13
@@ -71,6 +71,17 @@ man1_MANS = ${MAN1_TXT:%.txt=%.1}
baab13
 man5_MANS = ${MAN5_TXT:%.txt=%.5} ${MAN5_PREFORMATTED}
baab13
 man8_MANS = ${MAN8_TXT:%.txt=%.8}
baab13
 
baab13
+MAN_SOURCE =
baab13
+MAN_SOURCE = abrt-auto-reporting-authenticated.txt
baab13
+MAN_SOURCE = abrt-auto-reporting-unauthenticated.txt
baab13
+
baab13
+if AUTHENTICATED_AUTOREPORTING
baab13
+abrt-auto-reporting.txt: abrt-auto-reporting-authenticated.txt
baab13
+else
baab13
+abrt-auto-reporting.txt: abrt-auto-reporting-unauthenticated.txt
baab13
+endif
baab13
+	cp $< $@
baab13
+
baab13
 %.1 %.5 %.8: %.xml
baab13
 	$(XMLTO_SILENT) xmlto man $< 2>&1 | sed '/Note/d'
baab13
 
baab13
@@ -79,6 +90,6 @@ man8_MANS = ${MAN8_TXT:%.txt=%.8}
baab13
                            --conf-file ../asciidoc.conf \
baab13
                            -aabrt_version=$(PACKAGE_VERSION) -o $@ $<
baab13
 
baab13
-EXTRA_DIST = $(MAN1_TXT) $(MAN5_TXT) $(MAN8_TXT) $(MAN5_PREFORMATTED)
baab13
+EXTRA_DIST = $(MAN1_TXT) $(MAN5_TXT) $(MAN8_TXT) $(MAN5_PREFORMATTED) $(MAN_SOURCE)
baab13
 
baab13
 CLEANFILES = ${MAN1_TXT:%.txt=%.1} ${MAN5_TXT:%.txt=%.5} ${MAN8_TXT:%.txt=%.8}
baab13
diff --git a/doc/abrt-auto-reporting-authenticated.txt b/doc/abrt-auto-reporting-authenticated.txt
baab13
new file mode 100644
baab13
index 0000000..2a27945
baab13
--- /dev/null
baab13
+++ b/doc/abrt-auto-reporting-authenticated.txt
baab13
@@ -0,0 +1,106 @@
baab13
+abrt-auto-reporting(1)
baab13
+======================
baab13
+
baab13
+NAME
baab13
+----
baab13
+abrt-auto-reporting - Get or modify the auto reporting option values
baab13
+
baab13
+SYNOPSIS
baab13
+--------
baab13
+'abrt-auto-reporting' [-v] [ enabled | yes | 1 | on | disabled | no | 0 | off ]
baab13
+                      [ [--anonymous] |
baab13
+                        [--username USERNAME [--password PASSWORD] ] |
baab13
+                        [--certificate SOURCE] ]
baab13
+
baab13
+DESCRIPTION
baab13
+-----------
baab13
+Reads the configuration from abrt.conf and saves the changes to the same file.
baab13
+
baab13
+The changes will take effect immediately without necessity to restart any ABRT
baab13
+process and will be persistent.
baab13
+
baab13
+'disabled'::
baab13
+   User have to report the detect problems manually
baab13
+
baab13
+'enabled'::
baab13
+   ABRT uploads an uReport which was generated for a detected problem
baab13
+   immediately after the detection phase.
baab13
+
baab13
+Reads and saves the authentication configuration options in
baab13
+/etc/libreport/plugins/ureport.conf and /etc/libreport/plugins/rhtsupport.conf
baab13
+
baab13
+uReport description
baab13
+~~~~~~~~~~~~~~~~~~~
baab13
+ABRT supports uReports for four types of crashes: crashes of C/C++ programs
baab13
+that result in a core dump, uncaught Python exceptions, uncaught Java
baab13
+exceptions and kernel oopses.
baab13
+
baab13
+Each uReport generally contains a stack trace, or multiple stack traces in the
baab13
+case of multi-threaded C/C++ and Java programs. The stack trace only describes
baab13
+the call stack of the program at the time of the crash and does not contain
baab13
+contents of any variables.
baab13
+
baab13
+Every uReport also contains identification of the operating system, versions of
baab13
+the RPM packages involved in the crash, and whether the program ran under a
baab13
+root user.
baab13
+
baab13
+There are also items specific to each crash type:
baab13
+
baab13
+C/C++ crashes::
baab13
+    these are path to the executable and signal delivered to the program,
baab13
+
baab13
+Python exceptions::
baab13
+    there is the type of the exception (without the error message, which may
baab13
+    contain sensitive data),
baab13
+
baab13
+for kernel oopses::
baab13
+    these are list of loaded kernel modules, list of taint flags, and full text
baab13
+    of the kernel oops.
baab13
+
baab13
+The authenticated uReports also contains *hostname* and *machineid* to enable a
baab13
+server side filtering at https://access.redhat.com/.
baab13
+
baab13
+The authenticated uReports have the benefit of rich server replies which may
baab13
+include a solution for the submitted crash. The authentication is done using
baab13
+either Red Hat Subscription Certificates or Red Hat Customer Portal
baab13
+credentials.
baab13
+
baab13
+'Warning':
baab13
+The full text of a kernel oops might contain information like the
baab13
+identification of the host hardware type. You should disable the autoreporting
baab13
+feature if you do not want to share this information with Red Hat.
baab13
+
baab13
+
baab13
+OPTIONS
baab13
+-------
baab13
+-v, --verbose::
baab13
+   Be more verbose. Can be given multiple times.
baab13
+
baab13
+-a, --anonymous::
baab13
+   Turns the authentication off by clearing both 'SSLClientAuth' and 'HTTPAuth'
baab13
+   configuration options in /etc/libreport/plugins/ureport.conf
baab13
+
baab13
+-u, --username USERNAME::
baab13
+   Turns HTTP Authentication on by setting 'HTTPAuth' configuration option to
baab13
+   *rhts-credentials* in /etc/libreport/plugins/ureport.conf and storing
baab13
+   USERNAME and PASSWORD in /etc/libreport/plugins/rhtsupport.conf
baab13
+   Also turns the SSL Client Authentication off, because these methods cannot
baab13
+   be used together.
baab13
+
baab13
+-p, --password PASSWORD::
baab13
+   Password for HTTP Authentication. If not provided, a prompt asking for it
baab13
+   will be issued.
baab13
+
baab13
+-c, --certificate SOURCE::
baab13
+   Turns SSL Client Authentication on by setting 'SSLClientAuth' configuration
baab13
+   option to SOURCE in /etc/libreport/plugins/ureport.conf.
baab13
+   Also turns the HTTP Authentication off, because these methods cannot
baab13
+   be used together.
baab13
+
baab13
+SEE ALSO
baab13
+--------
baab13
+abrt.conf(5), ureport.conf(5), rhtsupport.conf(5)
baab13
+
baab13
+AUTHORS
baab13
+-------
baab13
+* ABRT team
baab13
diff --git a/doc/abrt-auto-reporting-unauthenticated.txt b/doc/abrt-auto-reporting-unauthenticated.txt
baab13
new file mode 100644
baab13
index 0000000..320c803
baab13
--- /dev/null
baab13
+++ b/doc/abrt-auto-reporting-unauthenticated.txt
baab13
@@ -0,0 +1,71 @@
baab13
+abrt-auto-reporting(1)
baab13
+======================
baab13
+
baab13
+NAME
baab13
+----
baab13
+abrt-auto-reporting - Get or modify the auto reporting option values
baab13
+
baab13
+SYNOPSIS
baab13
+--------
baab13
+'abrt-auto-reporting' [-v] [ enabled | yes | 1 | on | disabled | no | 0 | off ]
baab13
+
baab13
+DESCRIPTION
baab13
+-----------
baab13
+Reads the configuration from abrt.conf and saves the changes to the same file.
baab13
+
baab13
+The changes will take effect immediately without necessity to restart any ABRT
baab13
+process and will be persistent.
baab13
+
baab13
+'disabled'::
baab13
+   User have to report the detect problems manually
baab13
+
baab13
+'enabled'::
baab13
+   ABRT uploads an uReport which was generated for a detected problem
baab13
+   immediately after the detection phase.
baab13
+
baab13
+uReport description
baab13
+~~~~~~~~~~~~~~~~~~~
baab13
+ABRT supports uReports for four types of crashes: crashes of C/C++ programs
baab13
+that result in a core dump, uncaught Python exceptions, uncaught Java
baab13
+exceptions and kernel oopses.
baab13
+
baab13
+Each uReport generally contains a stack trace, or multiple stack traces in the
baab13
+case of multi-threaded C/C++ and Java programs. The stack trace only describes
baab13
+the call stack of the program at the time of the crash and does not contain
baab13
+contents of any variables.
baab13
+
baab13
+Every uReport also contains identification of the operating system, versions of
baab13
+the RPM packages involved in the crash, and whether the program ran under a
baab13
+root user.
baab13
+
baab13
+There are also items specific to each crash type:
baab13
+
baab13
+C/C++ crashes::
baab13
+    these are path to the executable and signal delivered to the program,
baab13
+
baab13
+Python exceptions::
baab13
+    there is the type of the exception (without the error message, which may
baab13
+    contain sensitive data),
baab13
+
baab13
+for kernel oopses::
baab13
+    these are list of loaded kernel modules, list of taint flags, and full text
baab13
+    of the kernel oops.
baab13
+
baab13
+'Warning':
baab13
+The full text of a kernel oops might contain information like the
baab13
+identification of the host hardware type. You should disable the autoreporting
baab13
+feature if you do not want to share this information with Red Hat.
baab13
+
baab13
+
baab13
+OPTIONS
baab13
+-------
baab13
+-v, --verbose::
baab13
+   Be more verbose. Can be given multiple times.
baab13
+
baab13
+SEE ALSO
baab13
+--------
baab13
+abrt.conf(5)
baab13
+
baab13
+AUTHORS
baab13
+-------
baab13
+* ABRT team
baab13
diff --git a/doc/abrt-auto-reporting.txt b/doc/abrt-auto-reporting.txt
baab13
deleted file mode 100644
baab13
index 2a27945..0000000
baab13
--- a/doc/abrt-auto-reporting.txt
baab13
+++ /dev/null
baab13
@@ -1,106 +0,0 @@
baab13
-abrt-auto-reporting(1)
baab13
-======================
baab13
-
baab13
-NAME
baab13
-----
baab13
-abrt-auto-reporting - Get or modify the auto reporting option values
baab13
-
baab13
-SYNOPSIS
baab13
---------
baab13
-'abrt-auto-reporting' [-v] [ enabled | yes | 1 | on | disabled | no | 0 | off ]
baab13
-                      [ [--anonymous] |
baab13
-                        [--username USERNAME [--password PASSWORD] ] |
baab13
-                        [--certificate SOURCE] ]
baab13
-
baab13
-DESCRIPTION
baab13
------------
baab13
-Reads the configuration from abrt.conf and saves the changes to the same file.
baab13
-
baab13
-The changes will take effect immediately without necessity to restart any ABRT
baab13
-process and will be persistent.
baab13
-
baab13
-'disabled'::
baab13
-   User have to report the detect problems manually
baab13
-
baab13
-'enabled'::
baab13
-   ABRT uploads an uReport which was generated for a detected problem
baab13
-   immediately after the detection phase.
baab13
-
baab13
-Reads and saves the authentication configuration options in
baab13
-/etc/libreport/plugins/ureport.conf and /etc/libreport/plugins/rhtsupport.conf
baab13
-
baab13
-uReport description
baab13
-~~~~~~~~~~~~~~~~~~~
baab13
-ABRT supports uReports for four types of crashes: crashes of C/C++ programs
baab13
-that result in a core dump, uncaught Python exceptions, uncaught Java
baab13
-exceptions and kernel oopses.
baab13
-
baab13
-Each uReport generally contains a stack trace, or multiple stack traces in the
baab13
-case of multi-threaded C/C++ and Java programs. The stack trace only describes
baab13
-the call stack of the program at the time of the crash and does not contain
baab13
-contents of any variables.
baab13
-
baab13
-Every uReport also contains identification of the operating system, versions of
baab13
-the RPM packages involved in the crash, and whether the program ran under a
baab13
-root user.
baab13
-
baab13
-There are also items specific to each crash type:
baab13
-
baab13
-C/C++ crashes::
baab13
-    these are path to the executable and signal delivered to the program,
baab13
-
baab13
-Python exceptions::
baab13
-    there is the type of the exception (without the error message, which may
baab13
-    contain sensitive data),
baab13
-
baab13
-for kernel oopses::
baab13
-    these are list of loaded kernel modules, list of taint flags, and full text
baab13
-    of the kernel oops.
baab13
-
baab13
-The authenticated uReports also contains *hostname* and *machineid* to enable a
baab13
-server side filtering at https://access.redhat.com/.
baab13
-
baab13
-The authenticated uReports have the benefit of rich server replies which may
baab13
-include a solution for the submitted crash. The authentication is done using
baab13
-either Red Hat Subscription Certificates or Red Hat Customer Portal
baab13
-credentials.
baab13
-
baab13
-'Warning':
baab13
-The full text of a kernel oops might contain information like the
baab13
-identification of the host hardware type. You should disable the autoreporting
baab13
-feature if you do not want to share this information with Red Hat.
baab13
-
baab13
-
baab13
-OPTIONS
baab13
--------
baab13
--v, --verbose::
baab13
-   Be more verbose. Can be given multiple times.
baab13
-
baab13
--a, --anonymous::
baab13
-   Turns the authentication off by clearing both 'SSLClientAuth' and 'HTTPAuth'
baab13
-   configuration options in /etc/libreport/plugins/ureport.conf
baab13
-
baab13
--u, --username USERNAME::
baab13
-   Turns HTTP Authentication on by setting 'HTTPAuth' configuration option to
baab13
-   *rhts-credentials* in /etc/libreport/plugins/ureport.conf and storing
baab13
-   USERNAME and PASSWORD in /etc/libreport/plugins/rhtsupport.conf
baab13
-   Also turns the SSL Client Authentication off, because these methods cannot
baab13
-   be used together.
baab13
-
baab13
--p, --password PASSWORD::
baab13
-   Password for HTTP Authentication. If not provided, a prompt asking for it
baab13
-   will be issued.
baab13
-
baab13
--c, --certificate SOURCE::
baab13
-   Turns SSL Client Authentication on by setting 'SSLClientAuth' configuration
baab13
-   option to SOURCE in /etc/libreport/plugins/ureport.conf.
baab13
-   Also turns the HTTP Authentication off, because these methods cannot
baab13
-   be used together.
baab13
-
baab13
-SEE ALSO
baab13
---------
baab13
-abrt.conf(5), ureport.conf(5), rhtsupport.conf(5)
baab13
-
baab13
-AUTHORS
baab13
--------
baab13
-* ABRT team
baab13
diff --git a/src/daemon/abrt-auto-reporting.c b/src/daemon/abrt-auto-reporting.c
baab13
index 573c1ae..46f8923 100644
baab13
--- a/src/daemon/abrt-auto-reporting.c
baab13
+++ b/src/daemon/abrt-auto-reporting.c
baab13
@@ -66,6 +66,7 @@ set_abrt_reporting(map_string_t *conf, const char *opt_value)
baab13
     return 1;
baab13
 }
baab13
 
baab13
+#if AUTHENTICATED_AUTOREPORTING != 0
baab13
 static int
baab13
 set_ureport_http_auth(map_string_t *conf, const char *opt_value)
baab13
 {
baab13
@@ -136,6 +137,7 @@ set_rhts_credentials(map_string_t *conf, const char *username, const char *passw
baab13
     /* No changes needed -> success */
baab13
     return 1;
baab13
 }
baab13
+#endif
baab13
 
baab13
 static const char *
baab13
 get_abrt_reporting(map_string_t *conf)
baab13
@@ -145,6 +147,7 @@ get_abrt_reporting(map_string_t *conf)
baab13
     return REPORTING_STATES[index][0];
baab13
 }
baab13
 
baab13
+#if AUTHENTICATED_AUTOREPORTING != 0
baab13
 static const char *
baab13
 get_ureport_http_auth(map_string_t *conf)
baab13
 {
baab13
@@ -156,6 +159,7 @@ get_ureport_client_auth(map_string_t *conf)
baab13
 {
baab13
     return get_map_string_item_or_NULL(conf, UREPORT_CLIENT_AUTH_OPTION);
baab13
 }
baab13
+#endif
baab13
 
baab13
 int main(int argc, char *argv[])
baab13
 {
baab13
@@ -173,57 +177,78 @@ int main(int argc, char *argv[])
baab13
     textdomain(PACKAGE);
baab13
 #endif
baab13
 
baab13
+#define PROGRAM_USAGE_MIDDLE_PART \
baab13
+            "\n" \
baab13
+            "Get or modify a value of the auto-reporting option. The changes will take\n" \
baab13
+            "effect immediately and will be persistent.\n" \
baab13
+            "\n" \
baab13
+            ""STATE_MANUAL":\n" \
baab13
+            "User have to report the detect problems manually\n" \
baab13
+            "\n" \
baab13
+            ""STATE_AUTO":\n" \
baab13
+            "ABRT uploads an uReport which was generated for a detected problem\n" \
baab13
+            "immediately after the detection phase. uReport generally contains a stack\n" \
baab13
+            "trace which only describes the call stack of the program at the time of the\n" \
baab13
+            "crash and does not contain contents of any variables.  Every uReport also\n" \
baab13
+            "contains identification of the operating system, versions of the RPM packages\n" \
baab13
+            "involved in the crash, and whether the program ran under a root user.\n" \
baab13
+            "\n"
baab13
+
baab13
     abrt_init(argv);
baab13
+#if AUTHENTICATED_AUTOREPORTING != 0
baab13
     const char *program_usage_string = _(
baab13
             "& [ "STATE_MANUAL" | "STATE_AUTO" | yes | no | 1 | 0 ] \\\n"
baab13
             "  [[--anonymous] | [--username USERNAME [--password PASSWORD]] | [--certificate SOURCE]]\n"
baab13
-            "\n"
baab13
-            "Get or modify a value of the auto-reporting option. The changes will take\n"
baab13
-            "effect immediately and will be persistent.\n"
baab13
-            "\n"
baab13
-            ""STATE_MANUAL":\n"
baab13
-            "User have to report the detect problems manually\n"
baab13
-            "\n"
baab13
-            ""STATE_AUTO":\n"
baab13
-            "ABRT uploads an uReport which was generated for a detected problem\n"
baab13
-            "immediately after the detection phase. uReport generally contains a stack\n"
baab13
-            "trace which only describes the call stack of the program at the time of the\n"
baab13
-            "crash and does not contain contents of any variables.  Every uReport also\n"
baab13
-            "contains identification of the operating system, versions of the RPM packages\n"
baab13
-            "involved in the crash, and whether the program ran under a root user.\n"
baab13
-            "\n"
baab13
+            PROGRAM_USAGE_MIDDLE_PART
baab13
             "See abrt-auto-reporting(1), reporter-ureport(1) and reporter-rhtsupport(1)\n"
baab13
             "for more details.\n"
baab13
     );
baab13
+#else
baab13
+    const char *program_usage_string = _(
baab13
+            "& [ "STATE_MANUAL" | "STATE_AUTO" | yes | no | 1 | 0 ]\n"
baab13
+            PROGRAM_USAGE_MIDDLE_PART
baab13
+            "See abrt-auto-reporting(1) and reporter-ureport(1) for more details.\n"
baab13
+    );
baab13
+#endif
baab13
 
baab13
     enum {
baab13
         OPT_v = 1 << 0,
baab13
+#if AUTHENTICATED_AUTOREPORTING != 0
baab13
         OPT_a = 1 << 1,
baab13
         OPT_u = 1 << 2,
baab13
         OPT_p = 1 << 3,
baab13
         OPT_c = 1 << 4,
baab13
+#endif
baab13
     };
baab13
 
baab13
+#if AUTHENTICATED_AUTOREPORTING != 0
baab13
     int anonymous = 0;
baab13
     const char *username = NULL;
baab13
     const char *password = NULL;
baab13
     const char *certificate = NULL;
baab13
+#endif
baab13
 
baab13
     /* Keep enum above and order of options below in sync! */
baab13
     struct options program_options[] = {
baab13
         OPT__VERBOSE(&g_verbose),
baab13
+#if AUTHENTICATED_AUTOREPORTING != 0
baab13
         OPT_BOOL  (  'a', "anonymous",   &anonymous,               _("Turns the authentication off")),
baab13
         OPT_STRING(  'u', "username",    &username,    "USERNAME", _("Red Hat Support user name")),
baab13
         OPT_STRING(  'p', "password",    &password,    "PASSWORD", _("Red Hat Support password, if not given, a prompt for it will be issued")),
baab13
         OPT_STRING(  'c', "certificate", &certificate, "SOURCE",   _("uReport SSL certificate paths or certificate type")),
baab13
+#endif
baab13
         OPT_END()
baab13
     };
baab13
 
baab13
-    const unsigned opts = parse_opts(argc, argv, program_options, program_usage_string);
baab13
+#if AUTHENTICATED_AUTOREPORTING != 0
baab13
+    const unsigned opts =
baab13
+#endif
baab13
+    parse_opts(argc, argv, program_options, program_usage_string);
baab13
 
baab13
     argv += optind;
baab13
     argc -= optind;
baab13
 
baab13
+#if AUTHENTICATED_AUTOREPORTING != 0
baab13
     if ((opts & OPT_p) && !(opts & OPT_u))
baab13
     {
baab13
         error_msg(_("You also need to specify --username for --password"));
baab13
@@ -248,6 +273,7 @@ int main(int argc, char *argv[])
baab13
         show_usage_and_die(program_usage_string, program_options);
baab13
     }
baab13
 
baab13
+#endif
baab13
     if (argc > 1)
baab13
     {
baab13
         error_msg(_("Invalid number of arguments"));
baab13
@@ -277,20 +303,25 @@ int main(int argc, char *argv[])
baab13
     int exit_code = EXIT_FAILURE;
baab13
 
baab13
     map_string_t *conf = new_map_string();
baab13
+#if AUTHENTICATED_AUTOREPORTING != 0
baab13
     map_string_t *rhts_conf = new_map_string();
baab13
     map_string_t *rhts_conf_bck = NULL;
baab13
+#endif
baab13
     map_string_t *ureport_conf = new_map_string();
baab13
     map_string_t *ureport_conf_bck = NULL;
baab13
 
baab13
     if (!load_abrt_conf_file(CONF_NAME, conf))
baab13
         goto finito;
baab13
 
baab13
+#if AUTHENTICATED_AUTOREPORTING != 0
baab13
     if (!load_plugin_conf_file(RHTS_NAME, rhts_conf, false))
baab13
         goto finito;
baab13
+#endif
baab13
 
baab13
     if (!load_plugin_conf_file(UREPORT_NAME, ureport_conf, false))
baab13
         goto finito;
baab13
 
baab13
+#if AUTHENTICATED_AUTOREPORTING != 0
baab13
     if ((opts & OPT_a))
baab13
     {
baab13
         ureport_conf_bck = clone_map_string(ureport_conf);
baab13
@@ -336,11 +367,13 @@ int main(int argc, char *argv[])
baab13
             goto finito;
baab13
     }
baab13
 
baab13
+#endif
baab13
     if (argc == 0)
baab13
     {
baab13
         printf("%s", get_abrt_reporting(conf));
baab13
         exit_code = EXIT_SUCCESS;
baab13
 
baab13
+#if AUTHENTICATED_AUTOREPORTING != 0
baab13
         if (g_verbose >= 1)
baab13
         {
baab13
             const char *tmp = get_ureport_http_auth(ureport_conf);
baab13
@@ -352,7 +385,7 @@ int main(int argc, char *argv[])
baab13
             else
baab13
                 printf(" %s", _("anonymous auto reporting"));
baab13
         }
baab13
-
baab13
+#endif
baab13
         putchar('\n');
baab13
 
baab13
         goto finito;
baab13
@@ -371,16 +404,20 @@ int main(int argc, char *argv[])
baab13
         if (ureport_conf_bck != NULL)
baab13
             save_plugin_conf_file(UREPORT_NAME, ureport_conf_bck);
baab13
 
baab13
+#if AUTHENTICATED_AUTOREPORTING != 0
baab13
         if (rhts_conf_bck != NULL)
baab13
             save_plugin_conf_file(RHTS_NAME, rhts_conf_bck);
baab13
+#endif
baab13
     }
baab13
 
baab13
 
baab13
 finito:
baab13
     free_map_string(ureport_conf);
baab13
     free_map_string(ureport_conf_bck);
baab13
+#if AUTHENTICATED_AUTOREPORTING != 0
baab13
     free_map_string(rhts_conf);
baab13
     free_map_string(rhts_conf_bck);
baab13
+#endif
baab13
     free_map_string(conf);
baab13
     return exit_code;
baab13
 }
baab13
-- 
baab13
2.4.3
baab13