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