(state->current_sid == NULL) is true if and only if we could not
assign state->current_sid because num_sids was too small. Make that
more explicit.
Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
}
current_token = session_info->security_token;
- if (current_token->num_sids > PRIMARY_USER_SID_INDEX) {
- state->current_sid = ¤t_token->sids[PRIMARY_USER_SID_INDEX];
- }
-
- if (state->current_sid == NULL) {
+ if (current_token->num_sids <= PRIMARY_USER_SID_INDEX) {
tevent_req_done(req);
return tevent_req_post(req, ev);
}
+ state->current_sid = ¤t_token->sids[PRIMARY_USER_SID_INDEX];
if (!security_token_has_nt_authenticated_users(current_token)) {
/* TODO */