summaryrefslogtreecommitdiff
path: root/source3/auth
diff options
context:
space:
mode:
authorVolker Lendecke <vl@samba.org>2010-04-11 12:53:00 +0200
committerVolker Lendecke <vl@samba.org>2010-04-11 13:53:21 +0200
commitb0d65f827e2314e907b5fd4768c55ae4c816e8da (patch)
treee01cbfc942580d20ee8e2f58150f06517abe791e /source3/auth
parent9655f63642e9ad3b8b25fcd2beb8bc49fdb9d4e5 (diff)
downloadsamba-b0d65f827e2314e907b5fd4768c55ae4c816e8da.tar.gz
samba-b0d65f827e2314e907b5fd4768c55ae4c816e8da.tar.bz2
samba-b0d65f827e2314e907b5fd4768c55ae4c816e8da.zip
s3: Use talloc_stackframe() in user_in_group
Diffstat (limited to 'source3/auth')
-rw-r--r--source3/auth/auth_util.c8
1 files changed, 1 insertions, 7 deletions
diff --git a/source3/auth/auth_util.c b/source3/auth/auth_util.c
index 93f9d19b61..b7a5aee2c5 100644
--- a/source3/auth/auth_util.c
+++ b/source3/auth/auth_util.c
@@ -1099,16 +1099,10 @@ bool user_in_group_sid(const char *username, const DOM_SID *group_sid)
bool user_in_group(const char *username, const char *groupname)
{
- TALLOC_CTX *mem_ctx;
+ TALLOC_CTX *mem_ctx = talloc_stackframe();
DOM_SID group_sid;
bool ret;
- mem_ctx = talloc_new(NULL);
- if (mem_ctx == NULL) {
- DEBUG(0, ("talloc_new failed\n"));
- return False;
- }
-
ret = lookup_name(mem_ctx, groupname, LOOKUP_NAME_ALL,
NULL, NULL, &group_sid, NULL);
TALLOC_FREE(mem_ctx);