]> git.ipfire.org Git - thirdparty/samba.git/commitdiff
r2752: Fix the paranoia-check to ensure the ldap-attribute and the
authorGünther Deschner <gd@samba.org>
Wed, 29 Sep 2004 13:34:41 +0000 (13:34 +0000)
committerGerald (Jerry) Carter <jerry@samba.org>
Wed, 10 Oct 2007 15:52:50 +0000 (10:52 -0500)
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

source/passdb/pdb_ldap.c

index 60312d265f3805edb1e3596754d22a1bc95acd30..751ec7e049cb06b4ee739e5ea1853a686a536ae1 100644 (file)
@@ -2993,7 +2993,7 @@ and will risk BDCs having inconsistant SIDs\n"));
        }
 
        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()) {