1
0
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:
Volker Lendecke 2023-04-18 11:30:26 +02:00 committed by Jeremy Allison
parent 9e2723988e
commit 12cbb043d1

View File

@ -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)