From 6c1ec705cd9ebb49bf49778e0396e32fdf38f315 Mon Sep 17 00:00:00 2001 From: Sumit Bose Date: Tue, 14 Dec 2010 10:25:20 +0100 Subject: Fix unchecked return value in sdap_parse_entry() https://fedorahosted.org/sssd/ticket/712 --- src/providers/ldap/sdap.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'src/providers/ldap') diff --git a/src/providers/ldap/sdap.c b/src/providers/ldap/sdap.c index cec439e1d..573de1787 100644 --- a/src/providers/ldap/sdap.c +++ b/src/providers/ldap/sdap.c @@ -104,7 +104,11 @@ int sdap_parse_entry(TALLOC_CTX *memctx, bool store; 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))); + } attrs = sysdb_new_attrs(memctx); if (!attrs) return ENOMEM; -- cgit