]> git.ipfire.org Git - thirdparty/samba.git/commitdiff
s3-ldapsam: fix ldapsam_create_user() with existing posix accounts.
authorGünther Deschner <gd@samba.org>
Thu, 24 Mar 2011 17:07:23 +0000 (18:07 +0100)
committerGünther Deschner <gd@samba.org>
Thu, 24 Mar 2011 22:08:22 +0000 (23:08 +0100)
We were not taking into account the existing posix attributes and thus failed
while trying to add a 2nd uid attribute.

Found by Sumit.

Guenther

source3/passdb/pdb_ldap.c

index d1bee87f6078dac1e3c3e354879ddb602386d757..0e5567ff6b17a4f508385f81b3e2ac30b9823a4a 100644 (file)
@@ -5364,7 +5364,7 @@ static NTSTATUS ldapsam_create_user(struct pdb_methods *my_methods,
                return NT_STATUS_UNSUCCESSFUL;
        }
 
-       if (!init_ldap_from_sam(ldap_state, NULL, &mods, user, element_is_set_or_changed)) {
+       if (!init_ldap_from_sam(ldap_state, entry, &mods, user, element_is_set_or_changed)) {
                DEBUG(1,("ldapsam_create_user: Unable to fill user structs\n"));
                return NT_STATUS_UNSUCCESSFUL;
        }