Blame SOURCES/0184-uploader-etc-libreport-plugins-upload.conf-as-defaul.patch

2c83a8
From 8d19dea8d110d52f3df475b37fac5c26f3c7387d Mon Sep 17 00:00:00 2001
2c83a8
From: Matej Habrnal <mhabrnal@redhat.com>
2c83a8
Date: Mon, 21 Mar 2016 13:55:42 +0100
2c83a8
Subject: [PATCH] uploader: /etc/libreport/plugins/upload.conf as default conf
2c83a8
 file
2c83a8
2c83a8
Due to the possibility to configure SSH keys we added a default configuration
2c83a8
file as well. Users can define SSH keys as well as URL where dump dirs are
2c83a8
going to be uploaded.
2c83a8
2c83a8
Related to rhbz#1289513
2c83a8
2c83a8
Signed-off-by: Matej Habrnal <mhabrnal@redhat.com>
2c83a8
---
2c83a8
 src/plugins/Makefile.am       | 1 +
2c83a8
 src/plugins/reporter-upload.c | 2 +-
2c83a8
 2 files changed, 2 insertions(+), 1 deletion(-)
2c83a8
2c83a8
diff --git a/src/plugins/Makefile.am b/src/plugins/Makefile.am
2c83a8
index 59fc440..01eec3a 100644
2c83a8
--- a/src/plugins/Makefile.am
2c83a8
+++ b/src/plugins/Makefile.am
2c83a8
@@ -160,6 +160,7 @@ reporter_upload_CPPFLAGS = \
2c83a8
     -I$(srcdir)/../lib \
2c83a8
     -DBIN_DIR=\"$(bindir)\" \
2c83a8
     -DLOCALSTATEDIR='"$(localstatedir)"' \
2c83a8
+    -DCONF_DIR=\"$(CONF_DIR)\" \
2c83a8
     -DDEBUG_DUMPS_DIR=\"$(DEBUG_DUMPS_DIR)\" \
2c83a8
     -DDEBUG_INFO_DIR=\"$(DEBUG_INFO_DIR)\" \
2c83a8
     -DPLUGINS_LIB_DIR=\"$(PLUGINS_LIB_DIR)\" \
2c83a8
diff --git a/src/plugins/reporter-upload.c b/src/plugins/reporter-upload.c
2c83a8
index 36509fb..7b925c8 100644
2c83a8
--- a/src/plugins/reporter-upload.c
2c83a8
+++ b/src/plugins/reporter-upload.c
2c83a8
@@ -149,7 +149,7 @@ int main(int argc, char **argv)
2c83a8
 #endif
2c83a8
 
2c83a8
     const char *dump_dir_name = ".";
2c83a8
-    const char *conf_file = NULL;
2c83a8
+    const char *conf_file = CONF_DIR"/plugins/upload.conf";
2c83a8
     const char *url = NULL;
2c83a8
     const char *ssh_public_key = NULL;
2c83a8
     const char *ssh_private_key = NULL;
2c83a8
-- 
2c83a8
1.8.3.1
2c83a8