mirror of
https://github.com/samba-team/samba.git
synced 2025-02-26 21:57:41 +03:00
winbind_msrpc: Use any_nt_status_not_ok
Less lines, less bytes .text Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org> Autobuild-User(master): Jeremy Allison <jra@samba.org> Autobuild-Date(master): Wed Apr 12 05:40:36 CEST 2017 on sn-devel-144
This commit is contained in:
parent
5ee6d44665
commit
d92a23e4ae
@ -576,12 +576,9 @@ static NTSTATUS msrpc_lookup_groupmem(struct winbindd_domain *domain,
|
||||
group_rid,
|
||||
&group_pol,
|
||||
&result);
|
||||
if (!NT_STATUS_IS_OK(status)) {
|
||||
if (any_nt_status_not_ok(status, result, &status)) {
|
||||
return status;
|
||||
}
|
||||
if (!NT_STATUS_IS_OK(result)) {
|
||||
return result;
|
||||
}
|
||||
|
||||
/* Step #1: Get a list of user rids that are the members of the
|
||||
group. */
|
||||
@ -604,14 +601,10 @@ static NTSTATUS msrpc_lookup_groupmem(struct winbindd_domain *domain,
|
||||
dcerpc_samr_Close(b, mem_ctx, &group_pol, &_result);
|
||||
}
|
||||
|
||||
if (!NT_STATUS_IS_OK(status)) {
|
||||
if (any_nt_status_not_ok(status, result, &status)) {
|
||||
return status;
|
||||
}
|
||||
|
||||
if (!NT_STATUS_IS_OK(result)) {
|
||||
return result;
|
||||
}
|
||||
|
||||
if (!rids || !rids->count) {
|
||||
names = NULL;
|
||||
name_types = NULL;
|
||||
@ -927,12 +920,8 @@ static NTSTATUS msrpc_lockout_policy(struct winbindd_domain *domain,
|
||||
DomainLockoutInformation,
|
||||
&info,
|
||||
&result);
|
||||
if (!NT_STATUS_IS_OK(status)) {
|
||||
goto done;
|
||||
}
|
||||
if (!NT_STATUS_IS_OK(result)) {
|
||||
status = result;
|
||||
goto done;
|
||||
if (any_nt_status_not_ok(status, result, &status)) {
|
||||
return status;
|
||||
}
|
||||
|
||||
*lockout_policy = info->info12;
|
||||
@ -1062,14 +1051,10 @@ NTSTATUS winbindd_lookup_sids(TALLOC_CTX *mem_ctx,
|
||||
status = NT_STATUS_ACCESS_DENIED;
|
||||
}
|
||||
|
||||
if (!NT_STATUS_IS_OK(status)) {
|
||||
if (any_nt_status_not_ok(status, result, &status)) {
|
||||
return status;
|
||||
}
|
||||
|
||||
if (!NT_STATUS_IS_OK(result)) {
|
||||
return result;
|
||||
}
|
||||
|
||||
return NT_STATUS_OK;
|
||||
}
|
||||
|
||||
@ -1141,14 +1126,10 @@ static NTSTATUS winbindd_lookup_names(TALLOC_CTX *mem_ctx,
|
||||
status = NT_STATUS_ACCESS_DENIED;
|
||||
}
|
||||
|
||||
if (!NT_STATUS_IS_OK(status)) {
|
||||
if (any_nt_status_not_ok(status, result, &status)) {
|
||||
return status;
|
||||
}
|
||||
|
||||
if (!NT_STATUS_IS_OK(result)) {
|
||||
return result;
|
||||
}
|
||||
|
||||
return NT_STATUS_OK;
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user