From: Volker Lendecke Date: Thu, 9 Mar 2017 17:57:14 +0000 (+0100) Subject: winbind_msrpc: Use any_nt_status_not_ok X-Git-Tag: tdb-1.3.13~127 X-Git-Url: http://git.samba.org/samba.git/?p=kai%2Fsamba-autobuild%2F.git;a=commitdiff_plain;h=d92a23e4ae60801edce69bf9b26f50181fe391b5 winbind_msrpc: Use any_nt_status_not_ok Less lines, less bytes .text Signed-off-by: Volker Lendecke Reviewed-by: Jeremy Allison Autobuild-User(master): Jeremy Allison Autobuild-Date(master): Wed Apr 12 05:40:36 CEST 2017 on sn-devel-144 --- diff --git a/source3/winbindd/winbindd_msrpc.c b/source3/winbindd/winbindd_msrpc.c index cd7dfbc6425..c56537662ba 100644 --- a/source3/winbindd/winbindd_msrpc.c +++ b/source3/winbindd/winbindd_msrpc.c @@ -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; }