]> git.ipfire.org Git - thirdparty/samba.git/commitdiff
rpc_server: Use any_nt_status_not_ok() in srv_netlog_nt.c
authorVolker Lendecke <vl@samba.org>
Wed, 24 Feb 2021 15:01:27 +0000 (16:01 +0100)
committerJeremy Allison <jra@samba.org>
Tue, 9 Mar 2021 22:36:28 +0000 (22:36 +0000)
Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
source3/rpc_server/netlogon/srv_netlog_nt.c

index 0f59ebf72301c943aaf86e8692758b8f0b74b695..601e126ca8bee8bdf6b3d1844bff9e7a5769fd36 100644 (file)
@@ -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;
        }