Blame SOURCES/0106-ureport-fall-back-to-the-hardcoded-rhsm-cert-dir.patch

562801
From 0b86e5f6275b88a0088c63c1ba76b1f682190694 Mon Sep 17 00:00:00 2001
562801
From: Jakub Filak <jfilak@redhat.com>
562801
Date: Thu, 23 Oct 2014 11:30:14 +0200
562801
Subject: [LIBREPORT PATCH 106/107] ureport: fall back to the hardcoded rhsm
562801
 cert dir
562801
562801
This commit adds a fallback execution path for cases where getting the
562801
rhsm entitlement dir path via an execution of python from the
562801
librepor-web library fails for any reason.
562801
562801
See commit 2b20c9f91342da7744ae40ee623735ab95f83219
562801
Related #1140224
562801
562801
Signed-off-by: Jakub Filak <jfilak@redhat.com>
562801
---
562801
 src/lib/ureport.c | 4 +++-
562801
 1 file changed, 3 insertions(+), 1 deletion(-)
562801
562801
diff --git a/src/lib/ureport.c b/src/lib/ureport.c
562801
index f4f9b19..40b7129 100644
562801
--- a/src/lib/ureport.c
562801
+++ b/src/lib/ureport.c
562801
@@ -32,6 +32,7 @@
562801
 
562801
 #define RHSM_WEB_SERVICE_URL "https://api.access.redhat.com/rs/telemetry/abrt"
562801
 
562801
+#define RHSMENT_PEM_DIR_PATH "/etc/pki/entitlement"
562801
 #define RHSMENT_ENT_DATA_BEGIN_TAG "-----BEGIN ENTITLEMENT DATA-----"
562801
 #define RHSMENT_ENT_DATA_END_TAG "-----END ENTITLEMENT DATA-----"
562801
 #define RHSMENT_SIG_DATA_BEGIN_TAG "-----BEGIN RSA SIGNATURE-----"
562801
@@ -91,7 +92,8 @@ rhsm_config_get_entitlement_cert_dir(void)
562801
     return result;
562801
 error:
562801
     free(result);
562801
-    error_msg_and_die("Failed to get 'rhsm':'entitlementCertDir' from rhsm.config python module.");
562801
+    error_msg("Failed to get 'rhsm':'entitlementCertDir' from rhsm.config python module. Using "RHSMENT_PEM_DIR_PATH);
562801
+    return xstrdup(RHSMENT_PEM_DIR_PATH);
562801
 }
562801
 
562801
 void
562801
-- 
562801
1.8.3.1
562801