dff8d99
From: Ken Gaillot <kgaillot@redhat.com>
dff8d99
Date: Wed, 23 Sep 2015 10:45:39 -0500
dff8d99
Subject: [PATCH] Fix: liblrmd: don't print error if remote key environment
dff8d99
 variable unset
dff8d99
dff8d99
20c2178 added error logging if the remote key was unable to be read,
dff8d99
however it would also log an error in the usual case where the
dff8d99
environment variable was simply unset.
dff8d99
dff8d99
(cherry picked from commit dec3349f1252e2c2c18ed110b8cc4a2b2212b613)
dff8d99
---
dff8d99
 lib/lrmd/lrmd_client.c | 6 +++---
dff8d99
 1 file changed, 3 insertions(+), 3 deletions(-)
dff8d99
dff8d99
diff --git a/lib/lrmd/lrmd_client.c b/lib/lrmd/lrmd_client.c
dff8d99
index 1f1ffde..f365e59 100644
dff8d99
--- a/lib/lrmd/lrmd_client.c
dff8d99
+++ b/lib/lrmd/lrmd_client.c
dff8d99
@@ -1062,8 +1062,8 @@ lrmd_tls_set_key(gnutls_datum_t * key)
dff8d99
         crm_debug("Using custom authkey location %s", specific_location);
dff8d99
         return 0;
dff8d99
 
dff8d99
-    } else {
dff8d99
-        crm_err("No lrmd remote key found at %s, trying default locations", specific_location);
dff8d99
+    } else if (specific_location) {
dff8d99
+        crm_err("No valid lrmd remote key found at %s, trying default location", specific_location);
dff8d99
     }
dff8d99
 
dff8d99
     if (set_key(key, DEFAULT_REMOTE_KEY_LOCATION) != 0) {
dff8d99
@@ -1071,7 +1071,7 @@ lrmd_tls_set_key(gnutls_datum_t * key)
dff8d99
     }
dff8d99
 
dff8d99
     if (rc) {
dff8d99
-        crm_err("No lrmd remote key found at %s", DEFAULT_REMOTE_KEY_LOCATION);
dff8d99
+        crm_err("No valid lrmd remote key found at %s", DEFAULT_REMOTE_KEY_LOCATION);
dff8d99
         return -1;
dff8d99
     }
dff8d99