mirror of
https://github.com/samba-team/samba.git
synced 2024-12-22 13:34:15 +03:00
libcli: Simplify security_token_is_sid()
Avoid an explicit if-statement. Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
This commit is contained in:
parent
9e2723988e
commit
12cbb043d1
@ -67,13 +67,13 @@ void security_token_debug(int dbg_class, int dbg_lev, const struct security_toke
|
||||
|
||||
bool security_token_is_sid(const struct security_token *token, const struct dom_sid *sid)
|
||||
{
|
||||
bool ret;
|
||||
|
||||
if (token->sids == NULL) {
|
||||
return false;
|
||||
}
|
||||
if (dom_sid_equal(&token->sids[PRIMARY_USER_SID_INDEX], sid)) {
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
ret = dom_sid_equal(&token->sids[PRIMARY_USER_SID_INDEX], sid);
|
||||
return ret;
|
||||
}
|
||||
|
||||
bool security_token_is_system(const struct security_token *token)
|
||||
|
Loading…
Reference in New Issue
Block a user