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

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