svn commit: samba r2752 - branches/SAMBA_3_0/source/passdb trunk/source/passdb

gd at samba.org gd at samba.org
Wed Sep 29 13:34:41 GMT 2004


Author: gd
Date: 2004-09-29 13:34:41 +0000 (Wed, 29 Sep 2004)
New Revision: 2752

WebSVN: http://websvn.samba.org/websvn/changeset.php?rep=samba&path=/&rev=2752&nolog=1

Log:
Fix the paranoia-check to ensure the ldap-attribute and the
smb.conf-parameter for samba's "algorithmic rid base" in ldapsam are
identical.

It tried to get the value of LDAP_ATTR_ALGORITHMIC_RID_BASE via
get_userattr_key2string() for a very long time now. This just can not
work because LDAP_ATTR_ALGORITHMIC_RID_BASE is neither in attrib_map_v22
nor in attrib_map_v30. Instead, get it directly from dominfo_attr_list.

Ldapsam will now correctly refuse to initialize when admins tried
manually to have differing values for "algorithmic rid base" in ldap and
smb.conf. idmap_ldap is another story...

Guenther


Modified:
   branches/SAMBA_3_0/source/passdb/pdb_ldap.c
   trunk/source/passdb/pdb_ldap.c


Changeset:
Modified: branches/SAMBA_3_0/source/passdb/pdb_ldap.c
===================================================================
--- branches/SAMBA_3_0/source/passdb/pdb_ldap.c	2004-09-29 13:17:09 UTC (rev 2751)
+++ branches/SAMBA_3_0/source/passdb/pdb_ldap.c	2004-09-29 13:34:41 UTC (rev 2752)
@@ -2993,7 +2993,7 @@
 	}
 
 	if (smbldap_get_single_pstring(ldap_state->smbldap_state->ldap_struct, entry, 
-				 get_userattr_key2string(ldap_state->schema_ver, LDAP_ATTR_ALGORITHMIC_RID_BASE), 
+				 get_attr_key2string( dominfo_attr_list, LDAP_ATTR_ALGORITHMIC_RID_BASE ),
 				 alg_rid_base_string)) {
 		alg_rid_base = (uint32)atol(alg_rid_base_string);
 		if (alg_rid_base != algorithmic_rid_base()) {

Modified: trunk/source/passdb/pdb_ldap.c
===================================================================
--- trunk/source/passdb/pdb_ldap.c	2004-09-29 13:17:09 UTC (rev 2751)
+++ trunk/source/passdb/pdb_ldap.c	2004-09-29 13:34:41 UTC (rev 2752)
@@ -4313,7 +4313,7 @@
 	}
 
 	if (smbldap_get_single_pstring(ldap_state->smbldap_state->ldap_struct, entry, 
-				 get_userattr_key2string(ldap_state->schema_ver, LDAP_ATTR_ALGORITHMIC_RID_BASE), 
+				 get_attr_key2string( dominfo_attr_list, LDAP_ATTR_ALGORITHMIC_RID_BASE ),
 				 alg_rid_base_string)) {
 		alg_rid_base = (uint32)atol(alg_rid_base_string);
 		if (alg_rid_base != algorithmic_rid_base()) {



More information about the samba-cvs mailing list