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

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