diff options
Diffstat (limited to 'source3/auth/auth_util.c')
-rw-r--r-- | source3/auth/auth_util.c | 17 |
1 files changed, 4 insertions, 13 deletions
diff --git a/source3/auth/auth_util.c b/source3/auth/auth_util.c index 9220df01c0..5b2c3045c3 100644 --- a/source3/auth/auth_util.c +++ b/source3/auth/auth_util.c @@ -1086,7 +1086,6 @@ NTSTATUS make_server_info_pw(auth_serversupplied_info **server_info, NTSTATUS status; struct samu *sampass = NULL; gid_t *gids; - char *qualified_name = NULL; TALLOC_CTX *mem_ctx = NULL; DOM_SID u_sid; enum lsa_SidType type; @@ -1152,18 +1151,10 @@ NTSTATUS make_server_info_pw(auth_serversupplied_info **server_info, return NT_STATUS_NO_MEMORY; } - qualified_name = talloc_asprintf(mem_ctx, "%s\\%s", - unix_users_domain_name(), - unix_username ); - if (!qualified_name) { - TALLOC_FREE(result); - TALLOC_FREE(mem_ctx); - return NT_STATUS_NO_MEMORY; - } - - if (!lookup_name(mem_ctx, qualified_name, LOOKUP_NAME_ALL, - NULL, NULL, - &u_sid, &type)) { + if (!lookup_domain_name(mem_ctx, + unix_users_domain_name(), unix_username, + LOOKUP_NAME_ALL, + NULL, NULL, &u_sid, &type)) { TALLOC_FREE(result); TALLOC_FREE(mem_ctx); return NT_STATUS_NO_SUCH_USER; |