diff options
author | Jelmer Vernooij <jelmer@samba.org> | 2009-03-01 22:25:57 +0100 |
---|---|---|
committer | Jelmer Vernooij <jelmer@samba.org> | 2009-03-01 22:25:57 +0100 |
commit | 9551ab8f7b0e69349dc0c1ffb70a6f67163b242c (patch) | |
tree | 075bfaec7798dc54db47398ab6ebfe68c85b1573 /source3/lib/util_nttoken.c | |
parent | 7ab8f373c84c328b197f923287163e83371e7ccb (diff) | |
parent | 8568b4fa9ff8f6f1a24547ec2ed5e2942b213d9e (diff) | |
download | samba-9551ab8f7b0e69349dc0c1ffb70a6f67163b242c.tar.gz samba-9551ab8f7b0e69349dc0c1ffb70a6f67163b242c.tar.bz2 samba-9551ab8f7b0e69349dc0c1ffb70a6f67163b242c.zip |
Merge branch 'master' of git://git.samba.org/samba into convenience
Diffstat (limited to 'source3/lib/util_nttoken.c')
-rw-r--r-- | source3/lib/util_nttoken.c | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/source3/lib/util_nttoken.c b/source3/lib/util_nttoken.c index 774ef498b7..76e7402422 100644 --- a/source3/lib/util_nttoken.c +++ b/source3/lib/util_nttoken.c @@ -115,3 +115,19 @@ NTSTATUS merge_nt_token(TALLOC_CTX *mem_ctx, return NT_STATUS_OK; } + +/******************************************************************* + Check if this ACE has a SID in common with the token. +********************************************************************/ + +bool token_sid_in_ace(const NT_USER_TOKEN *token, const struct security_ace *ace) +{ + size_t i; + + for (i = 0; i < token->num_sids; i++) { + if (sid_equal(&ace->trustee, &token->user_sids[i])) + return true; + } + + return false; +} |