svn commit: samba r22645 - in
branches/SAMBA_3_0_25/source/nsswitch: .
idra at samba.org
idra at samba.org
Thu May 3 12:27:31 GMT 2007
Author: idra
Date: 2007-05-03 12:27:31 +0000 (Thu, 03 May 2007)
New Revision: 22645
WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=samba&rev=22645
Log:
Fix bug in idmap_ldap's get_credentials() code.
We were dereferencing null for the alloc backend.
Jerry, thits need to be in 3.0.25 final.
Simo.
Modified:
branches/SAMBA_3_0_25/source/nsswitch/idmap_ldap.c
Changeset:
Modified: branches/SAMBA_3_0_25/source/nsswitch/idmap_ldap.c
===================================================================
--- branches/SAMBA_3_0_25/source/nsswitch/idmap_ldap.c 2007-05-03 11:49:32 UTC (rev 22644)
+++ branches/SAMBA_3_0_25/source/nsswitch/idmap_ldap.c 2007-05-03 12:27:31 UTC (rev 22645)
@@ -79,11 +79,17 @@
tmp = lp_parm_const_string(-1, config_option, "ldap_user_dn", NULL);
if ( tmp ) {
- secret = idmap_fetch_secret("ldap", false, dom->name, tmp);
+ if (!dom) {
+ /* only the alloc backend is allowed to pass in a NULL dom */
+ secret = idmap_fetch_secret("ldap", true, NULL, tmp);
+ } else {
+ secret = idmap_fetch_secret("ldap", false, dom->name, tmp);
+ }
+
if (!secret) {
DEBUG(0, ("get_credentials: Unable to fetch "
"auth credentials for %s in %s\n",
- tmp, dom->name));
+ tmp, (dom==NULL)?"ALLOC":dom->name));
ret = NT_STATUS_ACCESS_DENIED;
goto done;
}
More information about the samba-cvs
mailing list