summaryrefslogtreecommitdiff
path: root/source3/auth/auth_util.c
diff options
context:
space:
mode:
authorSimo Sorce <idra@samba.org>2008-09-03 14:36:43 -0400
committerSimo Sorce <idra@samba.org>2008-09-03 14:36:43 -0400
commit3fa16da8c70af9c54e03ea2a497d18009d2126e9 (patch)
tree2a0c13ba91c9c1701d151ec6b5174abe658be0ee /source3/auth/auth_util.c
parent04691de379fa692b22fc9f0b58c0bd829ce7cc7a (diff)
downloadsamba-3fa16da8c70af9c54e03ea2a497d18009d2126e9.tar.gz
Revert "Split lookup_name() and create a new functiong called"
This reverts commit 8594edf666c29fd4ddf1780da842683dd81483b6. (This used to be commit ad462e2e2d025a7fc23e7dea32b2b442b528970b)
Diffstat (limited to 'source3/auth/auth_util.c')
-rw-r--r--source3/auth/auth_util.c17
1 files changed, 13 insertions, 4 deletions
diff --git a/source3/auth/auth_util.c b/source3/auth/auth_util.c
index 5b2c3045c33..9220df01c00 100644
--- a/source3/auth/auth_util.c
+++ b/source3/auth/auth_util.c
@@ -1086,6 +1086,7 @@ 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;
@@ -1151,10 +1152,18 @@ NTSTATUS make_server_info_pw(auth_serversupplied_info **server_info,
return NT_STATUS_NO_MEMORY;
}
- if (!lookup_domain_name(mem_ctx,
- unix_users_domain_name(), unix_username,
- LOOKUP_NAME_ALL,
- NULL, NULL, &u_sid, &type)) {
+ 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)) {
TALLOC_FREE(result);
TALLOC_FREE(mem_ctx);
return NT_STATUS_NO_SUCH_USER;