s4:dsdb Fix crash from LDAP login of DOM\\
authorAndrew Bartlett <abartlet@samba.org>
Sat, 26 Sep 2009 00:37:21 +0000 (17:37 -0700)
committerMatthias Dieter Wallnöfer <mwallnoefer@yahoo.de>
Fri, 2 Oct 2009 10:45:08 +0000 (12:45 +0200)
The issue here is that when we resolve DOM\\ into an NT4 name, we
would not initilise the nt4_account output.

Andrew Bartlett

source4/dsdb/samdb/cracknames.c

index 723f51356a5c36a512298379d5405b7a172077fe..8f7f481e2db6b03ae2d5801d482367b3270292b2 100644 (file)
@@ -1288,11 +1288,9 @@ NTSTATUS crack_name_to_nt4_name(TALLOC_CTX *mem_ctx,
        }
        p[0] = '\0';
 
        }
        p[0] = '\0';
 
-       if (p[1]) {
-               *nt4_account = talloc_strdup(mem_ctx, &p[1]);
-               if (*nt4_account == NULL) {
-                       return NT_STATUS_NO_MEMORY;
-               }
+       *nt4_account = talloc_strdup(mem_ctx, &p[1]);
+       if (*nt4_account == NULL) {
+               return NT_STATUS_NO_MEMORY;
        }
 
        return NT_STATUS_OK;
        }
 
        return NT_STATUS_OK;