From: Volker Lendecke Date: Wed, 24 Feb 2021 15:01:27 +0000 (+0100) Subject: rpc_server: Use any_nt_status_not_ok() in srv_netlog_nt.c X-Git-Tag: tevent-0.11.0~1622 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=559b4df143159d5effffd5de4be291b34bb8ed2a;p=thirdparty%2Fsamba.git rpc_server: Use any_nt_status_not_ok() in srv_netlog_nt.c Signed-off-by: Volker Lendecke Reviewed-by: Jeremy Allison --- diff --git a/source3/rpc_server/netlogon/srv_netlog_nt.c b/source3/rpc_server/netlogon/srv_netlog_nt.c index 0f59ebf7230..601e126ca8b 100644 --- a/source3/rpc_server/netlogon/srv_netlog_nt.c +++ b/source3/rpc_server/netlogon/srv_netlog_nt.c @@ -441,11 +441,7 @@ NTSTATUS _netr_NetrEnumerateTrustedDomains(struct pipes_struct *p, LSA_POLICY_VIEW_LOCAL_INFORMATION, &pol, &result); - if (!NT_STATUS_IS_OK(status)) { - goto out; - } - if (!NT_STATUS_IS_OK(result)) { - status = result; + if (any_nt_status_not_ok(status, result, &status)) { goto out; } @@ -540,11 +536,7 @@ static NTSTATUS samr_find_machine_account(TALLOC_CTX *mem_ctx, SAMR_ACCESS_LOOKUP_DOMAIN, &connect_handle, &result); - if (!NT_STATUS_IS_OK(status)) { - goto out; - } - if (!NT_STATUS_IS_OK(result)) { - status = result; + if (any_nt_status_not_ok(status, result, &status)) { goto out; } @@ -555,11 +547,7 @@ static NTSTATUS samr_find_machine_account(TALLOC_CTX *mem_ctx, &domain_name, &domain_sid, &result); - if (!NT_STATUS_IS_OK(status)) { - goto out; - } - if (!NT_STATUS_IS_OK(result)) { - status = result; + if (any_nt_status_not_ok(status, result, &status)) { goto out; } @@ -569,11 +557,7 @@ static NTSTATUS samr_find_machine_account(TALLOC_CTX *mem_ctx, domain_sid, &domain_handle, &result); - if (!NT_STATUS_IS_OK(status)) { - goto out; - } - if (!NT_STATUS_IS_OK(result)) { - status = result; + if (any_nt_status_not_ok(status, result, &status)) { goto out; } @@ -586,11 +570,7 @@ static NTSTATUS samr_find_machine_account(TALLOC_CTX *mem_ctx, &rids, &types, &result); - if (!NT_STATUS_IS_OK(status)) { - goto out; - } - if (!NT_STATUS_IS_OK(result)) { - status = result; + if (any_nt_status_not_ok(status, result, &status)) { goto out; } @@ -615,11 +595,7 @@ static NTSTATUS samr_find_machine_account(TALLOC_CTX *mem_ctx, rid, user_handle, &result); - if (!NT_STATUS_IS_OK(status)) { - goto out; - } - if (!NT_STATUS_IS_OK(result)) { - status = result; + if (any_nt_status_not_ok(status, result, &status)) { goto out; } @@ -727,11 +703,7 @@ static NTSTATUS get_md4pw(struct samr_Password *md4pw, const char *mach_acct, UserControlInformation, &info, &result); - if (!NT_STATUS_IS_OK(status)) { - goto out; - } - if (!NT_STATUS_IS_OK(result)) { - status = result; + if (any_nt_status_not_ok(status, result, &status)) { goto out; } @@ -789,11 +761,7 @@ static NTSTATUS get_md4pw(struct samr_Password *md4pw, const char *mach_acct, &info, &result); unbecome_root(); - if (!NT_STATUS_IS_OK(status)) { - goto out; - } - if (!NT_STATUS_IS_OK(result)) { - status = result; + if (any_nt_status_not_ok(status, result, &status)) { goto out; } @@ -1275,11 +1243,7 @@ static NTSTATUS netr_set_machine_account_password(TALLOC_CTX *mem_ctx, UserControlInformation, &info, &result); - if (!NT_STATUS_IS_OK(status)) { - goto out; - } - if (!NT_STATUS_IS_OK(result)) { - status = result; + if (any_nt_status_not_ok(status, result, &status)) { goto out; } @@ -1350,11 +1314,7 @@ static NTSTATUS netr_set_machine_account_password(TALLOC_CTX *mem_ctx, info, &result); unbecome_root(); - if (!NT_STATUS_IS_OK(status)) { - goto out; - } - if (!NT_STATUS_IS_OK(result)) { - status = result; + if (any_nt_status_not_ok(status, result, &status)) { goto out; }