On Wed, Feb 25, 2015 at 04:10:54PM +0100, Pavel Reichl wrote:
Hello,
this trivial patch should fix coverity warning.
Thanks!
From 779efb83232bfa22f7ffc26c0ef66d05d9b30475 Mon Sep 17 00:00:00
2001
From: Pavel Reichl <preichl(a)redhat.com>
Date: Wed, 25 Feb 2015 05:38:38 -0500
Subject: [PATCH] PAM: check return value of confdb_get_string
Coverity found this neglect.
---
src/responder/pam/pamsrv_cmd.c | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/src/responder/pam/pamsrv_cmd.c b/src/responder/pam/pamsrv_cmd.c
index ab8369b0f9b1f3ed9256fc16396f095818d36bbf..8c31ea24ec5470a3a4ab92ed2a5a522c17aadb5e
100644
--- a/src/responder/pam/pamsrv_cmd.c
+++ b/src/responder/pam/pamsrv_cmd.c
@@ -679,6 +679,12 @@ static void pam_reply(struct pam_auth_req *preq)
ret = confdb_get_string(pctx->rctx->cdb, pd, CONFDB_PAM_CONF_ENTRY,
CONFDB_PAM_ACCOUNT_EXPIRED_MESSAGE, "",
&pam_account_expired_message);
+ if (ret != EOK) {
+ DEBUG(SSSDBG_MINOR_FAILURE,
+ "Failed to parse expiration message: %d:[%s].\n",
Are you sure the message should say parse and not get or retrieve?
Otherwise LGTM and CI passes:
http://sssd-ci.duckdns.org/logs/job/8/30/summary.html
+ ret, sss_strerror(ret));
+ goto done;
+ }
inform_account_expired(pd, pam_account_expired_message);
}
--
2.1.0
_______________________________________________
sssd-devel mailing list
sssd-devel(a)lists.fedorahosted.org
https://lists.fedorahosted.org/mailman/listinfo/sssd-devel