diff options
author | Gerald Carter <jerry@samba.org> | 2003-05-22 17:07:41 +0000 |
---|---|---|
committer | Gerald Carter <jerry@samba.org> | 2003-05-22 17:07:41 +0000 |
commit | 52ae1c4b2dcf9fec562834c7fc8a93231ba8964c (patch) | |
tree | 88217ae023bcf9be1a5ea6443bff0cbd7d23518c | |
parent | 91077a06184211d6720dd485c3432f833682177d (diff) | |
download | samba-52ae1c4b2dcf9fec562834c7fc8a93231ba8964c.tar.gz samba-52ae1c4b2dcf9fec562834c7fc8a93231ba8964c.tar.bz2 samba-52ae1c4b2dcf9fec562834c7fc8a93231ba8964c.zip |
fix bug #108; sambaSambaAccount string attributes are case insensitive; don't try to change a string that only differs in case
(This used to be commit 01ef08352007487040edefcc0b99ca79823cbddf)
-rw-r--r-- | source3/passdb/pdb_ldap.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/source3/passdb/pdb_ldap.c b/source3/passdb/pdb_ldap.c index b37c49cb32..da3c8ab517 100644 --- a/source3/passdb/pdb_ldap.c +++ b/source3/passdb/pdb_ldap.c @@ -1198,8 +1198,11 @@ static void make_ldap_mod(LDAP *ldap_struct, LDAPMessage *existing, values = ldap_get_values(ldap_struct, existing, attribute); } + /* all of our string attributes are case insensitive */ + if ((values != NULL) && (values[0] != NULL) && - strcmp(values[0], newval) == 0) { + StrCaseCmp(values[0], newval) == 0) + { /* Believe it or not, but LDAP will deny a delete and an add at the same time if the values are the @@ -1952,7 +1955,7 @@ static BOOL init_sam_from_ldap (struct ldapsam_privates *ldap_state, pdb_set_domain(sampass, domain, PDB_DEFAULT); pdb_set_nt_username(sampass, nt_username, PDB_SET); - + /* deal with different attributes between the schema first */ if ( ldap_state->schema_ver == SCHEMAVER_SAMBASAMACCOUNT ) |