summaryrefslogtreecommitdiffstats
path: root/daemons/ipa-kpasswd
diff options
context:
space:
mode:
authorMartin Kosek <mkosek@redhat.com>2011-01-14 10:24:04 +0100
committerSimo Sorce <ssorce@redhat.com>2011-01-14 14:20:57 -0500
commitc94d20cfd8cc1bd8cd8152b19d6807b654286197 (patch)
tree963fb678ee96ef9403e1fa54d0d1d94bc4976193 /daemons/ipa-kpasswd
parenta6a91e5dbc96498ef33505e4bf96466590f0da42 (diff)
downloadfreeipa-c94d20cfd8cc1bd8cd8152b19d6807b654286197.tar.gz
freeipa-c94d20cfd8cc1bd8cd8152b19d6807b654286197.tar.xz
freeipa-c94d20cfd8cc1bd8cd8152b19d6807b654286197.zip
Unchecked return values in SLAPI plugins
Return values weren't checked in several cases which could have lead to unhandled errors. https://fedorahosted.org/freeipa/ticket/722
Diffstat (limited to 'daemons/ipa-kpasswd')
-rw-r--r--daemons/ipa-kpasswd/ipa_kpasswd.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/daemons/ipa-kpasswd/ipa_kpasswd.c b/daemons/ipa-kpasswd/ipa_kpasswd.c
index a506cec1d..dd2b4b857 100644
--- a/daemons/ipa-kpasswd/ipa_kpasswd.c
+++ b/daemons/ipa-kpasswd/ipa_kpasswd.c
@@ -491,9 +491,13 @@ int ldap_pwd_change(char *client_name, char *realm_name, krb5_data pwd, char **e
goto done;
}
- ber_printf(ctrl, "{tstO}",
+ ret = ber_printf(ctrl, "{tstO}",
LDAP_TAG_EXOP_MODIFY_PASSWD_ID, userdn,
LDAP_TAG_EXOP_MODIFY_PASSWD_NEW, &newpw);
+ if (ret < 0) {
+ syslog(LOG_ERR, "ber printf failed!");
+ goto done;
+ }
ret = ber_flatten(ctrl, &control);
if (ret < 0) {