s3:auth make sure we set the right username
authorSimo Sorce <ssorce@redhat.com>
Fri, 28 May 2010 15:07:49 +0000 (11:07 -0400)
committerAndrew Bartlett <abartlet@samba.org>
Mon, 7 Jun 2010 12:53:06 +0000 (22:53 +1000)
Signed-off-by: Andrew Bartlett <abartlet@samba.org>
source3/auth/auth_util.c

index a64fd33db2ed6395549eea5d08c2e1d8e44fb7b7..8ea1f410f10100fb0fb87449868c0d20985f8e08 100644 (file)
@@ -590,6 +590,11 @@ NTSTATUS make_server_info_pw(struct auth_serversupplied_info **server_info,
                return status;
        }
 
+       /* In pathological cases the above call can set the account
+        * name to the DOMAIN\username form. Reset the account name
+        * using unix_username */
+       pdb_set_username(sampass, unix_username, PDB_SET);
+
        result = make_server_info(NULL);
        if (result == NULL) {
                TALLOC_FREE(sampass);