summaryrefslogtreecommitdiff
path: root/source3/lib
diff options
context:
space:
mode:
authorJeremy Allison <jra@samba.org>2008-10-21 18:05:48 -0700
committerJeremy Allison <jra@samba.org>2008-10-21 18:05:48 -0700
commit4e9db0b1004aedf9eef69b9361ed6d9e69897a1e (patch)
tree9b6a40d9ca106e176b91a123f5892fe73a1d3bfc /source3/lib
parentf36e51617c7bd316f3ef393532bbc169895d6a66 (diff)
downloadsamba-4e9db0b1004aedf9eef69b9361ed6d9e69897a1e.tar.gz
samba-4e9db0b1004aedf9eef69b9361ed6d9e69897a1e.tar.bz2
samba-4e9db0b1004aedf9eef69b9361ed6d9e69897a1e.zip
Cope with MAXIMUM_ALLOWED_ACCESS requests when opening handles.
Jeremy.
Diffstat (limited to 'source3/lib')
-rw-r--r--source3/lib/util_sid.c11
1 files changed, 11 insertions, 0 deletions
diff --git a/source3/lib/util_sid.c b/source3/lib/util_sid.c
index 53614ed1ac..f656bb13dc 100644
--- a/source3/lib/util_sid.c
+++ b/source3/lib/util_sid.c
@@ -664,6 +664,17 @@ bool is_null_sid(const DOM_SID *sid)
return sid_equal(sid, &null_sid);
}
+bool is_sid_in_token(const NT_USER_TOKEN *token, const DOM_SID *sid)
+{
+ int i;
+
+ for (i=0; i<token->num_sids; i++) {
+ if (sid_compare(sid, &token->user_sids[i]) == 0)
+ return true;
+ }
+ return false;
+}
+
NTSTATUS sid_array_from_info3(TALLOC_CTX *mem_ctx,
const struct netr_SamInfo3 *info3,
DOM_SID **user_sids,