diff options
author | Volker Lendecke <vl@samba.org> | 2010-04-11 12:47:13 +0200 |
---|---|---|
committer | Volker Lendecke <vl@samba.org> | 2010-04-11 13:53:21 +0200 |
commit | 9cf448a30efc73392f267547ef48b7ab19790900 (patch) | |
tree | 41b2f80032bb97249b5b33c6da81e76f9ab30f6d /source3 | |
parent | 3c169c0475bc4f69c81b93a66884cc3cd9ba19dc (diff) | |
download | samba-9cf448a30efc73392f267547ef48b7ab19790900.tar.gz samba-9cf448a30efc73392f267547ef48b7ab19790900.tar.bz2 samba-9cf448a30efc73392f267547ef48b7ab19790900.zip |
s3: Use talloc_stackframe() in create_token_from_username
Diffstat (limited to 'source3')
-rw-r--r-- | source3/auth/auth_util.c | 8 |
1 files changed, 1 insertions, 7 deletions
diff --git a/source3/auth/auth_util.c b/source3/auth/auth_util.c index 05a530d176..08dae60485 100644 --- a/source3/auth/auth_util.c +++ b/source3/auth/auth_util.c @@ -826,7 +826,7 @@ NTSTATUS create_token_from_username(TALLOC_CTX *mem_ctx, const char *username, struct nt_user_token **token) { NTSTATUS result = NT_STATUS_NO_SUCH_USER; - TALLOC_CTX *tmp_ctx; + TALLOC_CTX *tmp_ctx = talloc_stackframe(); DOM_SID user_sid; enum lsa_SidType type; gid_t *gids; @@ -836,12 +836,6 @@ NTSTATUS create_token_from_username(TALLOC_CTX *mem_ctx, const char *username, size_t num_gids; size_t i; - tmp_ctx = talloc_new(NULL); - if (tmp_ctx == NULL) { - DEBUG(0, ("talloc_new failed\n")); - return NT_STATUS_NO_MEMORY; - } - if (!lookup_name_smbconf(tmp_ctx, username, LOOKUP_NAME_ALL, NULL, NULL, &user_sid, &type)) { DEBUG(1, ("lookup_name_smbconf for %s failed\n", username)); |