summaryrefslogtreecommitdiff
path: root/source3/lib/util_nttoken.c
diff options
context:
space:
mode:
authorJelmer Vernooij <jelmer@samba.org>2009-03-01 17:59:30 +0100
committerJelmer Vernooij <jelmer@samba.org>2009-03-01 18:00:26 +0100
commit99b288156f021db7bb771f3a5bf78def61d699f2 (patch)
tree7c91b4621ca367b937162b891a5c3d5e653dfec9 /source3/lib/util_nttoken.c
parentbbe2d30f66ebd8537203870b1225179f03d42744 (diff)
downloadsamba-99b288156f021db7bb771f3a5bf78def61d699f2.tar.gz
samba-99b288156f021db7bb771f3a5bf78def61d699f2.tar.bz2
samba-99b288156f021db7bb771f3a5bf78def61d699f2.zip
Move secace.c to top-level.
Diffstat (limited to 'source3/lib/util_nttoken.c')
-rw-r--r--source3/lib/util_nttoken.c16
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;
+}