git.samba.org
/
amitay
/
samba.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
9655f63
)
s3: Use talloc_stackframe() in user_in_group
author
Volker Lendecke
<vl@samba.org>
Sun, 11 Apr 2010 10:53:00 +0000
(12:53 +0200)
committer
Volker Lendecke
<vl@samba.org>
Sun, 11 Apr 2010 11:53:21 +0000
(13:53 +0200)
source3/auth/auth_util.c
patch
|
blob
|
history
diff --git
a/source3/auth/auth_util.c
b/source3/auth/auth_util.c
index 93f9d19b612a3991402d1ebc4124bba77b285634..b7a5aee2c5753be9cb6cd0f42193a9107976161b 100644
(file)
--- 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);