mirror of
https://github.com/samba-team/samba.git
synced 2025-08-24 21:49:29 +03:00
s3-auth: Make is_null_sid() check easier to read.
Signed-off-by: Simo Sorce <idra@samba.org> Reviewed-by: Andreas Schneider <asn@samba.org> Reviewed-by: Guenther Deschner <gd@samba.org>
This commit is contained in:
committed by
Günther Deschner
parent
48ffca0aca
commit
cf73692f96
@ -453,6 +453,7 @@ NTSTATUS passwd_to_SamInfo3(TALLOC_CTX *mem_ctx,
|
|||||||
enum lsa_SidType type;
|
enum lsa_SidType type;
|
||||||
uint32_t num_sids = 0;
|
uint32_t num_sids = 0;
|
||||||
struct dom_sid *user_sids = NULL;
|
struct dom_sid *user_sids = NULL;
|
||||||
|
bool is_null;
|
||||||
bool ok;
|
bool ok;
|
||||||
|
|
||||||
tmp_ctx = talloc_stackframe();
|
tmp_ctx = talloc_stackframe();
|
||||||
@ -514,8 +515,8 @@ NTSTATUS passwd_to_SamInfo3(TALLOC_CTX *mem_ctx,
|
|||||||
}
|
}
|
||||||
|
|
||||||
/* Make sure we have a valid group sid */
|
/* Make sure we have a valid group sid */
|
||||||
ok = !is_null_sid(&group_sid);
|
is_null = is_null_sid(&group_sid);
|
||||||
if (!ok) {
|
if (is_null) {
|
||||||
status = NT_STATUS_NO_SUCH_USER;
|
status = NT_STATUS_NO_SUCH_USER;
|
||||||
goto done;
|
goto done;
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user