diff options
author | Sumit Bose <sbose@redhat.com> | 2010-12-14 10:23:07 +0100 |
---|---|---|
committer | Stephen Gallagher <sgallagh@redhat.com> | 2010-12-14 17:13:29 -0500 |
commit | 4cac4c6ebe76b3e1a40e437f9594553fdb870b81 (patch) | |
tree | 1335acf69ec67471d883fcc0ba65cceb5f95d0b2 /src/providers/ldap/sdap.c | |
parent | df606157d22a633aab8cc7d532117a1b20870b58 (diff) | |
download | sssd-4cac4c6ebe76b3e1a40e437f9594553fdb870b81.tar.gz sssd-4cac4c6ebe76b3e1a40e437f9594553fdb870b81.tar.bz2 sssd-4cac4c6ebe76b3e1a40e437f9594553fdb870b81.zip |
Fix unchecked return value in sdap_get_msg_dn()
https://fedorahosted.org/sssd/ticket/712
Diffstat (limited to 'src/providers/ldap/sdap.c')
-rw-r--r-- | src/providers/ldap/sdap.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/src/providers/ldap/sdap.c b/src/providers/ldap/sdap.c index 1735ac52..cec439e1 100644 --- a/src/providers/ldap/sdap.c +++ b/src/providers/ldap/sdap.c @@ -268,9 +268,14 @@ int sdap_get_msg_dn(TALLOC_CTX *memctx, struct sdap_handle *sh, { char *str; int lerrno; + int ret; lerrno = 0; - ldap_set_option(sh->ldap, LDAP_OPT_RESULT_CODE, &lerrno); + ret = ldap_set_option(sh->ldap, LDAP_OPT_RESULT_CODE, &lerrno); + if (ret != LDAP_OPT_SUCCESS) { + DEBUG(1, ("ldap_set_option failed [%s], ignored.\n", + ldap_err2string(ret))); + } str = ldap_get_dn(sh->ldap, sm->msg); if (!str) { |