[Fedora-directory-commits] adminutil/lib/libadminutil admutil.c, 1.4, 1.5
Richard Allen Megginson (rmeggins)
fedora-directory-commits at redhat.com
Fri Nov 3 17:40:32 UTC 2006
Author: rmeggins
Update of /cvs/dirsec/adminutil/lib/libadminutil
In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv29624/adminutil/lib/libadminutil
Modified Files:
admutil.c
Log Message:
Reviewed by: nhosoi (Thanks!)
Fix Description: The logic in mod_admserv.c expects admldapBuildInfoSSL to return success but
with a NULL ldap handle if no password was given or found. This is essentially
what admldapBuildInfo does in the same situation. I also found and fixed a few
memory leaks with both strings and LDAP handles.
Platforms tested: FC5
Flag Day: no
Doc impact: no
Index: admutil.c
===================================================================
RCS file: /cvs/dirsec/adminutil/lib/libadminutil/admutil.c,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -r1.4 -r1.5
--- admutil.c 11 May 2006 23:30:31 -0000 1.4
+++ admutil.c 3 Nov 2006 17:40:29 -0000 1.5
@@ -1240,6 +1240,7 @@
case LDAP_INVALID_CREDENTIALS:
case LDAP_INSUFFICIENT_ACCESS:
/* authenticate failed: Should not continue */
+ ldap_unbind(admInfo->ldapHndl);
admInfo->ldapHndl = NULL;
*errorcode = ADMUTIL_LDAP_ERR;
break;;
@@ -1247,6 +1248,7 @@
case LDAP_ALIAS_PROBLEM:
case LDAP_INVALID_DN_SYNTAX:
/* Not a good user DN */
+ ldap_unbind(admInfo->ldapHndl);
admInfo->ldapHndl = NULL;
*errorcode = ADMUTIL_LDAP_ERR;
break;
More information about the Fedora-directory-commits
mailing list