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

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