diff options
author | Jeremy Allison <jra@samba.org> | 2008-01-11 22:38:42 -0800 |
---|---|---|
committer | Jeremy Allison <jra@samba.org> | 2008-01-11 22:38:42 -0800 |
commit | 05fb367a014305f385a6db6653bd327861291563 (patch) | |
tree | 0c0613cccf22ed0cc92498ee0371b95db01f5c8c /source3/lib/sharesec.c | |
parent | 1d1b996f3879b87418bdde2fd1691ae2cca42cd4 (diff) | |
parent | 45db92cc72eb2472425c17e72ff9254d35d8047c (diff) | |
download | samba-05fb367a014305f385a6db6653bd327861291563.tar.gz samba-05fb367a014305f385a6db6653bd327861291563.tar.bz2 samba-05fb367a014305f385a6db6653bd327861291563.zip |
Merge branch 'v3-2-test' of ssh://jra@git.samba.org/data/git/samba into v3-2-test
(This used to be commit 08645826817d42c9d4b42ea0fd5e633d7fd08d35)
Diffstat (limited to 'source3/lib/sharesec.c')
-rw-r--r-- | source3/lib/sharesec.c | 11 |
1 files changed, 3 insertions, 8 deletions
diff --git a/source3/lib/sharesec.c b/source3/lib/sharesec.c index ba025dacc1..f6ff701d5b 100644 --- a/source3/lib/sharesec.c +++ b/source3/lib/sharesec.c @@ -228,25 +228,20 @@ bool share_access_check(const NT_USER_TOKEN *token, const char *sharename, { uint32 granted; NTSTATUS status; - TALLOC_CTX *mem_ctx = NULL; SEC_DESC *psd = NULL; size_t sd_size; bool ret = True; - if (!(mem_ctx = talloc_init("share_access_check"))) { - return False; - } - - psd = get_share_security(mem_ctx, sharename, &sd_size); + psd = get_share_security(talloc_tos(), sharename, &sd_size); if (!psd) { - TALLOC_FREE(mem_ctx); return True; } ret = se_access_check(psd, token, desired_access, &granted, &status); - talloc_destroy(mem_ctx); + TALLOC_FREE(psd); + return ret; } |