From 58cf83732a3af2cf2098b1b2108e4b5f36e8fa9e Mon Sep 17 00:00:00 2001 From: Andrew Bartlett Date: Fri, 17 Sep 2010 14:55:56 +1000 Subject: 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 --- source3/auth/token_util.c | 11 ++--------- 1 file changed, 2 insertions(+), 9 deletions(-) (limited to 'source3/auth') 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; inum_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; -- cgit