parent
83cb127b4b
commit
2e01e959d9
File diff suppressed because it is too large
Load Diff
@ -1,28 +0,0 @@
|
||||
From c7eaedb85aa65b53e2a874592007b1242abbcfa6 Mon Sep 17 00:00:00 2001
|
||||
From: Jakub Filak <jfilak@redhat.com>
|
||||
Date: Wed, 8 Oct 2014 12:26:29 +0200
|
||||
Subject: [PATCH] upload: don't ask for password if the env var is empty string
|
||||
|
||||
Related to rhbz#1066486
|
||||
|
||||
Signed-off-by: Jakub Filak <jfilak@redhat.com>
|
||||
---
|
||||
src/plugins/reporter-upload.c | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/src/plugins/reporter-upload.c b/src/plugins/reporter-upload.c
|
||||
index 1ccfd65..42ec271 100644
|
||||
--- a/src/plugins/reporter-upload.c
|
||||
+++ b/src/plugins/reporter-upload.c
|
||||
@@ -156,7 +156,7 @@ static int create_and_upload_archive(
|
||||
/* Load Password only if Username is configured, it doesn't make */
|
||||
/* much sense to load Password without Username. */
|
||||
state->password = getenv("Upload_Password");
|
||||
- if (state->password == NULL && state->password[0] == '\0')
|
||||
+ if (state->password == NULL)
|
||||
{
|
||||
/* Be permissive and nice, ask only once and don't check */
|
||||
/* the result. User can dismiss this prompt but the upload */
|
||||
--
|
||||
2.1.0
|
||||
|
@ -1,29 +0,0 @@
|
||||
From 28d979c3824d0e90e14ba7f7be679e66fb53c851 Mon Sep 17 00:00:00 2001
|
||||
From: Jakub Filak <jfilak@redhat.com>
|
||||
Date: Wed, 8 Oct 2014 12:37:24 +0200
|
||||
Subject: [PATCH] lib: fix a bug in ureport response parser
|
||||
|
||||
Revealed by coverity
|
||||
|
||||
Related to rhbz1139987
|
||||
|
||||
Signed-off-by: Jakub Filak <jfilak@redhat.com>
|
||||
---
|
||||
src/lib/ureport.c | 1 +
|
||||
1 file changed, 1 insertion(+)
|
||||
|
||||
diff --git a/src/lib/ureport.c b/src/lib/ureport.c
|
||||
index dd79054..3ac859d 100644
|
||||
--- a/src/lib/ureport.c
|
||||
+++ b/src/lib/ureport.c
|
||||
@@ -339,6 +339,7 @@ parse_solution_from_json_list(struct json_object *list,
|
||||
continue;
|
||||
|
||||
cause = json_object_get_string(struct_elem);
|
||||
+ if (!cause)
|
||||
continue;
|
||||
|
||||
if (!json_object_object_get_ex(list_elem, "note", &struct_elem))
|
||||
--
|
||||
2.1.0
|
||||
|
@ -1,250 +0,0 @@
|
||||
From f2a0d8fc954afef291c0989c756bbe455c1ccc92 Mon Sep 17 00:00:00 2001
|
||||
From: Jakub Filak <jfilak@redhat.com>
|
||||
Date: Fri, 26 Sep 2014 18:40:46 +0200
|
||||
Subject: [PATCH] rhtsupport: re-prompt for credentials
|
||||
|
||||
Related to rhbz#1104313
|
||||
|
||||
Signed-off-by: Jakub Filak <jfilak@redhat.com>
|
||||
---
|
||||
src/include/ureport.h | 11 ++++
|
||||
src/lib/ureport.c | 2 +-
|
||||
src/plugins/reporter-rhtsupport.c | 117 ++++++++++++++++++++++++++++++--------
|
||||
3 files changed, 106 insertions(+), 24 deletions(-)
|
||||
|
||||
diff --git a/src/include/ureport.h b/src/include/ureport.h
|
||||
index 8bb1f6c..104e8d0 100644
|
||||
--- a/src/include/ureport.h
|
||||
+++ b/src/include/ureport.h
|
||||
@@ -216,6 +216,17 @@ struct ureport_server_response *
|
||||
ureport_submit(const char *json_ureport, struct ureport_server_config *config);
|
||||
|
||||
/*
|
||||
+ * Build a new uReport attachement from give arguments
|
||||
+ *
|
||||
+ * @param bthash ID of uReport
|
||||
+ * @param type Type of attachement recognized by uReport Server
|
||||
+ * @param data Attached data
|
||||
+ * @returm Malloced JSON string
|
||||
+ */
|
||||
+char *
|
||||
+ureport_json_attachment_new(const char *bthash, const char *type, const char *data);
|
||||
+
|
||||
+/*
|
||||
* Attach given string to uReport
|
||||
*
|
||||
* @param bthash uReport identifier
|
||||
diff --git a/src/lib/ureport.c b/src/lib/ureport.c
|
||||
index 3ac859d..731b96c 100644
|
||||
--- a/src/lib/ureport.c
|
||||
+++ b/src/lib/ureport.c
|
||||
@@ -742,7 +742,7 @@ ureport_submit(const char *json, struct ureport_server_config *config)
|
||||
return resp;
|
||||
}
|
||||
|
||||
-static char *
|
||||
+char *
|
||||
ureport_json_attachment_new(const char *bthash, const char *type, const char *data)
|
||||
{
|
||||
struct json_object *attachment = json_object_new_object();
|
||||
diff --git a/src/plugins/reporter-rhtsupport.c b/src/plugins/reporter-rhtsupport.c
|
||||
index 7f5c62b..9704c3c 100644
|
||||
--- a/src/plugins/reporter-rhtsupport.c
|
||||
+++ b/src/plugins/reporter-rhtsupport.c
|
||||
@@ -26,6 +26,22 @@
|
||||
|
||||
#define QUERY_HINTS_IF_SMALLER_THAN (8*1024*1024)
|
||||
|
||||
+static void ask_rh_credentials(char **login, char **password);
|
||||
+
|
||||
+#define INVALID_CREDENTIALS_LOOP(l, p, r, fncall) \
|
||||
+ do {\
|
||||
+ r = fncall;\
|
||||
+ if (r->error == 0 || r->http_resp_code != 401 ) { break; }\
|
||||
+ ask_rh_credentials(&l, &p);\
|
||||
+ free_rhts_result(r);\
|
||||
+ } while (1)
|
||||
+
|
||||
+#define STRCPY_IF_NOT_EQUAL(dest, src) \
|
||||
+ do { if (strcmp(dest, src) != 0 ) { \
|
||||
+ free(dest); \
|
||||
+ dest = xstrdup(src); \
|
||||
+ } } while (0)
|
||||
+
|
||||
static report_result_t *get_reported_to(const char *dump_dir_name)
|
||||
{
|
||||
struct dump_dir *dd = dd_opendir(dump_dir_name, /*flags:*/ 0);
|
||||
@@ -170,6 +186,38 @@ ret_clean:
|
||||
}
|
||||
|
||||
static
|
||||
+struct ureport_server_response *ureport_do_post_credentials(const char *json, struct ureport_server_config *config, const char *action)
|
||||
+{
|
||||
+ struct post_state *post_state = NULL;
|
||||
+ while (1)
|
||||
+ {
|
||||
+ post_state = ureport_do_post(json, config, action);
|
||||
+
|
||||
+ if (post_state == NULL)
|
||||
+ {
|
||||
+ error_msg(_("Failed on submitting the problem"));
|
||||
+ return NULL;
|
||||
+ }
|
||||
+
|
||||
+ if (post_state->http_resp_code != 401)
|
||||
+ break;
|
||||
+
|
||||
+ free_post_state(post_state);
|
||||
+
|
||||
+ char *login = NULL;
|
||||
+ char *password = NULL;
|
||||
+ ask_rh_credentials(&login, &password);
|
||||
+ ureport_server_config_set_basic_auth(config, login, password);
|
||||
+ free(password);
|
||||
+ free(login);
|
||||
+ }
|
||||
+
|
||||
+ struct ureport_server_response *resp = ureport_server_response_from_reply(post_state, config);
|
||||
+ free(post_state);
|
||||
+ return resp;
|
||||
+}
|
||||
+
|
||||
+static
|
||||
char *submit_ureport(const char *dump_dir_name, struct ureport_server_config *conf)
|
||||
{
|
||||
struct dump_dir *dd = dd_opendir(dump_dir_name, DD_OPEN_READONLY);
|
||||
@@ -191,7 +239,7 @@ char *submit_ureport(const char *dump_dir_name, struct ureport_server_config *co
|
||||
if (json == NULL)
|
||||
return NULL;
|
||||
|
||||
- struct ureport_server_response *resp = ureport_submit(json, conf);
|
||||
+ struct ureport_server_response *resp = ureport_do_post_credentials(json, conf, UREPORT_SUBMIT_ACTION);
|
||||
free(json);
|
||||
if (resp == NULL)
|
||||
return NULL;
|
||||
@@ -215,9 +263,14 @@ char *submit_ureport(const char *dump_dir_name, struct ureport_server_config *co
|
||||
}
|
||||
|
||||
static
|
||||
-bool check_for_hints(const char *url, const char *login, const char *password, bool ssl_verify, const char *tempfile)
|
||||
+bool check_for_hints(const char *url, char **login, char **password, bool ssl_verify, const char *tempfile)
|
||||
{
|
||||
- rhts_result_t *result = get_rhts_hints(url, login, password, ssl_verify, tempfile);
|
||||
+ rhts_result_t *result = NULL;
|
||||
+
|
||||
+ INVALID_CREDENTIALS_LOOP((*login), (*password),
|
||||
+ result, get_rhts_hints(url, *login, *password, ssl_verify, tempfile)
|
||||
+ );
|
||||
+
|
||||
#if 0 /* testing */
|
||||
log("ERR:%d", result->error);
|
||||
log("MSG:'%s'", result->msg);
|
||||
@@ -291,6 +344,19 @@ char *ask_rh_password(const char *message)
|
||||
}
|
||||
|
||||
static
|
||||
+void ask_rh_credentials(char **login, char **password)
|
||||
+{
|
||||
+ free(*login);
|
||||
+ free(*password);
|
||||
+
|
||||
+ *login = ask_rh_login(_("Invalid password or login. Please enter your Red Hat login:"));
|
||||
+
|
||||
+ char *question = xasprintf(_("Invalid password or login. Please enter the password for '%s':"), *login);
|
||||
+ *password = ask_rh_password(question);
|
||||
+ free(question);
|
||||
+}
|
||||
+
|
||||
+static
|
||||
char *get_param_string(const char *name, map_string_t *settings, const char *dflt)
|
||||
{
|
||||
char *envname = xasprintf("RHTSupport_%s", name);
|
||||
@@ -584,13 +650,17 @@ int main(int argc, char **argv)
|
||||
log(_("Sending ABRT crash statistics data"));
|
||||
|
||||
bthash = submit_ureport(dump_dir_name, &urconf);
|
||||
+
|
||||
+ /* Ensure that we will use the updated credentials */
|
||||
+ STRCPY_IF_NOT_EQUAL(login, urconf.ur_username);
|
||||
+ STRCPY_IF_NOT_EQUAL(password, urconf.ur_password);
|
||||
}
|
||||
|
||||
if (tempfile_size <= QUERY_HINTS_IF_SMALLER_THAN)
|
||||
{
|
||||
/* Check for hints and show them if we have something */
|
||||
log(_("Checking for hints"));
|
||||
- if (check_for_hints(base_api_url, login, password, ssl_verify, tempfile))
|
||||
+ if (check_for_hints(base_api_url, &login, &password, ssl_verify, tempfile))
|
||||
{
|
||||
ureport_server_config_destroy(&urconf);
|
||||
free_map_string(ursettings);
|
||||
@@ -613,15 +683,9 @@ int main(int argc, char **argv)
|
||||
error_msg_and_die(_("Can't determine RH Support Product from problem data."));
|
||||
}
|
||||
|
||||
- result = create_new_case(url,
|
||||
- login,
|
||||
- password,
|
||||
- ssl_verify,
|
||||
- product,
|
||||
- version,
|
||||
- summary,
|
||||
- dsc,
|
||||
- package
|
||||
+ INVALID_CREDENTIALS_LOOP(login, password,
|
||||
+ result, create_new_case(url, login, password, ssl_verify,
|
||||
+ product, version, summary, dsc, package)
|
||||
);
|
||||
|
||||
free(version);
|
||||
@@ -673,7 +737,19 @@ int main(int argc, char **argv)
|
||||
if (bthash)
|
||||
{
|
||||
log(_("Linking ABRT crash statistics record with the case"));
|
||||
- ureport_attach_string(bthash, "RHCID", result->url, &urconf);
|
||||
+
|
||||
+ /* Make sure we use the current credentials */
|
||||
+ ureport_server_config_set_basic_auth(&urconf, login, password);
|
||||
+
|
||||
+ /* Do attach */
|
||||
+ char *json = ureport_json_attachment_new(bthash, "RHCID", result->url);
|
||||
+ struct ureport_server_response *resp = ureport_do_post_credentials(json, &urconf, UREPORT_ATTACH_ACTION);
|
||||
+ ureport_server_response_free(resp);
|
||||
+ free(json);
|
||||
+
|
||||
+ /* Update the credentials */
|
||||
+ STRCPY_IF_NOT_EQUAL(login, urconf.ur_username);
|
||||
+ STRCPY_IF_NOT_EQUAL(password, urconf.ur_password);
|
||||
}
|
||||
|
||||
url = result->url;
|
||||
@@ -705,10 +781,8 @@ int main(int argc, char **argv)
|
||||
remote_filename
|
||||
);
|
||||
free(remote_filename);
|
||||
- result_atch = add_comment_to_case(url,
|
||||
- login, password,
|
||||
- ssl_verify,
|
||||
- comment_text
|
||||
+ INVALID_CREDENTIALS_LOOP(login, password,
|
||||
+ result_atch, add_comment_to_case(url, login, password, ssl_verify, comment_text)
|
||||
);
|
||||
free(comment_text);
|
||||
}
|
||||
@@ -716,11 +790,8 @@ int main(int argc, char **argv)
|
||||
{
|
||||
/* Attach the tarball of -d DIR */
|
||||
log(_("Attaching problem data to case '%s'"), url);
|
||||
- result_atch = attach_file_to_case(url,
|
||||
- login, password,
|
||||
- ssl_verify,
|
||||
- tempfile
|
||||
-
|
||||
+ INVALID_CREDENTIALS_LOOP(login, password,
|
||||
+ result_atch, attach_file_to_case(url, login, password, ssl_verify, tempfile)
|
||||
);
|
||||
}
|
||||
if (result_atch->error)
|
||||
--
|
||||
2.1.0
|
||||
|
@ -1,59 +0,0 @@
|
||||
From e71aebba83efe673bfb554a9fbf1533b7a96bde8 Mon Sep 17 00:00:00 2001
|
||||
From: Jakub Filak <jfilak@redhat.com>
|
||||
Date: Wed, 8 Oct 2014 12:10:10 +0200
|
||||
Subject: [PATCH] rhtsupport: attach the contact email to bthash
|
||||
|
||||
Related to rhbz#1150388
|
||||
|
||||
Signed-off-by: Jakub Filak <jfilak@redhat.com>
|
||||
---
|
||||
src/plugins/reporter-rhtsupport.c | 26 +++++++++++++++++++++-----
|
||||
1 file changed, 21 insertions(+), 5 deletions(-)
|
||||
|
||||
diff --git a/src/plugins/reporter-rhtsupport.c b/src/plugins/reporter-rhtsupport.c
|
||||
index 9704c3c..9e463a8 100644
|
||||
--- a/src/plugins/reporter-rhtsupport.c
|
||||
+++ b/src/plugins/reporter-rhtsupport.c
|
||||
@@ -263,6 +263,16 @@ char *submit_ureport(const char *dump_dir_name, struct ureport_server_config *co
|
||||
}
|
||||
|
||||
static
|
||||
+void attach_to_ureport(struct ureport_server_config *conf,
|
||||
+ const char *bthash, const char *attach_id, const char *data)
|
||||
+{
|
||||
+ char *json = ureport_json_attachment_new(bthash, attach_id, data);
|
||||
+ struct ureport_server_response *resp = ureport_do_post_credentials(json, conf, UREPORT_ATTACH_ACTION);
|
||||
+ ureport_server_response_free(resp);
|
||||
+ free(json);
|
||||
+}
|
||||
+
|
||||
+static
|
||||
bool check_for_hints(const char *url, char **login, char **password, bool ssl_verify, const char *tempfile)
|
||||
{
|
||||
rhts_result_t *result = NULL;
|
||||
@@ -741,11 +751,17 @@ int main(int argc, char **argv)
|
||||
/* Make sure we use the current credentials */
|
||||
ureport_server_config_set_basic_auth(&urconf, login, password);
|
||||
|
||||
- /* Do attach */
|
||||
- char *json = ureport_json_attachment_new(bthash, "RHCID", result->url);
|
||||
- struct ureport_server_response *resp = ureport_do_post_credentials(json, &urconf, UREPORT_ATTACH_ACTION);
|
||||
- ureport_server_response_free(resp);
|
||||
- free(json);
|
||||
+ /* Attach Customer Case ID*/
|
||||
+ attach_to_ureport(&urconf, bthash, "RHCID", result->url);
|
||||
+
|
||||
+ /* Attach Contact e-mail if configured */
|
||||
+ const char *email = NULL;
|
||||
+ UREPORT_OPTION_VALUE_FROM_CONF(ursettings, "ContactEmail", email, (const char *));
|
||||
+ if (email != NULL)
|
||||
+ {
|
||||
+ log(_("Linking ABRT crash statistics record with contact email: '%s'"), email);
|
||||
+ attach_to_ureport(&urconf, bthash, "email", email);
|
||||
+ }
|
||||
|
||||
/* Update the credentials */
|
||||
STRCPY_IF_NOT_EQUAL(login, urconf.ur_username);
|
||||
--
|
||||
2.1.0
|
||||
|
@ -1,29 +0,0 @@
|
||||
From 8f350e29a97311e620aa915e4fb977cae615dfb9 Mon Sep 17 00:00:00 2001
|
||||
From: Jakub Filak <jfilak@redhat.com>
|
||||
Date: Thu, 9 Oct 2014 13:16:00 +0200
|
||||
Subject: [PATCH] ureport: document rhsm-entitlement in the man page
|
||||
|
||||
Related: #1140224
|
||||
|
||||
Signed-off-by: Jakub Filak <jfilak@redhat.com>
|
||||
---
|
||||
doc/reporter-ureport.txt | 3 +++
|
||||
1 file changed, 3 insertions(+)
|
||||
|
||||
diff --git a/doc/reporter-ureport.txt b/doc/reporter-ureport.txt
|
||||
index 4ce11a0..f31dd45 100644
|
||||
--- a/doc/reporter-ureport.txt
|
||||
+++ b/doc/reporter-ureport.txt
|
||||
@@ -37,6 +37,9 @@ Configuration file lines should have 'PARAM = VALUE' format. The parameters are:
|
||||
'rhsm';;
|
||||
Uses the system certificate that is used for Red Hat subscription management.
|
||||
|
||||
+ 'rhsm-entitlement';;
|
||||
+ Same as 'rhsm' but uses the V3 RHSM entitlement certificates.
|
||||
+
|
||||
'puppet';;
|
||||
Uses the certificate that is used by the Puppet configuration management tool.
|
||||
|
||||
--
|
||||
2.1.0
|
||||
|
@ -1,102 +0,0 @@
|
||||
From 0f59cec364a05aa8b1137739ecb4076f16a0406a Mon Sep 17 00:00:00 2001
|
||||
From: Jakub Filak <jfilak@redhat.com>
|
||||
Date: Thu, 9 Oct 2014 14:02:11 +0200
|
||||
Subject: [PATCH] rhtsupport: send ureport before creating description
|
||||
|
||||
Because we want to include the URL to uReport stored in 'reported_to'
|
||||
file in the description.
|
||||
|
||||
Related: #1139987
|
||||
|
||||
Signed-off-by: Jakub Filak <jfilak@redhat.com>
|
||||
---
|
||||
src/plugins/reporter-rhtsupport.c | 45 +++++++++++++++++++--------------------
|
||||
1 file changed, 22 insertions(+), 23 deletions(-)
|
||||
|
||||
diff --git a/src/plugins/reporter-rhtsupport.c b/src/plugins/reporter-rhtsupport.c
|
||||
index 9e463a8..9a1f392 100644
|
||||
--- a/src/plugins/reporter-rhtsupport.c
|
||||
+++ b/src/plugins/reporter-rhtsupport.c
|
||||
@@ -526,6 +526,13 @@ int main(int argc, char **argv)
|
||||
free_map_string(settings);
|
||||
|
||||
char *base_api_url = xstrdup(url);
|
||||
+ char *bthash = NULL;
|
||||
+
|
||||
+ map_string_t *ursettings = new_map_string();
|
||||
+ struct ureport_server_config urconf;
|
||||
+
|
||||
+ prepare_ureport_configuration(urconf_file, ursettings, &urconf,
|
||||
+ url, login, password, ssl_verify);
|
||||
|
||||
if (opts & OPT_t)
|
||||
{
|
||||
@@ -592,6 +599,17 @@ int main(int argc, char **argv)
|
||||
return 0;
|
||||
}
|
||||
free_report_result(reported_to);
|
||||
+
|
||||
+ if (submit_ur)
|
||||
+ {
|
||||
+ log(_("Sending ABRT crash statistics data"));
|
||||
+
|
||||
+ bthash = submit_ureport(dump_dir_name, &urconf);
|
||||
+
|
||||
+ /* Ensure that we will use the updated credentials */
|
||||
+ STRCPY_IF_NOT_EQUAL(login, urconf.ur_username);
|
||||
+ STRCPY_IF_NOT_EQUAL(password, urconf.ur_password);
|
||||
+ }
|
||||
}
|
||||
|
||||
/* Gzipping e.g. 0.5gig coredump takes a while. Let user know what we are doing */
|
||||
@@ -647,25 +665,6 @@ int main(int argc, char **argv)
|
||||
|
||||
if (!(opts & OPT_t))
|
||||
{
|
||||
- char *bthash = NULL;
|
||||
-
|
||||
- map_string_t *ursettings = new_map_string();
|
||||
- struct ureport_server_config urconf;
|
||||
-
|
||||
- prepare_ureport_configuration(urconf_file, ursettings, &urconf,
|
||||
- url, login, password, ssl_verify);
|
||||
-
|
||||
- if (submit_ur)
|
||||
- {
|
||||
- log(_("Sending ABRT crash statistics data"));
|
||||
-
|
||||
- bthash = submit_ureport(dump_dir_name, &urconf);
|
||||
-
|
||||
- /* Ensure that we will use the updated credentials */
|
||||
- STRCPY_IF_NOT_EQUAL(login, urconf.ur_username);
|
||||
- STRCPY_IF_NOT_EQUAL(password, urconf.ur_password);
|
||||
- }
|
||||
-
|
||||
if (tempfile_size <= QUERY_HINTS_IF_SMALLER_THAN)
|
||||
{
|
||||
/* Check for hints and show them if we have something */
|
||||
@@ -772,10 +771,6 @@ int main(int argc, char **argv)
|
||||
result->url = NULL;
|
||||
free_rhts_result(result);
|
||||
result = NULL;
|
||||
-
|
||||
- ureport_server_config_destroy(&urconf);
|
||||
- free_map_string(ursettings);
|
||||
- free(bthash);
|
||||
}
|
||||
|
||||
char *remote_filename = NULL;
|
||||
@@ -842,6 +837,10 @@ int main(int argc, char **argv)
|
||||
free_rhts_result(result_atch);
|
||||
free_rhts_result(result);
|
||||
|
||||
+ ureport_server_config_destroy(&urconf);
|
||||
+ free_map_string(ursettings);
|
||||
+ free(bthash);
|
||||
+
|
||||
free(base_api_url);
|
||||
free(url);
|
||||
free(login);
|
||||
--
|
||||
2.1.0
|
||||
|
File diff suppressed because it is too large
Load Diff
@ -1,33 +0,0 @@
|
||||
From 7dc7f62c8ca4189255417dbf88083df7d4461c50 Mon Sep 17 00:00:00 2001
|
||||
From: Matej Habrnal <mhabrnal@redhat.com>
|
||||
Date: Wed, 22 Oct 2014 00:17:28 +0200
|
||||
Subject: [PATCH] testsuite: changed atlocal.in to work with last commit
|
||||
|
||||
Added special library libreport-web.la and CFLAGS DEFAULT_DUMP_DIR_MODE.
|
||||
|
||||
Signed-off-by: Matej Habrnal <mhabrnal@redhat.com>
|
||||
---
|
||||
tests/atlocal.in | 6 +++---
|
||||
1 file changed, 3 insertions(+), 3 deletions(-)
|
||||
|
||||
diff --git a/tests/atlocal.in b/tests/atlocal.in
|
||||
index 5150b21..1a82edb 100644
|
||||
--- a/tests/atlocal.in
|
||||
+++ b/tests/atlocal.in
|
||||
@@ -6,10 +6,10 @@ CC='@CC@'
|
||||
LIBTOOL="$abs_top_builddir/libtool"
|
||||
|
||||
# We want no optimization.
|
||||
-CFLAGS="@O0CFLAGS@ -I$abs_top_builddir/src/include -I$abs_top_builddir/src/lib -I$abs_top_builddir/src/gtk-helpers -D_GNU_SOURCE @GLIB_CFLAGS@ @GTK_CFLAGS@"
|
||||
+CFLAGS="@O0CFLAGS@ -I$abs_top_builddir/src/include -I$abs_top_builddir/src/lib -I$abs_top_builddir/src/gtk-helpers -D_GNU_SOURCE @GLIB_CFLAGS@ @GTK_CFLAGS@ -DDEFAULT_DUMP_DIR_MODE=@DEFAULT_DUMP_DIR_MODE@"
|
||||
|
||||
# Are special link options needed?
|
||||
-LDFLAGS="@LDFLAGS@ $abs_top_builddir/src/lib/libreport.la $abs_top_builddir/src/gtk-helpers/libreport-gtk.la"
|
||||
+LDFLAGS="@LDFLAGS@"
|
||||
|
||||
# Are special libraries needed?
|
||||
-LIBS="@LIBS@"
|
||||
+LIBS="@LIBS@ $abs_top_builddir/src/lib/libreport.la $abs_top_builddir/src/gtk-helpers/libreport-gtk.la $abs_top_builddir/src/lib/libreport-web.la"
|
||||
--
|
||||
2.1.0
|
||||
|
@ -1,100 +0,0 @@
|
||||
From a9e2277e8c717db2ebef46db700806e40359a8c0 Mon Sep 17 00:00:00 2001
|
||||
From: Jakub Filak <jfilak@redhat.com>
|
||||
Date: Wed, 22 Oct 2014 08:00:39 +0200
|
||||
Subject: [PATCH] ureport: allow multiple cert file in rhsm-entitlement dir
|
||||
|
||||
Thanks Martin Milata <mmilata@redhat.com>
|
||||
|
||||
https://bugzilla.redhat.com/show_bug.cgi?id=1140224#c6
|
||||
|
||||
Related to #1140224
|
||||
Fixes #296
|
||||
|
||||
Signed-off-by: Jakub Filak <jfilak@redhat.com>
|
||||
---
|
||||
src/lib/ureport.c | 54 +++++++++++++++++++++++-------------------------------
|
||||
1 file changed, 23 insertions(+), 31 deletions(-)
|
||||
|
||||
diff --git a/src/lib/ureport.c b/src/lib/ureport.c
|
||||
index 731b96c..3c7a935 100644
|
||||
--- a/src/lib/ureport.c
|
||||
+++ b/src/lib/ureport.c
|
||||
@@ -102,52 +102,44 @@ ureport_server_config_set_client_auth(struct ureport_server_config *config,
|
||||
ureport_server_config_set_url(config, xstrdup(RHSM_WEB_SERVICE_URL));
|
||||
|
||||
GList *certs = get_file_list(RHSMENT_PEM_DIR_PATH, "pem");
|
||||
- if (g_list_length(certs) != 2)
|
||||
+ if (g_list_length(certs) < 2)
|
||||
{
|
||||
+ g_list_free_full(certs, (GDestroyNotify)free_file_obj);
|
||||
+
|
||||
log_notice(RHSMENT_PEM_DIR_PATH" does not contain unique cert-key files pair");
|
||||
log_notice("Not using client authentication");
|
||||
return;
|
||||
}
|
||||
|
||||
- const char *cert = NULL;
|
||||
- const char *key = NULL;
|
||||
-
|
||||
- file_obj_t *fst = (file_obj_t *)certs->data;
|
||||
- file_obj_t *scn = (file_obj_t *)certs->next->data;
|
||||
-
|
||||
- if (strlen(fo_get_filename(fst)) < strlen(fo_get_filename(scn)))
|
||||
+ /* Use the last non-key file found. */
|
||||
+ file_obj_t *cert = NULL;
|
||||
+ for (GList *iter = certs; iter != NULL; iter = g_list_next(iter))
|
||||
{
|
||||
- cert = fo_get_filename(fst);
|
||||
- key = fo_get_filename(scn);
|
||||
+ file_obj_t *tmp = (file_obj_t *)iter->data;
|
||||
+ const char *file_name = fo_get_filename(tmp);
|
||||
|
||||
- config->ur_client_cert = xstrdup(fo_get_fullpath(fst));
|
||||
- config->ur_client_key = xstrdup(fo_get_fullpath(scn));
|
||||
+ if (suffixcmp(file_name, "-key"))
|
||||
+ cert = tmp;
|
||||
}
|
||||
- else
|
||||
+
|
||||
+ if (cert == NULL)
|
||||
{
|
||||
- cert = fo_get_filename(scn);
|
||||
- key = fo_get_filename(fst);
|
||||
+ g_list_free_full(certs, (GDestroyNotify)free_file_obj);
|
||||
|
||||
- config->ur_client_cert = xstrdup(fo_get_fullpath(scn));
|
||||
- config->ur_client_key = xstrdup(fo_get_fullpath(fst));
|
||||
+ log_notice(RHSMENT_PEM_DIR_PATH" contains only key files");
|
||||
+ log_notice("Not using client authentication");
|
||||
+ return;
|
||||
}
|
||||
|
||||
- const bool iscomplement = prefixcmp(key, cert) != 0 || strcmp("-key", key + strlen(cert)) != 0;
|
||||
- g_list_free_full(certs, (GDestroyNotify)free_file_obj);
|
||||
+ config->ur_client_cert = xstrdup(fo_get_fullpath(cert));
|
||||
+ /* Yes, the key file may not exists. I over took this code from
|
||||
+ * sos-uploader and they are pretty happy with this approach, so why
|
||||
+ * shouldn't we?. */
|
||||
+ config->ur_client_key = xasprintf("%s/%s-key.pem", RHSMENT_PEM_DIR_PATH, fo_get_filename(cert));
|
||||
|
||||
- if (iscomplement)
|
||||
- {
|
||||
- log_notice("Key file '%s' isn't complement to cert file '%s'",
|
||||
- config->ur_client_key, config->ur_client_cert);
|
||||
- log_notice("Not using client authentication");
|
||||
-
|
||||
- free(config->ur_client_cert);
|
||||
- free(config->ur_client_key);
|
||||
- config->ur_client_cert = NULL;
|
||||
- config->ur_client_key = NULL;
|
||||
+ log_debug("Using cert files: '%s' : '%s'", config->ur_client_cert, config->ur_client_key);
|
||||
|
||||
- return;
|
||||
- }
|
||||
+ g_list_free_full(certs, (GDestroyNotify)free_file_obj);
|
||||
|
||||
char *certdata = xmalloc_open_read_close(config->ur_client_cert, /*no size limit*/NULL);
|
||||
if (certdata != NULL)
|
||||
--
|
||||
2.1.0
|
||||
|
@ -1,84 +0,0 @@
|
||||
From c901c734ff5840ed3005f05af9711a7b20cc38fb Mon Sep 17 00:00:00 2001
|
||||
From: Jakub Filak <jfilak@redhat.com>
|
||||
Date: Wed, 22 Oct 2014 08:12:44 +0200
|
||||
Subject: [PATCH] ureport: use entit certs with 'rhsm' and drop
|
||||
'rhsm-entitlement'
|
||||
|
||||
/etc/pki/consumer certificates cannot be used for authentication in
|
||||
Strata. Martin Milata has correctly pointed out that it does not make
|
||||
sense to have both 'rhsm' and 'rhsm-entitlement' options.
|
||||
|
||||
Related #1140224
|
||||
|
||||
Signed-off-by: Jakub Filak <jfilak@redhat.com>
|
||||
---
|
||||
doc/reporter-ureport.txt | 6 ++----
|
||||
src/lib/ureport.c | 11 -----------
|
||||
src/plugins/ureport.conf | 4 +---
|
||||
3 files changed, 3 insertions(+), 18 deletions(-)
|
||||
|
||||
diff --git a/doc/reporter-ureport.txt b/doc/reporter-ureport.txt
|
||||
index f31dd45..a69c7ae 100644
|
||||
--- a/doc/reporter-ureport.txt
|
||||
+++ b/doc/reporter-ureport.txt
|
||||
@@ -35,10 +35,8 @@ Configuration file lines should have 'PARAM = VALUE' format. The parameters are:
|
||||
Possible values are:
|
||||
|
||||
'rhsm';;
|
||||
- Uses the system certificate that is used for Red Hat subscription management.
|
||||
-
|
||||
- 'rhsm-entitlement';;
|
||||
- Same as 'rhsm' but uses the V3 RHSM entitlement certificates.
|
||||
+ Uses the system V3 entitlement certificate that is used for Red Hat
|
||||
+ subscription management.
|
||||
|
||||
'puppet';;
|
||||
Uses the certificate that is used by the Puppet configuration management tool.
|
||||
diff --git a/src/lib/ureport.c b/src/lib/ureport.c
|
||||
index 3c7a935..d6c3ead 100644
|
||||
--- a/src/lib/ureport.c
|
||||
+++ b/src/lib/ureport.c
|
||||
@@ -31,9 +31,6 @@
|
||||
|
||||
#define RHSM_WEB_SERVICE_URL "https://api.access.redhat.com/rs/telemetry/abrt"
|
||||
|
||||
-#define RHSM_CERT_PATH "/etc/pki/consumer/cert.pem"
|
||||
-#define RHSM_KEY_PATH "/etc/pki/consumer/key.pem"
|
||||
-
|
||||
#define RHSMENT_PEM_DIR_PATH "/etc/pki/entitlement"
|
||||
#define RHSMENT_ENT_DATA_BEGIN_TAG "-----BEGIN ENTITLEMENT DATA-----"
|
||||
#define RHSMENT_ENT_DATA_END_TAG "-----END ENTITLEMENT DATA-----"
|
||||
@@ -93,14 +90,6 @@ ureport_server_config_set_client_auth(struct ureport_server_config *config,
|
||||
if (config->ur_url == NULL)
|
||||
ureport_server_config_set_url(config, xstrdup(RHSM_WEB_SERVICE_URL));
|
||||
|
||||
- config->ur_client_cert = xstrdup(RHSM_CERT_PATH);
|
||||
- config->ur_client_key = xstrdup(RHSM_KEY_PATH);
|
||||
- }
|
||||
- else if (strcmp(client_auth, "rhsm-entitlement") == 0)
|
||||
- {
|
||||
- if (config->ur_url == NULL)
|
||||
- ureport_server_config_set_url(config, xstrdup(RHSM_WEB_SERVICE_URL));
|
||||
-
|
||||
GList *certs = get_file_list(RHSMENT_PEM_DIR_PATH, "pem");
|
||||
if (g_list_length(certs) < 2)
|
||||
{
|
||||
diff --git a/src/plugins/ureport.conf b/src/plugins/ureport.conf
|
||||
index a3aa456..da00990 100644
|
||||
--- a/src/plugins/ureport.conf
|
||||
+++ b/src/plugins/ureport.conf
|
||||
@@ -22,10 +22,8 @@
|
||||
# 'IncludeAuthData' to 'yes'.
|
||||
# None (default):
|
||||
# SSLClientAuth =
|
||||
-# Using RH subscription management certificate:
|
||||
-# SSLClientAuth = rhsm
|
||||
# Using RH subscription management entitlement certificate:
|
||||
-# SSLClientAuth = rhsm-entitlement
|
||||
+# SSLClientAuth = rhsm
|
||||
# Using Puppet certificate:
|
||||
# SSLClientAuth = puppet
|
||||
# Using custom certificate:
|
||||
--
|
||||
2.1.0
|
||||
|
@ -1,106 +0,0 @@
|
||||
From 5abe5538f971ae33795e106af23b25e1d07ea1b0 Mon Sep 17 00:00:00 2001
|
||||
From: Jakub Filak <jfilak@redhat.com>
|
||||
Date: Wed, 22 Oct 2014 14:27:00 +0200
|
||||
Subject: [PATCH] ureport: get rhsm entitlement cert dir from rhsm conf
|
||||
|
||||
Related #1140224
|
||||
|
||||
Signed-off-by: Jakub Filak <jfilak@redhat.com>
|
||||
---
|
||||
src/lib/ureport.c | 46 +++++++++++++++++++++++++++++++++++++++++-----
|
||||
1 file changed, 41 insertions(+), 5 deletions(-)
|
||||
|
||||
diff --git a/src/lib/ureport.c b/src/lib/ureport.c
|
||||
index d6c3ead..83eb1b1 100644
|
||||
--- a/src/lib/ureport.c
|
||||
+++ b/src/lib/ureport.c
|
||||
@@ -31,7 +31,6 @@
|
||||
|
||||
#define RHSM_WEB_SERVICE_URL "https://api.access.redhat.com/rs/telemetry/abrt"
|
||||
|
||||
-#define RHSMENT_PEM_DIR_PATH "/etc/pki/entitlement"
|
||||
#define RHSMENT_ENT_DATA_BEGIN_TAG "-----BEGIN ENTITLEMENT DATA-----"
|
||||
#define RHSMENT_ENT_DATA_END_TAG "-----END ENTITLEMENT DATA-----"
|
||||
#define RHSMENT_SIG_DATA_BEGIN_TAG "-----BEGIN RSA SIGNATURE-----"
|
||||
@@ -68,6 +67,33 @@ ureport_server_config_set_url(struct ureport_server_config *config,
|
||||
config->ur_url = server_url;
|
||||
}
|
||||
|
||||
+static char *
|
||||
+rhsm_config_get_entitlement_cert_dir(void)
|
||||
+{
|
||||
+ char *result = getenv("LIBREPORT_DEBUG_RHSMENT_PEM_DIR_PATH");
|
||||
+ if (result != NULL)
|
||||
+ return xstrdup(result);
|
||||
+
|
||||
+ result = run_in_shell_and_save_output(0,
|
||||
+ "python -c \"from rhsm.config import initConfig; print(initConfig().get('rhsm', 'entitlementCertDir'))\"",
|
||||
+ NULL, NULL);
|
||||
+
|
||||
+ /* run_in_shell_and_save_output always returns non-NULL */
|
||||
+ if (result[0] != '/')
|
||||
+ goto error;
|
||||
+
|
||||
+ char *newline = strchrnul(result, '\n');
|
||||
+ if (!newline)
|
||||
+ goto error;
|
||||
+
|
||||
+ *newline = '\0';
|
||||
+ return result;
|
||||
+error:
|
||||
+ error_msg("Failed to get 'rhsm':'entitlementCertDir' from rhsm.config python module.");
|
||||
+ free(result);
|
||||
+ return NULL;
|
||||
+}
|
||||
+
|
||||
void
|
||||
ureport_server_config_set_client_auth(struct ureport_server_config *config,
|
||||
const char *client_auth)
|
||||
@@ -90,13 +116,21 @@ ureport_server_config_set_client_auth(struct ureport_server_config *config,
|
||||
if (config->ur_url == NULL)
|
||||
ureport_server_config_set_url(config, xstrdup(RHSM_WEB_SERVICE_URL));
|
||||
|
||||
- GList *certs = get_file_list(RHSMENT_PEM_DIR_PATH, "pem");
|
||||
+ char *rhsm_dir = rhsm_config_get_entitlement_cert_dir();
|
||||
+ if (rhsm_dir == NULL)
|
||||
+ {
|
||||
+ log_notice("Not using client authentication");
|
||||
+ return;
|
||||
+ }
|
||||
+
|
||||
+ GList *certs = get_file_list(rhsm_dir, "pem");
|
||||
if (g_list_length(certs) < 2)
|
||||
{
|
||||
g_list_free_full(certs, (GDestroyNotify)free_file_obj);
|
||||
|
||||
- log_notice(RHSMENT_PEM_DIR_PATH" does not contain unique cert-key files pair");
|
||||
+ log_notice("'%s' does not contain a cert-key files pair", rhsm_dir);
|
||||
log_notice("Not using client authentication");
|
||||
+ free(rhsm_dir);
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -115,8 +149,9 @@ ureport_server_config_set_client_auth(struct ureport_server_config *config,
|
||||
{
|
||||
g_list_free_full(certs, (GDestroyNotify)free_file_obj);
|
||||
|
||||
- log_notice(RHSMENT_PEM_DIR_PATH" contains only key files");
|
||||
+ log_notice("'%s' does not contain a cert file (only keys)", rhsm_dir);
|
||||
log_notice("Not using client authentication");
|
||||
+ free(rhsm_dir);
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -124,7 +159,8 @@ ureport_server_config_set_client_auth(struct ureport_server_config *config,
|
||||
/* Yes, the key file may not exists. I over took this code from
|
||||
* sos-uploader and they are pretty happy with this approach, so why
|
||||
* shouldn't we?. */
|
||||
- config->ur_client_key = xasprintf("%s/%s-key.pem", RHSMENT_PEM_DIR_PATH, fo_get_filename(cert));
|
||||
+ config->ur_client_key = xasprintf("%s/%s-key.pem", rhsm_dir, fo_get_filename(cert));
|
||||
+ free(rhsm_dir);
|
||||
|
||||
log_debug("Using cert files: '%s' : '%s'", config->ur_client_cert, config->ur_client_key);
|
||||
|
||||
--
|
||||
2.1.0
|
||||
|
@ -1,78 +0,0 @@
|
||||
From 3461f0e3d59e051da6507b1a1ac2530067c7f02b Mon Sep 17 00:00:00 2001
|
||||
From: Jakub Filak <jfilak@redhat.com>
|
||||
Date: Wed, 22 Oct 2014 09:16:48 +0200
|
||||
Subject: [PATCH] ureport: consistently die on all client auth errors
|
||||
|
||||
Related #1140224
|
||||
|
||||
Signed-off-by: Jakub Filak <jfilak@redhat.com>
|
||||
---
|
||||
src/lib/ureport.c | 25 ++++---------------------
|
||||
1 file changed, 4 insertions(+), 21 deletions(-)
|
||||
|
||||
diff --git a/src/lib/ureport.c b/src/lib/ureport.c
|
||||
index 83eb1b1..d39709d 100644
|
||||
--- a/src/lib/ureport.c
|
||||
+++ b/src/lib/ureport.c
|
||||
@@ -89,9 +89,8 @@ rhsm_config_get_entitlement_cert_dir(void)
|
||||
*newline = '\0';
|
||||
return result;
|
||||
error:
|
||||
- error_msg("Failed to get 'rhsm':'entitlementCertDir' from rhsm.config python module.");
|
||||
free(result);
|
||||
- return NULL;
|
||||
+ error_msg_and_die("Failed to get 'rhsm':'entitlementCertDir' from rhsm.config python module.");
|
||||
}
|
||||
|
||||
void
|
||||
@@ -117,21 +116,12 @@ ureport_server_config_set_client_auth(struct ureport_server_config *config,
|
||||
ureport_server_config_set_url(config, xstrdup(RHSM_WEB_SERVICE_URL));
|
||||
|
||||
char *rhsm_dir = rhsm_config_get_entitlement_cert_dir();
|
||||
- if (rhsm_dir == NULL)
|
||||
- {
|
||||
- log_notice("Not using client authentication");
|
||||
- return;
|
||||
- }
|
||||
|
||||
GList *certs = get_file_list(rhsm_dir, "pem");
|
||||
if (g_list_length(certs) < 2)
|
||||
{
|
||||
g_list_free_full(certs, (GDestroyNotify)free_file_obj);
|
||||
-
|
||||
- log_notice("'%s' does not contain a cert-key files pair", rhsm_dir);
|
||||
- log_notice("Not using client authentication");
|
||||
- free(rhsm_dir);
|
||||
- return;
|
||||
+ error_msg_and_die("'%s' does not contain a cert-key files pair", rhsm_dir);
|
||||
}
|
||||
|
||||
/* Use the last non-key file found. */
|
||||
@@ -148,11 +138,7 @@ ureport_server_config_set_client_auth(struct ureport_server_config *config,
|
||||
if (cert == NULL)
|
||||
{
|
||||
g_list_free_full(certs, (GDestroyNotify)free_file_obj);
|
||||
-
|
||||
- log_notice("'%s' does not contain a cert file (only keys)", rhsm_dir);
|
||||
- log_notice("Not using client authentication");
|
||||
- free(rhsm_dir);
|
||||
- return;
|
||||
+ error_msg_and_die("'%s' does not contain a cert file (only keys)", rhsm_dir);
|
||||
}
|
||||
|
||||
config->ur_client_cert = xstrdup(fo_get_fullpath(cert));
|
||||
@@ -188,10 +174,7 @@ ureport_server_config_set_client_auth(struct ureport_server_config *config,
|
||||
xasprintf(RHSMENT_SIG_DATA_BEGIN_TAG"%s"RHSMENT_SIG_DATA_END_TAG, sig_data));
|
||||
}
|
||||
else
|
||||
- {
|
||||
- log_notice("Cert file '%s' doesn't contain Entitlement and RSA Signature sections", config->ur_client_cert);
|
||||
- log_notice("Not using HTTP authentication headers");
|
||||
- }
|
||||
+ error_msg_and_die("Cert file '%s' doesn't contain Entitlement and RSA Signature sections", config->ur_client_cert);
|
||||
|
||||
free(sig_data);
|
||||
free(ent_data);
|
||||
--
|
||||
2.1.0
|
||||
|
@ -1,57 +0,0 @@
|
||||
From 7f97600ab8f814fb8446536b9708ddb90b576284 Mon Sep 17 00:00:00 2001
|
||||
From: Jakub Filak <jfilak@redhat.com>
|
||||
Date: Wed, 22 Oct 2014 10:21:07 +0200
|
||||
Subject: [PATCH] rhtsupport: never use uReport URL from ureport.config
|
||||
|
||||
The GUI reporter always export uReport_URL, thus reporter-rhtsupport
|
||||
never use the Strata URL.
|
||||
|
||||
Moreover, usage of uReport_URL is really bad idea, because a reporter
|
||||
thinks he is going to send data to the portal but the ureport might end
|
||||
somewhere else.
|
||||
|
||||
Related #1139987
|
||||
|
||||
Signed-off-by: Jakub Filak <jfilak@redhat.com>
|
||||
---
|
||||
src/plugins/reporter-rhtsupport.c | 24 ++++++++++++------------
|
||||
1 file changed, 12 insertions(+), 12 deletions(-)
|
||||
|
||||
diff --git a/src/plugins/reporter-rhtsupport.c b/src/plugins/reporter-rhtsupport.c
|
||||
index 9a1f392..4b74c5c 100644
|
||||
--- a/src/plugins/reporter-rhtsupport.c
|
||||
+++ b/src/plugins/reporter-rhtsupport.c
|
||||
@@ -383,18 +383,18 @@ void prepare_ureport_configuration(const char *urcfile,
|
||||
load_conf_file(urcfile, settings, false);
|
||||
ureport_server_config_init(urconf);
|
||||
|
||||
- char *url = NULL;
|
||||
- UREPORT_OPTION_VALUE_FROM_CONF(settings, "URL", url, xstrdup);
|
||||
- if (url == NULL)
|
||||
- {
|
||||
- ureport_server_config_set_url(urconf, concat_path_file(portal_url, "/telemetry/abrt"));
|
||||
- urconf->ur_ssl_verify = ssl_verify;
|
||||
- }
|
||||
- else
|
||||
- {
|
||||
- ureport_server_config_set_url(urconf, url);
|
||||
- UREPORT_OPTION_VALUE_FROM_CONF(settings, "SSLVerify", urconf->ur_ssl_verify, string_to_bool);
|
||||
- }
|
||||
+ /* The following lines cause that we always use URL from ureport's
|
||||
+ * configuration becuase the GUI reporter always exports uReport_URL env
|
||||
+ * var.
|
||||
+ *
|
||||
+ * char *url = NULL;
|
||||
+ * UREPORT_OPTION_VALUE_FROM_CONF(settings, "URL", url, xstrdup);
|
||||
+ * if (url != NULL)
|
||||
+ * ureport_server_config_set_url(urconf, url);
|
||||
+ */
|
||||
+
|
||||
+ ureport_server_config_set_url(urconf, concat_path_file(portal_url, "/telemetry/abrt"));
|
||||
+ urconf->ur_ssl_verify = ssl_verify;
|
||||
|
||||
ureport_server_config_set_basic_auth(urconf, login, password);
|
||||
|
||||
--
|
||||
2.1.0
|
||||
|
@ -1,53 +0,0 @@
|
||||
From 256a8e48db14512357f8e1412018a88b3003bbce Mon Sep 17 00:00:00 2001
|
||||
From: Jakub Filak <jfilak@redhat.com>
|
||||
Date: Wed, 22 Oct 2014 11:09:43 +0200
|
||||
Subject: [PATCH] rhtsupport: do not leak the hints results
|
||||
|
||||
The leak was introduced in commit
|
||||
5ff7f36c1a06f5317241b43999f4f03a21594c79
|
||||
|
||||
Related to rhbz#1139987
|
||||
|
||||
Signed-off-by: Jakub Filak <jfilak@redhat.com>
|
||||
---
|
||||
src/plugins/reporter-rhtsupport.c | 13 +++++++++----
|
||||
1 file changed, 9 insertions(+), 4 deletions(-)
|
||||
|
||||
diff --git a/src/plugins/reporter-rhtsupport.c b/src/plugins/reporter-rhtsupport.c
|
||||
index 4b74c5c..add0d6b 100644
|
||||
--- a/src/plugins/reporter-rhtsupport.c
|
||||
+++ b/src/plugins/reporter-rhtsupport.c
|
||||
@@ -275,6 +275,7 @@ void attach_to_ureport(struct ureport_server_config *conf,
|
||||
static
|
||||
bool check_for_hints(const char *url, char **login, char **password, bool ssl_verify, const char *tempfile)
|
||||
{
|
||||
+ bool retval = false;
|
||||
rhts_result_t *result = NULL;
|
||||
|
||||
INVALID_CREDENTIALS_LOOP((*login), (*password),
|
||||
@@ -317,14 +318,18 @@ bool check_for_hints(const char *url, char **login, char **password, bool ssl_ve
|
||||
hint = append_to_malloced_string(hint,
|
||||
_("Do you still want to create a RHTSupport ticket?")
|
||||
);
|
||||
- int create_ticket = ask_yes_no(hint);
|
||||
+
|
||||
+ /*
|
||||
+ * 'Yes' to the create ticket question means no hints were found.
|
||||
+ */
|
||||
+ retval = !ask_yes_no(hint);
|
||||
+
|
||||
free(hint);
|
||||
- if (!create_ticket)
|
||||
- return true;
|
||||
}
|
||||
}
|
||||
+
|
||||
free_rhts_result(result);
|
||||
- return false;
|
||||
+ return retval;
|
||||
}
|
||||
|
||||
static
|
||||
--
|
||||
2.1.0
|
||||
|
@ -1,42 +0,0 @@
|
||||
From 323ddb510c031a631ba294fc549b22a83d4159bb Mon Sep 17 00:00:00 2001
|
||||
From: Jakub Filak <jfilak@redhat.com>
|
||||
Date: Thu, 23 Oct 2014 11:30:14 +0200
|
||||
Subject: [PATCH] ureport: fall back to the hardcoded rhsm cert dir
|
||||
|
||||
This commit adds a fallback execution path for cases where getting the
|
||||
rhsm entitlement dir path via an execution of python from the
|
||||
librepor-web library fails for any reason.
|
||||
|
||||
See commit 2b20c9f91342da7744ae40ee623735ab95f83219
|
||||
Related #1140224
|
||||
|
||||
Signed-off-by: Jakub Filak <jfilak@redhat.com>
|
||||
---
|
||||
src/lib/ureport.c | 4 +++-
|
||||
1 file changed, 3 insertions(+), 1 deletion(-)
|
||||
|
||||
diff --git a/src/lib/ureport.c b/src/lib/ureport.c
|
||||
index d39709d..868bb4f 100644
|
||||
--- a/src/lib/ureport.c
|
||||
+++ b/src/lib/ureport.c
|
||||
@@ -31,6 +31,7 @@
|
||||
|
||||
#define RHSM_WEB_SERVICE_URL "https://api.access.redhat.com/rs/telemetry/abrt"
|
||||
|
||||
+#define RHSMENT_PEM_DIR_PATH "/etc/pki/entitlement"
|
||||
#define RHSMENT_ENT_DATA_BEGIN_TAG "-----BEGIN ENTITLEMENT DATA-----"
|
||||
#define RHSMENT_ENT_DATA_END_TAG "-----END ENTITLEMENT DATA-----"
|
||||
#define RHSMENT_SIG_DATA_BEGIN_TAG "-----BEGIN RSA SIGNATURE-----"
|
||||
@@ -90,7 +91,8 @@ rhsm_config_get_entitlement_cert_dir(void)
|
||||
return result;
|
||||
error:
|
||||
free(result);
|
||||
- error_msg_and_die("Failed to get 'rhsm':'entitlementCertDir' from rhsm.config python module.");
|
||||
+ error_msg("Failed to get 'rhsm':'entitlementCertDir' from rhsm.config python module. Using "RHSMENT_PEM_DIR_PATH);
|
||||
+ return xstrdup(RHSMENT_PEM_DIR_PATH);
|
||||
}
|
||||
|
||||
void
|
||||
--
|
||||
2.1.0
|
||||
|
@ -1,41 +0,0 @@
|
||||
From 49651673afe704d5911ba29404390958dbc7ee05 Mon Sep 17 00:00:00 2001
|
||||
From: Matej Habrnal <mhabrnal@redhat.com>
|
||||
Date: Wed, 22 Oct 2014 01:32:33 +0200
|
||||
Subject: [PATCH] ureport: wrong description of two functions in ureport.h
|
||||
|
||||
Changed wrong description of function ureport_attach_string and
|
||||
ureport_attach_int. Both of these functions returns True in case of any error
|
||||
(not False).
|
||||
|
||||
fixes #298
|
||||
|
||||
Signed-off-by: Matej Habrnal <mhabrnal@redhat.com>
|
||||
---
|
||||
src/include/ureport.h | 4 ++--
|
||||
1 file changed, 2 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/src/include/ureport.h b/src/include/ureport.h
|
||||
index 104e8d0..852ee0e 100644
|
||||
--- a/src/include/ureport.h
|
||||
+++ b/src/include/ureport.h
|
||||
@@ -233,7 +233,7 @@ ureport_json_attachment_new(const char *bthash, const char *type, const char *da
|
||||
* @param type Type of attachment
|
||||
* @param data Attached data
|
||||
* @param config Configuration used in communication
|
||||
- * @return False in case of any error; otherwise True
|
||||
+ * @return True in case of any error; otherwise False
|
||||
*/
|
||||
#define ureport_attach_string libreport_ureport_attach_string
|
||||
bool
|
||||
@@ -247,7 +247,7 @@ ureport_attach_string(const char *bthash, const char *type, const char *data,
|
||||
* @param type Type of attachment
|
||||
* @param data Attached data
|
||||
* @param config Configuration used in communication
|
||||
- * @return False in case of any error; otherwise True
|
||||
+ * @return True in case of any error; otherwise False
|
||||
*/
|
||||
#define ureport_attach_int libreport_ureport_attach_int
|
||||
bool
|
||||
--
|
||||
2.1.0
|
||||
|
@ -1,27 +0,0 @@
|
||||
From 70f0b9bbfb297cdcd1eb56162d9cbe9ca832f84f Mon Sep 17 00:00:00 2001
|
||||
From: Jakub Filak <jfilak@redhat.com>
|
||||
Date: Fri, 31 Oct 2014 09:27:33 +0100
|
||||
Subject: [PATCH] ureport: fix a memory leak related to AuthDataItems
|
||||
|
||||
Related to rhbz#1139557
|
||||
|
||||
Signed-off-by: Jakub Filak <jfilak@redhat.com>
|
||||
---
|
||||
src/lib/ureport.c | 1 +
|
||||
1 file changed, 1 insertion(+)
|
||||
|
||||
diff --git a/src/lib/ureport.c b/src/lib/ureport.c
|
||||
index 868bb4f..9c007fe 100644
|
||||
--- a/src/lib/ureport.c
|
||||
+++ b/src/lib/ureport.c
|
||||
@@ -640,6 +640,7 @@ ureport_from_dump_dir_ext(const char *dump_dir_path, const struct ureport_prefer
|
||||
}
|
||||
|
||||
sr_report_add_auth(report, key, value);
|
||||
+ free(value);
|
||||
}
|
||||
|
||||
dd_close(dd);
|
||||
--
|
||||
2.1.0
|
||||
|
@ -1,31 +0,0 @@
|
||||
From d4dfba834acb573a5040c0a26a07d59f59551214 Mon Sep 17 00:00:00 2001
|
||||
From: Martin Milata <mmilata@redhat.com>
|
||||
Date: Mon, 3 Nov 2014 12:26:01 +0100
|
||||
Subject: [PATCH] doc: fix asciidoc misrendering
|
||||
|
||||
http://www.methods.co.nz/asciidoc/chunked/ch21.html#X77
|
||||
|
||||
Signed-off-by: Martin Milata <mmilata@redhat.com>
|
||||
---
|
||||
doc/reporter-upload.txt | 4 ++--
|
||||
1 file changed, 2 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/doc/reporter-upload.txt b/doc/reporter-upload.txt
|
||||
index 40a8694..8acf798 100644
|
||||
--- a/doc/reporter-upload.txt
|
||||
+++ b/doc/reporter-upload.txt
|
||||
@@ -54,9 +54,9 @@ OPTIONS
|
||||
|
||||
-u URL::
|
||||
The URL where tarball should be uploaded.
|
||||
- URL should have form protocol://[user[:pass]@]host/dir/[file.tar.gz]
|
||||
+ URL should have the form protocol://[user[:pass]@]host/dir/[file.tar.gz]
|
||||
where protocol can be http(s), ftp, scp, or file.
|
||||
- File protocol can't have user and host parts: file:///dir/[file.tar.gz].
|
||||
+ File protocol can't have user and host parts: pass:[file:///dir/[file.tar.gz]].
|
||||
If URL ends with a slash, the archive name will be generated and appended
|
||||
to URL; otherwise, URL will be used as full file name.
|
||||
|
||||
--
|
||||
2.1.0
|
||||
|
@ -1,26 +0,0 @@
|
||||
From 6ccff130d77158005128cbf6c00267f8a386a5a2 Mon Sep 17 00:00:00 2001
|
||||
From: Martin Milata <mmilata@redhat.com>
|
||||
Date: Tue, 4 Nov 2014 16:22:41 +0100
|
||||
Subject: [PATCH] testsuite: add tests/ureport/ to EXTRA_DIST
|
||||
|
||||
Otherwise make rpm fails.
|
||||
---
|
||||
tests/Makefile.am | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/tests/Makefile.am b/tests/Makefile.am
|
||||
index cda9375..1cfc206 100644
|
||||
--- a/tests/Makefile.am
|
||||
+++ b/tests/Makefile.am
|
||||
@@ -49,7 +49,7 @@ TESTSUITE = $(srcdir)/testsuite
|
||||
MAINTAINERCLEANFILES = Makefile.in $(TESTSUITE)
|
||||
check_DATA = atconfig atlocal $(TESTSUITE)
|
||||
DISTCLEANFILES = atconfig
|
||||
-EXTRA_DIST += atlocal.in conf
|
||||
+EXTRA_DIST += atlocal.in conf ureport
|
||||
|
||||
atconfig: $(top_builddir)/config.status
|
||||
(cd ${top_builddir} && ./config.status ${subdir}/atconfig)
|
||||
--
|
||||
2.1.0
|
||||
|
@ -1,32 +0,0 @@
|
||||
From fb554038d9bc692d99fbd6eace61979dc48a8b93 Mon Sep 17 00:00:00 2001
|
||||
From: Jakub Filak <jfilak@redhat.com>
|
||||
Date: Mon, 3 Nov 2014 15:51:32 +0100
|
||||
Subject: [PATCH] ureport: use 'rhsm' ssl client auth by default
|
||||
|
||||
libreport used to be configured to use 'rhsm' by default and I (Jakub
|
||||
Filak <jfilak@redhat.com>) inappropriately changed it to no ssl
|
||||
client auth in commit 4f61f5d9eec75e471c8176dac0c21f4361e40ee6
|
||||
|
||||
Related to rhbz#1140224
|
||||
|
||||
Signed-off-by: Jakub Filak <jfilak@redhat.com>
|
||||
---
|
||||
src/plugins/ureport.conf | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/src/plugins/ureport.conf b/src/plugins/ureport.conf
|
||||
index da00990..75c4893 100644
|
||||
--- a/src/plugins/ureport.conf
|
||||
+++ b/src/plugins/ureport.conf
|
||||
@@ -23,7 +23,7 @@
|
||||
# None (default):
|
||||
# SSLClientAuth =
|
||||
# Using RH subscription management entitlement certificate:
|
||||
-# SSLClientAuth = rhsm
|
||||
+SSLClientAuth = rhsm
|
||||
# Using Puppet certificate:
|
||||
# SSLClientAuth = puppet
|
||||
# Using custom certificate:
|
||||
--
|
||||
2.1.0
|
||||
|
@ -1,35 +0,0 @@
|
||||
From 07118b21e400670b91093cafc677395fc59b88b4 Mon Sep 17 00:00:00 2001
|
||||
From: Jakub Filak <jfilak@redhat.com>
|
||||
Date: Mon, 3 Nov 2014 15:59:26 +0100
|
||||
Subject: [PATCH] ureport: be able to configure ContactEmail from GUI
|
||||
|
||||
reporter-rhtsupport reads uReport_ContactEmail configuration option
|
||||
before attaching the contact email to uReport. It is likely that users
|
||||
will run the reporter from the GUI, so they must be able to configure
|
||||
the reporter from the GUI too.
|
||||
|
||||
Related to rhbz#1150388
|
||||
|
||||
Signed-off-by: Jakub Filak <jfilak@redhat.com>
|
||||
---
|
||||
src/plugins/report_uReport.xml.in | 4 ++++
|
||||
1 file changed, 4 insertions(+)
|
||||
|
||||
diff --git a/src/plugins/report_uReport.xml.in b/src/plugins/report_uReport.xml.in
|
||||
index a02f484..1147880 100644
|
||||
--- a/src/plugins/report_uReport.xml.in
|
||||
+++ b/src/plugins/report_uReport.xml.in
|
||||
@@ -20,6 +20,10 @@
|
||||
<_note-html>Adds your Bugzilla login to CC List of already reported bugs.</_note-html>
|
||||
<default-value>yes</default-value>
|
||||
</option>
|
||||
+ <option type="text" name="uReport_ContactEmail">
|
||||
+ <_label>Contact email address</_label>
|
||||
+ <_description>Email address that can be used by ABRT server to inform you about news and updates</_description>
|
||||
+ </option>
|
||||
<option type="bool" name="uReport_SSLVerify">
|
||||
<_label>Verify SSL</_label>
|
||||
<_description>Check SSL key validity</_description>
|
||||
--
|
||||
2.1.0
|
||||
|
@ -1,34 +0,0 @@
|
||||
From f019d1d37bbd9723bddc2637283c3601fae6f79b Mon Sep 17 00:00:00 2001
|
||||
From: Jakub Filak <jfilak@redhat.com>
|
||||
Date: Mon, 3 Nov 2014 16:07:28 +0100
|
||||
Subject: [PATCH] rhtsupport: be able to turn uReport off from GUI
|
||||
|
||||
Expose SubmitUReport configuration option in the GUI configuration.
|
||||
Users should be able to configure entire reporting process from GUI.
|
||||
|
||||
Related to rhbz#1139987
|
||||
|
||||
Signed-off-by: Jakub Filak <jfilak@redhat.com>
|
||||
---
|
||||
src/plugins/report_RHTSupport.xml.in | 5 +++++
|
||||
1 file changed, 5 insertions(+)
|
||||
|
||||
diff --git a/src/plugins/report_RHTSupport.xml.in b/src/plugins/report_RHTSupport.xml.in
|
||||
index e040d8f..4efc4dc 100644
|
||||
--- a/src/plugins/report_RHTSupport.xml.in
|
||||
+++ b/src/plugins/report_RHTSupport.xml.in
|
||||
@@ -34,6 +34,11 @@
|
||||
<default-value>yes</default-value>
|
||||
</option>
|
||||
<advanced-options>
|
||||
+ <option type="bool" name="RHTSupport_SubmitUReport">
|
||||
+ <_label>Submit uReport</_label>
|
||||
+ <_note-html>Submit <a href="https://access.redhat.com/articles/642323">micro-report</a> when creating a new case. </_note-html>
|
||||
+ <default-value>yes</default-value>
|
||||
+ </option>
|
||||
<option type="text" name="http_proxy">
|
||||
<_label>HTTP Proxy</_label>
|
||||
<allow-empty>yes</allow-empty>
|
||||
--
|
||||
2.1.0
|
||||
|
@ -1,53 +0,0 @@
|
||||
From 1bf4d7cee7aaeeb777b7244f441fb4c603864e48 Mon Sep 17 00:00:00 2001
|
||||
From: Jakub Filak <jfilak@redhat.com>
|
||||
Date: Mon, 3 Nov 2014 16:15:45 +0100
|
||||
Subject: [PATCH] rhtsupport: move RH Portal URL c. o. to Advanced section
|
||||
|
||||
It is unlikely that a regular user will ever want to edit that
|
||||
configuration option.
|
||||
|
||||
Related to rhbz#1139987
|
||||
|
||||
Signed-off-by: Jakub Filak <jfilak@redhat.com>
|
||||
|
||||
Conflicts:
|
||||
src/plugins/report_RHTSupport.xml.in
|
||||
---
|
||||
src/plugins/report_RHTSupport.xml.in | 14 ++++++++------
|
||||
1 file changed, 8 insertions(+), 6 deletions(-)
|
||||
|
||||
diff --git a/src/plugins/report_RHTSupport.xml.in b/src/plugins/report_RHTSupport.xml.in
|
||||
index 4efc4dc..a612a1e 100644
|
||||
--- a/src/plugins/report_RHTSupport.xml.in
|
||||
+++ b/src/plugins/report_RHTSupport.xml.in
|
||||
@@ -12,12 +12,8 @@
|
||||
<gui-review-elements>yes</gui-review-elements>
|
||||
|
||||
<options>
|
||||
- <option type="text" name="RHTSupport_URL">
|
||||
- <_label>RH Portal URL</_label>
|
||||
- <allow-empty>no</allow-empty>
|
||||
- <_description>Address of the Red Hat support portal</_description>
|
||||
- <default-value>https://api.access.redhat.com/rs</default-value>
|
||||
- </option>
|
||||
+ <import-event-options event="report_uReport"/>
|
||||
+
|
||||
<option type="text" name="RHTSupport_Login">
|
||||
<_label>Username</_label>
|
||||
<_description>Red Hat customer user name</_description>
|
||||
@@ -39,6 +35,12 @@
|
||||
<_note-html>Submit <a href="https://access.redhat.com/articles/642323">micro-report</a> when creating a new case. </_note-html>
|
||||
<default-value>yes</default-value>
|
||||
</option>
|
||||
+ <option type="text" name="RHTSupport_URL">
|
||||
+ <_label>RH Portal URL</_label>
|
||||
+ <allow-empty>no</allow-empty>
|
||||
+ <_description>Address of the Red Hat support portal</_description>
|
||||
+ <default-value>https://api.access.redhat.com/rs</default-value>
|
||||
+ </option>
|
||||
<option type="text" name="http_proxy">
|
||||
<_label>HTTP Proxy</_label>
|
||||
<allow-empty>yes</allow-empty>
|
||||
--
|
||||
2.1.0
|
||||
|
@ -1,75 +0,0 @@
|
||||
From 1b3cc8824c6143ae9863e70d4f3d9a2050682f60 Mon Sep 17 00:00:00 2001
|
||||
From: Jakub Filak <jfilak@redhat.com>
|
||||
Date: Tue, 4 Nov 2014 09:14:43 +0100
|
||||
Subject: [PATCH] Revert "ureport: consistently die on all client auth errors"
|
||||
|
||||
This reverts commit fca34b5620a6213e1d191bcb99e8757f34bbe0a5.
|
||||
|
||||
Related #1140224
|
||||
|
||||
Signed-off-by: Jakub Filak <jfilak@redhat.com>
|
||||
---
|
||||
src/lib/ureport.c | 28 +++++++++++++++++++++++++---
|
||||
1 file changed, 25 insertions(+), 3 deletions(-)
|
||||
|
||||
diff --git a/src/lib/ureport.c b/src/lib/ureport.c
|
||||
index 9c007fe..3a9dbe3 100644
|
||||
--- a/src/lib/ureport.c
|
||||
+++ b/src/lib/ureport.c
|
||||
@@ -118,12 +118,21 @@ ureport_server_config_set_client_auth(struct ureport_server_config *config,
|
||||
ureport_server_config_set_url(config, xstrdup(RHSM_WEB_SERVICE_URL));
|
||||
|
||||
char *rhsm_dir = rhsm_config_get_entitlement_cert_dir();
|
||||
+ if (rhsm_dir == NULL)
|
||||
+ {
|
||||
+ log_notice("Not using client authentication");
|
||||
+ return;
|
||||
+ }
|
||||
|
||||
GList *certs = get_file_list(rhsm_dir, "pem");
|
||||
if (g_list_length(certs) < 2)
|
||||
{
|
||||
g_list_free_full(certs, (GDestroyNotify)free_file_obj);
|
||||
- error_msg_and_die("'%s' does not contain a cert-key files pair", rhsm_dir);
|
||||
+
|
||||
+ log_notice("'%s' does not contain a cert-key files pair", rhsm_dir);
|
||||
+ log_notice("Not using client authentication");
|
||||
+ free(rhsm_dir);
|
||||
+ return;
|
||||
}
|
||||
|
||||
/* Use the last non-key file found. */
|
||||
@@ -140,7 +149,11 @@ ureport_server_config_set_client_auth(struct ureport_server_config *config,
|
||||
if (cert == NULL)
|
||||
{
|
||||
g_list_free_full(certs, (GDestroyNotify)free_file_obj);
|
||||
- error_msg_and_die("'%s' does not contain a cert file (only keys)", rhsm_dir);
|
||||
+
|
||||
+ log_notice("'%s' does not contain a cert file (only keys)", rhsm_dir);
|
||||
+ log_notice("Not using client authentication");
|
||||
+ free(rhsm_dir);
|
||||
+ return;
|
||||
}
|
||||
|
||||
config->ur_client_cert = xstrdup(fo_get_fullpath(cert));
|
||||
@@ -176,7 +189,16 @@ ureport_server_config_set_client_auth(struct ureport_server_config *config,
|
||||
xasprintf(RHSMENT_SIG_DATA_BEGIN_TAG"%s"RHSMENT_SIG_DATA_END_TAG, sig_data));
|
||||
}
|
||||
else
|
||||
- error_msg_and_die("Cert file '%s' doesn't contain Entitlement and RSA Signature sections", config->ur_client_cert);
|
||||
+ {
|
||||
+ log_notice("Cert file '%s' doesn't contain Entitlement and RSA Signature sections", config->ur_client_cert);
|
||||
+ log_notice("Not using client authentication");
|
||||
+
|
||||
+ free(config->ur_client_cert);
|
||||
+ config->ur_client_cert = NULL;
|
||||
+
|
||||
+ free(config->ur_client_key);
|
||||
+ config->ur_client_key = NULL;
|
||||
+ }
|
||||
|
||||
free(sig_data);
|
||||
free(ent_data);
|
||||
--
|
||||
2.1.0
|
||||
|
@ -1,137 +0,0 @@
|
||||
From 5a60e11298020e04b17160edbd9d575055ecb643 Mon Sep 17 00:00:00 2001
|
||||
From: Jakub Filak <jfilak@redhat.com>
|
||||
Date: Tue, 4 Nov 2014 15:29:06 +0100
|
||||
Subject: [PATCH] testsuite: do not expected ureport exiting on rhsm cert
|
||||
errors
|
||||
|
||||
Related #1140224
|
||||
|
||||
Signed-off-by: Jakub Filak <jfilak@redhat.com>
|
||||
---
|
||||
tests/ureport.at | 66 ++++++++++++++++++++++++++++++++++++++++++--------------
|
||||
1 file changed, 50 insertions(+), 16 deletions(-)
|
||||
|
||||
diff --git a/tests/ureport.at b/tests/ureport.at
|
||||
index 22d34e9..76e2f7a 100644
|
||||
--- a/tests/ureport.at
|
||||
+++ b/tests/ureport.at
|
||||
@@ -339,12 +339,24 @@ void set_ureport_server_config(struct ureport_server_config *config,
|
||||
|
||||
void my_assert(const char *str1, const char *str2)
|
||||
{
|
||||
- if (str1 == NULL || str2 == NULL)
|
||||
- assert( str1 == NULL && str2 == NULL );
|
||||
- else
|
||||
- assert(strcmp(str1, str2) == 0);
|
||||
+ if (str1 == str2)
|
||||
+ return;
|
||||
|
||||
- return;
|
||||
+ if (str1 == NULL && str2 != NULL)
|
||||
+ {
|
||||
+ fprintf(stderr, "Assertion failed: NULL == '%s'\n", str2);
|
||||
+ abort();
|
||||
+ }
|
||||
+ else if (str1 != NULL && str2 == NULL)
|
||||
+ {
|
||||
+ fprintf(stderr, "Assertion failed: '%s' == NULL\n", str1);
|
||||
+ abort();
|
||||
+ }
|
||||
+ else if (strcmp(str1, str2) != 0)
|
||||
+ {
|
||||
+ fprintf(stderr, "Assertion failed: '%s' == '%s'\n", str1, str2);
|
||||
+ abort();
|
||||
+ }
|
||||
}
|
||||
|
||||
void assert_ureport_server_config(struct ureport_server_config *config,
|
||||
@@ -365,8 +377,10 @@ void assert_ureport_server_config(struct ureport_server_config *config,
|
||||
return;
|
||||
}
|
||||
|
||||
-int test_ureport_server_config_set_client_auth_exit_code(struct ureport_server_config *config,
|
||||
- const char *client_auth)
|
||||
+int test_ureport_server_config_set_client_auth_exit_code_ext(struct ureport_server_config *config,
|
||||
+ const char *client_auth,
|
||||
+ const char *cert_file,
|
||||
+ const char *key_file)
|
||||
{
|
||||
ureport_server_config_init(config);
|
||||
|
||||
@@ -380,6 +394,8 @@ int test_ureport_server_config_set_client_auth_exit_code(struct ureport_server_c
|
||||
if (pid == 0)
|
||||
{
|
||||
ureport_server_config_set_client_auth(config, client_auth);
|
||||
+ assert((cert_file == (void *)-1) || (cert_file == NULL && config->ur_client_cert == NULL) || (strcmp(cert_file, config->ur_client_cert) == 0));
|
||||
+ assert((key_file == (void *)-1) || (key_file == NULL && config->ur_client_cert == NULL) || (strcmp(key_file, config->ur_client_key) == 0));
|
||||
exit(0);
|
||||
}
|
||||
int status;
|
||||
@@ -390,6 +406,12 @@ int test_ureport_server_config_set_client_auth_exit_code(struct ureport_server_c
|
||||
return status;
|
||||
}
|
||||
|
||||
+int test_ureport_server_config_set_client_auth_exit_code(struct ureport_server_config *config,
|
||||
+ const char *client_auth)
|
||||
+{
|
||||
+ return test_ureport_server_config_set_client_auth_exit_code_ext(config, client_auth, (void *)-1, (void *)-1);
|
||||
+}
|
||||
+
|
||||
int main(void)
|
||||
{
|
||||
g_verbose=3;
|
||||
@@ -418,8 +440,8 @@ int main(void)
|
||||
assert(empty_cert_dir);
|
||||
setenv("LIBREPORT_DEBUG_RHSMENT_PEM_DIR_PATH", empty_cert_dir, 1);
|
||||
|
||||
- int status = test_ureport_server_config_set_client_auth_exit_code(&config, "rhsm");
|
||||
- assert(status != 0 && status != -1);
|
||||
+ int status = test_ureport_server_config_set_client_auth_exit_code_ext(&config, "rhsm", NULL, NULL);
|
||||
+ assert(status == 0);
|
||||
|
||||
assert(rmdir(empty_cert_dir) == 0);
|
||||
|
||||
@@ -429,8 +451,8 @@ int main(void)
|
||||
|
||||
setenv("LIBREPORT_DEBUG_RHSMENT_PEM_DIR_PATH", TESTING_CERTS_INCORRECT_CONTENT_DIR_PATH, 1);
|
||||
|
||||
- status = test_ureport_server_config_set_client_auth_exit_code(&config, "rhsm");
|
||||
- assert(status != 0 && status != -1);
|
||||
+ status = test_ureport_server_config_set_client_auth_exit_code_ext(&config, "rhsm", NULL, NULL);
|
||||
+ assert(status == 0);
|
||||
|
||||
/* client_auth == rhsm */
|
||||
/* ur_url == NULL */
|
||||
@@ -548,12 +570,24 @@ AT_TESTFUN([ureport_server_config_set_basic_auth],
|
||||
|
||||
void my_assert(const char *str1, const char *str2)
|
||||
{
|
||||
- if (str1 == NULL || str2 == NULL)
|
||||
- assert( str1 == NULL && str2 == NULL );
|
||||
- else
|
||||
- assert(strcmp(str1, str2) == 0);
|
||||
+ if (str1 == str2)
|
||||
+ return;
|
||||
|
||||
- return;
|
||||
+ if (str1 == NULL && str2 != NULL)
|
||||
+ {
|
||||
+ fprintf(stderr, "Assertion failed: NULL == '%s'\n", str2);
|
||||
+ abort();
|
||||
+ }
|
||||
+ else if (str1 != NULL && str2 == NULL)
|
||||
+ {
|
||||
+ fprintf(stderr, "Assertion failed: '%s' == NULL\n", str1);
|
||||
+ abort();
|
||||
+ }
|
||||
+ else if (strcmp(str1, str2) != 0)
|
||||
+ {
|
||||
+ fprintf(stderr, "Assertion failed: '%s' == '%s'\n", str1, str2);
|
||||
+ abort();
|
||||
+ }
|
||||
}
|
||||
|
||||
void assert_ureport_server_config(struct ureport_server_config *config,
|
||||
--
|
||||
2.1.0
|
||||
|
@ -1,47 +0,0 @@
|
||||
From d1eaae97f0287f7676508ff9eaa2c4dba24d6a2b Mon Sep 17 00:00:00 2001
|
||||
From: Tim Waugh <twaugh@redhat.com>
|
||||
Date: Thu, 6 Nov 2014 10:12:35 +0000
|
||||
Subject: [PATCH] Prevent duplicate values for CODE_* fields being logged to
|
||||
journal.
|
||||
|
||||
As code location fields CODE_FILE, CODE_LINE, and CODE_FUNC are
|
||||
handled by libreport, we do not want the automatic values supplied by
|
||||
the sd_journal API.
|
||||
|
||||
Without suppressing these, both the actual log event source and the
|
||||
call to sd_journal_send() are logged. For example:
|
||||
|
||||
[...]
|
||||
"CODE_FILE" : [ "logging.c", "abrtd.c" ],
|
||||
"CODE_LINE" : [ "143", "629" ],
|
||||
"CODE_FUNC" : [ "log_handler", "main" ],
|
||||
"MESSAGE" : "Init complete, entering main loop",
|
||||
[...]
|
||||
---
|
||||
src/lib/logging.c | 4 +++-
|
||||
1 file changed, 3 insertions(+), 1 deletion(-)
|
||||
|
||||
diff --git a/src/lib/logging.c b/src/lib/logging.c
|
||||
index 4b9dd87..878556b 100644
|
||||
--- a/src/lib/logging.c
|
||||
+++ b/src/lib/logging.c
|
||||
@@ -1,6 +1,6 @@
|
||||
/*
|
||||
Copyright (C) 2010 ABRT team
|
||||
- Copyright (C) 2010 RedHat Inc
|
||||
+ Copyright (C) 2010, 2014 RedHat Inc
|
||||
|
||||
This program is free software; you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
@@ -17,6 +17,8 @@
|
||||
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||
*/
|
||||
#include <syslog.h>
|
||||
+/* Suppress automatic CODE_* fields as we handle those here */
|
||||
+#define SD_JOURNAL_SUPPRESS_LOCATION
|
||||
#include <systemd/sd-journal.h>
|
||||
#include "internal_libreport.h"
|
||||
|
||||
--
|
||||
2.1.0
|
||||
|
@ -1,28 +0,0 @@
|
||||
From f09e0c2a6c6af89f4c3c3cfd9c56cce47439f383 Mon Sep 17 00:00:00 2001
|
||||
From: Jakub Filak <jfilak@redhat.com>
|
||||
Date: Thu, 13 Nov 2014 07:01:37 +0100
|
||||
Subject: [PATCH] Revert "ureport: use 'rhsm' ssl client auth by default"
|
||||
|
||||
This reverts commit fb554038d9bc692d99fbd6eace61979dc48a8b93.
|
||||
|
||||
Accidentally cherry-picked from the rhel7 branch.
|
||||
---
|
||||
src/plugins/ureport.conf | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/src/plugins/ureport.conf b/src/plugins/ureport.conf
|
||||
index 75c4893..da00990 100644
|
||||
--- a/src/plugins/ureport.conf
|
||||
+++ b/src/plugins/ureport.conf
|
||||
@@ -23,7 +23,7 @@
|
||||
# None (default):
|
||||
# SSLClientAuth =
|
||||
# Using RH subscription management entitlement certificate:
|
||||
-SSLClientAuth = rhsm
|
||||
+# SSLClientAuth = rhsm
|
||||
# Using Puppet certificate:
|
||||
# SSLClientAuth = puppet
|
||||
# Using custom certificate:
|
||||
--
|
||||
2.1.0
|
||||
|
@ -1,40 +0,0 @@
|
||||
From 95e51ffb1b5b6b283be9e3eebcf8e4a470532624 Mon Sep 17 00:00:00 2001
|
||||
From: Jakub Filak <jfilak@redhat.com>
|
||||
Date: Thu, 6 Nov 2014 06:34:35 +0100
|
||||
Subject: [PATCH] anaconda: auto-remove rootpw lines
|
||||
|
||||
Replace that lines with:
|
||||
<auto-removed line containing rootpw>
|
||||
|
||||
in the following files:
|
||||
- backtrace
|
||||
- ks.cfg
|
||||
|
||||
Related to #1041558
|
||||
|
||||
Signed-off-by: Jakub Filak <jfilak@redhat.com>
|
||||
---
|
||||
src/plugins/bugzilla_anaconda_event.conf | 9 +++++++++
|
||||
1 file changed, 9 insertions(+)
|
||||
|
||||
diff --git a/src/plugins/bugzilla_anaconda_event.conf b/src/plugins/bugzilla_anaconda_event.conf
|
||||
index 430e5ee..923dda0 100644
|
||||
--- a/src/plugins/bugzilla_anaconda_event.conf
|
||||
+++ b/src/plugins/bugzilla_anaconda_event.conf
|
||||
@@ -1,4 +1,13 @@
|
||||
EVENT=report_Bugzilla component=anaconda
|
||||
+ # remove sensitive information from the sensitive files
|
||||
+ for sf in backtrace ks.cfg; do
|
||||
+ if [ -f $sf ]; then
|
||||
+ # blindly remove entire line
|
||||
+ # filing a less usable bug is surely better than publishing passwords
|
||||
+ sed 's/^.*rootpw.*$/<auto-removed line containing rootpw>/' -i $sf
|
||||
+ fi
|
||||
+ done
|
||||
+ # file a bug in Bugzilla
|
||||
reporter-bugzilla -b \
|
||||
-F /etc/libreport/plugins/bugzilla_format_anaconda.conf \
|
||||
-A /etc/libreport/plugins/bugzilla_formatdup_anaconda.conf
|
||||
--
|
||||
2.1.0
|
||||
|
@ -1,27 +0,0 @@
|
||||
From ffdfc69e282ac858704bb1fe5a425420ca455db7 Mon Sep 17 00:00:00 2001
|
||||
From: Jakub Filak <jfilak@redhat.com>
|
||||
Date: Thu, 6 Nov 2014 06:35:53 +0100
|
||||
Subject: [PATCH] wizard: put rootpw on the forbidden words list
|
||||
|
||||
Related to #1041558
|
||||
|
||||
Signed-off-by: Jakub Filak <jfilak@redhat.com>
|
||||
---
|
||||
src/gui-wizard-gtk/forbidden_words.conf | 1 +
|
||||
1 file changed, 1 insertion(+)
|
||||
|
||||
diff --git a/src/gui-wizard-gtk/forbidden_words.conf b/src/gui-wizard-gtk/forbidden_words.conf
|
||||
index deab04b..1fbc1ca 100644
|
||||
--- a/src/gui-wizard-gtk/forbidden_words.conf
|
||||
+++ b/src/gui-wizard-gtk/forbidden_words.conf
|
||||
@@ -23,6 +23,7 @@ PASS
|
||||
password
|
||||
Password
|
||||
PASSWORD
|
||||
+rootpw
|
||||
secret
|
||||
Secret
|
||||
SECRET
|
||||
--
|
||||
2.1.0
|
||||
|
@ -1,45 +0,0 @@
|
||||
From a26eed565ac3fe0282e7fbff5a9a446d51a5ed32 Mon Sep 17 00:00:00 2001
|
||||
From: Jakub Filak <jfilak@redhat.com>
|
||||
Date: Thu, 6 Nov 2014 06:43:42 +0100
|
||||
Subject: [PATCH] problem_data: make ks.cfg file editable
|
||||
|
||||
Otherwise the GUI will not highlight the forbidden words in that file.
|
||||
|
||||
Related to #1041558
|
||||
|
||||
Signed-off-by: Jakub Filak <jfilak@redhat.com>
|
||||
---
|
||||
src/include/internal_libreport.h | 4 ++++
|
||||
src/lib/problem_data.c | 1 +
|
||||
2 files changed, 5 insertions(+)
|
||||
|
||||
diff --git a/src/include/internal_libreport.h b/src/include/internal_libreport.h
|
||||
index 585b807..2e75de0 100644
|
||||
--- a/src/include/internal_libreport.h
|
||||
+++ b/src/include/internal_libreport.h
|
||||
@@ -910,6 +910,10 @@ struct dump_dir *open_directory_for_writing(
|
||||
#define FILENAME_ABRT_VERSION "abrt_version"
|
||||
#define FILENAME_EXPLOITABLE "exploitable"
|
||||
|
||||
+/* File names related to Anaconda problems
|
||||
+ */
|
||||
+#define FILENAME_KICKSTART_CFG "ks.cfg"
|
||||
+
|
||||
// Not stored as files, added "on the fly":
|
||||
#define CD_DUMPDIR "Directory"
|
||||
|
||||
diff --git a/src/lib/problem_data.c b/src/lib/problem_data.c
|
||||
index fc07288..c095f6c 100644
|
||||
--- a/src/lib/problem_data.c
|
||||
+++ b/src/lib/problem_data.c
|
||||
@@ -261,6 +261,7 @@ static const char *const editable_files[] = {
|
||||
//FILENAME_COUNT ,
|
||||
//FILENAME_REPORTED_TO,
|
||||
//FILENAME_EVENT_LOG ,
|
||||
+ FILENAME_KICKSTART_CFG,
|
||||
NULL
|
||||
};
|
||||
static bool is_editable_file(const char *file_name)
|
||||
--
|
||||
2.1.0
|
||||
|
@ -1,25 +0,0 @@
|
||||
From 98fba513ccf70f549dd1915628f1b780f7d4d5fc Mon Sep 17 00:00:00 2001
|
||||
From: Jakub Filak <jfilak@redhat.com>
|
||||
Date: Thu, 27 Nov 2014 09:14:46 +0100
|
||||
Subject: [PATCH] ureport: uReport_ContactEmail setting can be left empty
|
||||
|
||||
Signed-off-by: Jakub Filak <jfilak@redhat.com>
|
||||
---
|
||||
src/plugins/report_uReport.xml.in | 1 +
|
||||
1 file changed, 1 insertion(+)
|
||||
|
||||
diff --git a/src/plugins/report_uReport.xml.in b/src/plugins/report_uReport.xml.in
|
||||
index 1147880..115b403 100644
|
||||
--- a/src/plugins/report_uReport.xml.in
|
||||
+++ b/src/plugins/report_uReport.xml.in
|
||||
@@ -23,6 +23,7 @@
|
||||
<option type="text" name="uReport_ContactEmail">
|
||||
<_label>Contact email address</_label>
|
||||
<_description>Email address that can be used by ABRT server to inform you about news and updates</_description>
|
||||
+ <allow-empty>yes</allow-empty>
|
||||
</option>
|
||||
<option type="bool" name="uReport_SSLVerify">
|
||||
<_label>Verify SSL</_label>
|
||||
--
|
||||
2.1.0
|
||||
|
@ -1,42 +0,0 @@
|
||||
From 1a81dfacec4f1f5ad57f642ed02d373ae54e3baf Mon Sep 17 00:00:00 2001
|
||||
From: Jakub Filak <jfilak@redhat.com>
|
||||
Date: Thu, 27 Nov 2014 08:49:29 +0100
|
||||
Subject: [PATCH] forbidden words: add OpenStack related strings
|
||||
|
||||
"token" - Thanks Nathan Kinder <nkinder@redhat.com>
|
||||
"key" - googled for "OpenStack environment variables"
|
||||
"https" - forgotten
|
||||
|
||||
Signed-off-by: Jakub Filak <jfilak@redhat.com>
|
||||
---
|
||||
src/gui-wizard-gtk/forbidden_words.conf | 7 +++++++
|
||||
1 file changed, 7 insertions(+)
|
||||
|
||||
diff --git a/src/gui-wizard-gtk/forbidden_words.conf b/src/gui-wizard-gtk/forbidden_words.conf
|
||||
index 1fbc1ca..45725ce 100644
|
||||
--- a/src/gui-wizard-gtk/forbidden_words.conf
|
||||
+++ b/src/gui-wizard-gtk/forbidden_words.conf
|
||||
@@ -11,6 +11,10 @@ banking
|
||||
Banking
|
||||
BANKING
|
||||
http://
|
||||
+https://
|
||||
+key
|
||||
+Key
|
||||
+KEY
|
||||
login
|
||||
Login
|
||||
LOGIN
|
||||
@@ -27,6 +31,9 @@ rootpw
|
||||
secret
|
||||
Secret
|
||||
SECRET
|
||||
+token
|
||||
+Token
|
||||
+TOKEN
|
||||
username
|
||||
Username
|
||||
USERNAME
|
||||
--
|
||||
2.1.0
|
||||
|
@ -1,74 +0,0 @@
|
||||
From 6e2e2da6736476c8260871988d8e44a4c7797b3f Mon Sep 17 00:00:00 2001
|
||||
From: Jakub Filak <jfilak@redhat.com>
|
||||
Date: Tue, 18 Nov 2014 10:18:32 +0100
|
||||
Subject: [PATCH] anaconda: mark anaconda-tb as editable file and remove rootpw
|
||||
lines
|
||||
|
||||
anaconda-tb file contains the main information about Anaconda problems.
|
||||
|
||||
report-gtk won't be highlighting forbidden words, because anaconda-tb
|
||||
contains many false positives words as the file is mainly composed of
|
||||
log outputs.
|
||||
|
||||
Related to #1041558
|
||||
|
||||
Signed-off-by: Jakub Filak <jfilak@redhat.com>
|
||||
---
|
||||
src/gui-wizard-gtk/wizard.c | 2 +-
|
||||
src/include/internal_libreport.h | 1 +
|
||||
src/lib/problem_data.c | 1 +
|
||||
src/plugins/bugzilla_anaconda_event.conf | 2 +-
|
||||
4 files changed, 4 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/src/gui-wizard-gtk/wizard.c b/src/gui-wizard-gtk/wizard.c
|
||||
index 8d0429e..ab6123f 100644
|
||||
--- a/src/gui-wizard-gtk/wizard.c
|
||||
+++ b/src/gui-wizard-gtk/wizard.c
|
||||
@@ -1185,7 +1185,7 @@ static void append_item_to_ls_details(gpointer name, gpointer value, gpointer da
|
||||
//FIXME: use the human-readable problem_item_format(item) instead of item->content.
|
||||
if (item->flags & CD_FLAG_TXT)
|
||||
{
|
||||
- if (item->flags & CD_FLAG_ISEDITABLE)
|
||||
+ if (item->flags & CD_FLAG_ISEDITABLE && strcmp(name, FILENAME_ANACONDA_TB) != 0)
|
||||
{
|
||||
GtkWidget *tab_lbl = gtk_label_new((char *)name);
|
||||
GtkWidget *tev = gtk_text_view_new();
|
||||
diff --git a/src/include/internal_libreport.h b/src/include/internal_libreport.h
|
||||
index 2e75de0..d664fa4 100644
|
||||
--- a/src/include/internal_libreport.h
|
||||
+++ b/src/include/internal_libreport.h
|
||||
@@ -913,6 +913,7 @@ struct dump_dir *open_directory_for_writing(
|
||||
/* File names related to Anaconda problems
|
||||
*/
|
||||
#define FILENAME_KICKSTART_CFG "ks.cfg"
|
||||
+#define FILENAME_ANACONDA_TB "anaconda-tb"
|
||||
|
||||
// Not stored as files, added "on the fly":
|
||||
#define CD_DUMPDIR "Directory"
|
||||
diff --git a/src/lib/problem_data.c b/src/lib/problem_data.c
|
||||
index c095f6c..c57e57f 100644
|
||||
--- a/src/lib/problem_data.c
|
||||
+++ b/src/lib/problem_data.c
|
||||
@@ -262,6 +262,7 @@ static const char *const editable_files[] = {
|
||||
//FILENAME_REPORTED_TO,
|
||||
//FILENAME_EVENT_LOG ,
|
||||
FILENAME_KICKSTART_CFG,
|
||||
+ FILENAME_ANACONDA_TB,
|
||||
NULL
|
||||
};
|
||||
static bool is_editable_file(const char *file_name)
|
||||
diff --git a/src/plugins/bugzilla_anaconda_event.conf b/src/plugins/bugzilla_anaconda_event.conf
|
||||
index 923dda0..e45a10a 100644
|
||||
--- a/src/plugins/bugzilla_anaconda_event.conf
|
||||
+++ b/src/plugins/bugzilla_anaconda_event.conf
|
||||
@@ -1,6 +1,6 @@
|
||||
EVENT=report_Bugzilla component=anaconda
|
||||
# remove sensitive information from the sensitive files
|
||||
- for sf in backtrace ks.cfg; do
|
||||
+ for sf in backtrace ks.cfg anaconda-tb; do
|
||||
if [ -f $sf ]; then
|
||||
# blindly remove entire line
|
||||
# filing a less usable bug is surely better than publishing passwords
|
||||
--
|
||||
2.1.0
|
||||
|
@ -1,78 +0,0 @@
|
||||
From aa02f3ca6d20a2ca1cf1ffd2dffbf231312a0d5e Mon Sep 17 00:00:00 2001
|
||||
From: Jakub Filak <jfilak@redhat.com>
|
||||
Date: Mon, 8 Dec 2014 11:00:17 +0100
|
||||
Subject: [PATCH] report, client: fix minor python3 incompatibilities
|
||||
|
||||
Signed-off-by: Jakub Filak <jfilak@redhat.com>
|
||||
---
|
||||
src/client-python/__init__.py | 1 +
|
||||
src/client-python/debuginfo.py | 4 ++--
|
||||
src/report-python/__init__.py | 2 +-
|
||||
src/report-python/libreport-meh-test.py | 6 +++---
|
||||
4 files changed, 7 insertions(+), 6 deletions(-)
|
||||
|
||||
diff --git a/src/client-python/__init__.py b/src/client-python/__init__.py
|
||||
index 8966f22..129149a 100644
|
||||
--- a/src/client-python/__init__.py
|
||||
+++ b/src/client-python/__init__.py
|
||||
@@ -76,3 +76,4 @@ def error_msg(fmt, *args):
|
||||
def error_msg_and_die(fmt, *args):
|
||||
sys.stderr.write("%s\n" % (fmt % args))
|
||||
sys.exit(1)
|
||||
+
|
||||
diff --git a/src/client-python/debuginfo.py b/src/client-python/debuginfo.py
|
||||
index 67faa45..421a0aa 100644
|
||||
--- a/src/client-python/debuginfo.py
|
||||
+++ b/src/client-python/debuginfo.py
|
||||
@@ -84,7 +84,7 @@ def unpack_rpm(package_file_name, files, tmp_dir, destdir, keeprpm, exact_files=
|
||||
package_full_path = tmp_dir + "/" + package_file_name
|
||||
log1("Extracting %s to %s", package_full_path, destdir)
|
||||
log2("%s", files)
|
||||
- print _("Extracting cpio from {0}").format(package_full_path)
|
||||
+ print(_("Extracting cpio from {0}").format(package_full_path))
|
||||
unpacked_cpio_path = tmp_dir + "/unpacked.cpio"
|
||||
try:
|
||||
unpacked_cpio = open(unpacked_cpio_path, 'wb')
|
||||
@@ -447,7 +447,7 @@ class DebugInfoDownload(YumBase):
|
||||
print _("Download cancelled by user")
|
||||
return RETURN_CANCEL_BY_USER
|
||||
|
||||
- for pkg, files in package_files_dict.iteritems():
|
||||
+ for pkg, files in package_files_dict.items():
|
||||
dnlcb.downloaded_pkgs = downloaded_pkgs
|
||||
repo.cache = 0
|
||||
remote = pkg.returnSimple('relativepath')
|
||||
diff --git a/src/report-python/__init__.py b/src/report-python/__init__.py
|
||||
index 71e2d62..6c75eb1 100644
|
||||
--- a/src/report-python/__init__.py
|
||||
+++ b/src/report-python/__init__.py
|
||||
@@ -236,7 +236,7 @@ def createPythonUnhandledExceptionSignature(**kwargs):
|
||||
raise AttributeError("missing argument {0}".format(arg))
|
||||
|
||||
pd = problem_data()
|
||||
- for (key, value) in kwargs.iteritems():
|
||||
+ for (key, value) in kwargs.items():
|
||||
pd.add(key, value)
|
||||
product = getProduct()
|
||||
if product:
|
||||
diff --git a/src/report-python/libreport-meh-test.py b/src/report-python/libreport-meh-test.py
|
||||
index 4ef2483..eb1c64f 100644
|
||||
--- a/src/report-python/libreport-meh-test.py
|
||||
+++ b/src/report-python/libreport-meh-test.py
|
||||
@@ -22,10 +22,10 @@ handler = ExceptionHandler(config, intf, ReverseExceptionDump)
|
||||
handler.install(None)
|
||||
|
||||
|
||||
-print "handler set up, about to divide by zero"
|
||||
+print("handler set up, about to divide by zero")
|
||||
|
||||
zero = 0
|
||||
-print 1 / zero
|
||||
+print(1 / zero)
|
||||
|
||||
-print "should have crashed"
|
||||
+print("should have crashed")
|
||||
|
||||
--
|
||||
2.1.0
|
||||
|
@ -6,8 +6,8 @@
|
||||
|
||||
Summary: Generic library for reporting various problems
|
||||
Name: libreport
|
||||
Version: 2.3.0
|
||||
Release: 8%{?dist}
|
||||
Version: 2.4.0
|
||||
Release: 1%{?dist}
|
||||
License: GPLv2+
|
||||
Group: System Environment/Libraries
|
||||
URL: https://github.com/abrt/abrt/wiki/ABRT-Project
|
||||
@ -16,44 +16,6 @@ Source1: autogen.sh
|
||||
|
||||
# git format-patch %%{Version} -N -M --topo-order
|
||||
# for p in `ls 0*.patch`; do printf "Patch%04d: %s\n" $i $p; ((i++)); done
|
||||
Patch0001: 0001-Translation-updates.patch
|
||||
Patch0002: 0002-upload-don-t-ask-for-password-if-the-env-var-is-empt.patch
|
||||
Patch0003: 0003-lib-fix-a-bug-in-ureport-response-parser.patch
|
||||
Patch0004: 0004-rhtsupport-re-prompt-for-credentials.patch
|
||||
Patch0005: 0005-rhtsupport-attach-the-contact-email-to-bthash.patch
|
||||
Patch0006: 0006-ureport-document-rhsm-entitlement-in-the-man-page.patch
|
||||
Patch0007: 0007-rhtsupport-send-ureport-before-creating-description.patch
|
||||
Patch0008: 0008-testsuite-add-unittests-for-uReport-API.patch
|
||||
Patch0009: 0009-testsuite-changed-atlocal.in-to-work-with-last-commi.patch
|
||||
Patch0010: 0010-ureport-allow-multiple-cert-file-in-rhsm-entitlement.patch
|
||||
Patch0011: 0011-ureport-use-entit-certs-with-rhsm-and-drop-rhsm-enti.patch
|
||||
Patch0012: 0012-ureport-get-rhsm-entitlement-cert-dir-from-rhsm-conf.patch
|
||||
Patch0013: 0013-ureport-consistently-die-on-all-client-auth-errors.patch
|
||||
Patch0014: 0014-rhtsupport-never-use-uReport-URL-from-ureport.config.patch
|
||||
Patch0015: 0015-rhtsupport-do-not-leak-the-hints-results.patch
|
||||
#Patch0016: 0016-spec-ureport-requires-python-rhsm-on-rhel.patch
|
||||
Patch0017: 0017-ureport-fall-back-to-the-hardcoded-rhsm-cert-dir.patch
|
||||
Patch0018: 0018-ureport-wrong-description-of-two-functions-in-urepor.patch
|
||||
Patch0019: 0019-ureport-fix-a-memory-leak-related-to-AuthDataItems.patch
|
||||
Patch0020: 0020-doc-fix-asciidoc-misrendering.patch
|
||||
Patch0021: 0021-testsuite-add-tests-ureport-to-EXTRA_DIST.patch
|
||||
Patch0022: 0022-ureport-use-rhsm-ssl-client-auth-by-default.patch
|
||||
Patch0023: 0023-ureport-be-able-to-configure-ContactEmail-from-GUI.patch
|
||||
Patch0024: 0024-rhtsupport-be-able-to-turn-uReport-off-from-GUI.patch
|
||||
Patch0025: 0025-rhtsupport-move-RH-Portal-URL-c.-o.-to-Advanced-sect.patch
|
||||
Patch0026: 0026-Revert-ureport-consistently-die-on-all-client-auth-e.patch
|
||||
Patch0027: 0027-testsuite-do-not-expected-ureport-exiting-on-rhsm-ce.patch
|
||||
#Patch0028: 0028-spec-dump-the-log-files-of-failed-unit-tests.patch
|
||||
Patch0029: 0029-Prevent-duplicate-values-for-CODE_-fields-being-logg.patch
|
||||
#Patch0030: 0030-spec-update-the-URL.patch
|
||||
Patch0031: 0031-Revert-ureport-use-rhsm-ssl-client-auth-by-default.patch
|
||||
Patch0032: 0032-anaconda-auto-remove-rootpw-lines.patch
|
||||
Patch0033: 0033-wizard-put-rootpw-on-the-forbidden-words-list.patch
|
||||
Patch0034: 0034-problem_data-make-ks.cfg-file-editable.patch
|
||||
Patch0035: 0035-ureport-uReport_ContactEmail-setting-can-be-left-emp.patch
|
||||
Patch0036: 0036-forbidden-words-add-OpenStack-related-strings.patch
|
||||
Patch0037: 0037-anaconda-mark-anaconda-tb-as-editable-file-and-remov.patch
|
||||
Patch0038: 0038-report-client-fix-minor-python3-incompatibilities.patch
|
||||
|
||||
# git is need for '%%autosetup -S git' which automatically applies all the
|
||||
# patches above. Please, be aware that the patches must be generated
|
||||
@ -84,6 +46,7 @@ BuildRequires: doxygen
|
||||
BuildRequires: systemd-devel
|
||||
BuildRequires: augeas-devel
|
||||
BuildRequires: augeas
|
||||
BuildRequires: xz-devel
|
||||
Requires: libreport-filesystem = %{version}-%{release}
|
||||
# required for update from old report library, otherwise we obsolete report-gtk
|
||||
# and all it's plugins, but don't provide the python bindings and the sealert
|
||||
@ -236,6 +199,25 @@ Requires: libreport-web = %{version}-%{release}
|
||||
%description plugin-bugzilla
|
||||
Plugin to report bugs into the bugzilla.
|
||||
|
||||
%package plugin-mantisbt
|
||||
Summary: %{name}'s mantisbt plugin
|
||||
Group: System Environment/Libraries
|
||||
Requires: %{name} = %{version}-%{release}
|
||||
Requires: libreport-web = %{version}-%{release}
|
||||
|
||||
%description plugin-mantisbt
|
||||
Plugin to report bugs into the mantisbt.
|
||||
|
||||
%package centos
|
||||
Summary: %{name}'s CentOS Bug Tracker workflow
|
||||
Group: System Environment/Libraries
|
||||
Requires: %{name} = %{version}-%{release}
|
||||
Requires: libreport-web = %{version}-%{release}
|
||||
Requires: libreport-plugin-mantisbt = %{version}-%{release}
|
||||
|
||||
%description centos
|
||||
Workflows to report issues into the CentOS Bug Tracker.
|
||||
|
||||
%package plugin-ureport
|
||||
Summary: %{name}'s micro report plugin
|
||||
BuildRequires: json-c-devel
|
||||
@ -460,11 +442,14 @@ gtk-update-icon-cache %{_datadir}/icons/hicolor &>/dev/null || :
|
||||
%files -f %{name}.lang
|
||||
%defattr(-,root,root,-)
|
||||
%doc README COPYING
|
||||
%config(noreplace) %{_sysconfdir}/%{name}/libreport.conf
|
||||
%config(noreplace) %{_sysconfdir}/%{name}/report_event.conf
|
||||
%config(noreplace) %{_sysconfdir}/%{name}/forbidden_words.conf
|
||||
%config(noreplace) %{_sysconfdir}/%{name}/ignored_words.conf
|
||||
%{_datadir}/%{name}/conf.d/libreport.conf
|
||||
%{_libdir}/libreport.so.*
|
||||
%{_libdir}/libabrt_dbus.so.*
|
||||
%{_mandir}/man5/libreport.conf.5*
|
||||
%{_mandir}/man5/report_event.conf.5*
|
||||
%{_mandir}/man5/forbidden_words.conf.5*
|
||||
%{_mandir}/man5/ignored_words.conf.5*
|
||||
@ -489,6 +474,7 @@ gtk-update-icon-cache %{_datadir}/icons/hicolor &>/dev/null || :
|
||||
%{_includedir}/libreport/dump_dir.h
|
||||
%{_includedir}/libreport/event_config.h
|
||||
%{_includedir}/libreport/problem_data.h
|
||||
%{_includedir}/libreport/problem_report.h
|
||||
%{_includedir}/libreport/report.h
|
||||
%{_includedir}/libreport/run_event.h
|
||||
%{_includedir}/libreport/file_obj.h
|
||||
@ -496,7 +482,10 @@ gtk-update-icon-cache %{_datadir}/icons/hicolor &>/dev/null || :
|
||||
%{_includedir}/libreport/workflow.h
|
||||
%{_includedir}/libreport/problem_details_widget.h
|
||||
%{_includedir}/libreport/problem_details_dialog.h
|
||||
%{_includedir}/libreport/problem_utils.h
|
||||
%{_includedir}/libreport/ureport.h
|
||||
%{_includedir}/libreport/reporters.h
|
||||
%{_includedir}/libreport/global_configuration.h
|
||||
# Private api headers:
|
||||
%{_includedir}/libreport/internal_abrt_dbus.h
|
||||
%{_includedir}/libreport/internal_libreport.h
|
||||
@ -620,6 +609,29 @@ gtk-update-icon-cache %{_datadir}/icons/hicolor &>/dev/null || :
|
||||
%{_mandir}/man5/bugzilla_format_kernel.conf.5.*
|
||||
%{_bindir}/reporter-bugzilla
|
||||
|
||||
%files plugin-mantisbt
|
||||
%defattr(-,root,root,-)
|
||||
%config(noreplace) %{_sysconfdir}/libreport/plugins/mantisbt.conf
|
||||
%{_datadir}/%{name}/conf.d/plugins/mantisbt.conf
|
||||
%config(noreplace) %{_sysconfdir}/libreport/plugins/mantisbt_format.conf
|
||||
%config(noreplace) %{_sysconfdir}/libreport/plugins/mantisbt_formatdup.conf
|
||||
%{_bindir}/reporter-mantisbt
|
||||
|
||||
%files centos
|
||||
%{_datadir}/%{name}/workflows/workflow_CentOSCCpp.xml
|
||||
%{_datadir}/%{name}/workflows/workflow_CentOSKerneloops.xml
|
||||
%{_datadir}/%{name}/workflows/workflow_CentOSPython.xml
|
||||
%{_datadir}/%{name}/workflows/workflow_CentOSPython3.xml
|
||||
%{_datadir}/%{name}/workflows/workflow_CentOSVmcore.xml
|
||||
%{_datadir}/%{name}/workflows/workflow_CentOSXorg.xml
|
||||
%{_datadir}/%{name}/workflows/workflow_CentOSLibreport.xml
|
||||
%{_datadir}/%{name}/workflows/workflow_CentOSJava.xml
|
||||
%config(noreplace) %{_sysconfdir}/libreport/workflows.d/report_centos.conf
|
||||
%{_datadir}/%{name}/events/report_CentOSBugTracker.xml
|
||||
%config(noreplace) %{_sysconfdir}/libreport/events/report_CentOSBugTracker.conf
|
||||
# report_CentOSBugTracker events are shipped by libreport package
|
||||
%config(noreplace) %{_sysconfdir}/libreport/events.d/centos_report_event.conf
|
||||
|
||||
%files plugin-rhtsupport
|
||||
%defattr(-,root,root,-)
|
||||
%config(noreplace) %{_sysconfdir}/libreport/plugins/rhtsupport.conf
|
||||
@ -716,6 +728,13 @@ gtk-update-icon-cache %{_datadir}/icons/hicolor &>/dev/null || :
|
||||
|
||||
|
||||
%changelog
|
||||
* Fri Feb 20 2015 Jakub Filak <jfilak@redhat.com> 2.4.0-1
|
||||
- introduce reporter-mantisbt
|
||||
- introduce global configuration
|
||||
- gui: try to reduce false positive sensitive words
|
||||
- lib: add Problem Format API
|
||||
- Resolves: #1168494
|
||||
|
||||
* Mon Dec 08 2014 Jakub Filak <jfilak@redhat.com> 2.3.0-8
|
||||
- fix several python3 incompatibilities
|
||||
- switch back from FAF2 to FAF
|
||||
|
Loading…
Reference in New Issue
Block a user