summaryrefslogtreecommitdiff
path: root/source3/auth
diff options
context:
space:
mode:
authorAndrew Bartlett <abartlet@samba.org>2010-09-17 14:55:56 +1000
committerAndrew Tridgell <tridge@samba.org>2010-10-14 02:35:04 +0000
commit58cf83732a3af2cf2098b1b2108e4b5f36e8fa9e (patch)
tree6078167081e6a9c47923d8808c2659fb041b6542 /source3/auth
parentdeb7c0243663d3fa435531bad77d2897b1d15285 (diff)
downloadsamba-58cf83732a3af2cf2098b1b2108e4b5f36e8fa9e.tar.gz
samba-58cf83732a3af2cf2098b1b2108e4b5f36e8fa9e.tar.bz2
samba-58cf83732a3af2cf2098b1b2108e4b5f36e8fa9e.zip
s3-auth use security_token_has_sid() from the common code
The wrapper call is left here to avoid changing semantics for the NULL parameter case. Andrew Bartlett Signed-off-by: Andrew Tridgell <tridge@samba.org>
Diffstat (limited to 'source3/auth')
-rw-r--r--source3/auth/token_util.c11
1 files changed, 2 insertions, 9 deletions
diff --git a/source3/auth/token_util.c b/source3/auth/token_util.c
index 826801ce50..17078d1e96 100644
--- a/source3/auth/token_util.c
+++ b/source3/auth/token_util.c
@@ -36,17 +36,10 @@
bool nt_token_check_sid ( const struct dom_sid *sid, const struct security_token *token )
{
- int i;
-
if ( !sid || !token )
return False;
- for ( i=0; i<token->num_sids; i++ ) {
- if ( dom_sid_equal( sid, &token->sids[i] ) )
- return True;
- }
-
- return False;
+ return security_token_has_sid(token, sid);
}
bool nt_token_check_domain_rid( struct security_token *token, uint32 rid )
@@ -983,7 +976,7 @@ bool user_in_group_sid(const char *username, const struct dom_sid *group_sid)
return False;
}
- result = nt_token_check_sid(group_sid, token);
+ result = security_token_has_sid(token, group_sid);
TALLOC_FREE(mem_ctx);
return result;