mirror of
https://github.com/samba-team/samba.git
synced 2024-12-22 13:34:15 +03:00
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>
This commit is contained in:
parent
deb7c02436
commit
58cf83732a
@ -36,17 +36,10 @@
|
|||||||
|
|
||||||
bool nt_token_check_sid ( const struct dom_sid *sid, const struct security_token *token )
|
bool nt_token_check_sid ( const struct dom_sid *sid, const struct security_token *token )
|
||||||
{
|
{
|
||||||
int i;
|
|
||||||
|
|
||||||
if ( !sid || !token )
|
if ( !sid || !token )
|
||||||
return False;
|
return False;
|
||||||
|
|
||||||
for ( i=0; i<token->num_sids; i++ ) {
|
return security_token_has_sid(token, sid);
|
||||||
if ( dom_sid_equal( sid, &token->sids[i] ) )
|
|
||||||
return True;
|
|
||||||
}
|
|
||||||
|
|
||||||
return False;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
bool nt_token_check_domain_rid( struct security_token *token, uint32 rid )
|
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;
|
return False;
|
||||||
}
|
}
|
||||||
|
|
||||||
result = nt_token_check_sid(group_sid, token);
|
result = security_token_has_sid(token, group_sid);
|
||||||
|
|
||||||
TALLOC_FREE(mem_ctx);
|
TALLOC_FREE(mem_ctx);
|
||||||
return result;
|
return result;
|
||||||
|
Loading…
Reference in New Issue
Block a user