s3:utils: Use any_nt_status_not_ok() in rpc_rights_grant_internal()
authorAndreas Schneider <asn@samba.org>
Thu, 2 Nov 2023 07:31:32 +0000 (08:31 +0100)
committerAndreas Schneider <asn@cryptomilk.org>
Tue, 21 Nov 2023 11:16:37 +0000 (11:16 +0000)
Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
source3/utils/net_rpc_rights.c

index 4198c710bd998078f6b65e149d57aecc8931fbab..267ce6576e6f6c3804fc14045abe8adde57b6897 100644 (file)
@@ -539,10 +539,7 @@ static NTSTATUS rpc_rights_grant_internal(struct net_context *c,
                                             &sid,
                                             &rights,
                                             &result);
-       if (!NT_STATUS_IS_OK(status))
-               goto done;
-       if (!NT_STATUS_IS_OK(result)) {
-               status = result;
+       if (any_nt_status_not_ok(status, result, &status)) {
                goto done;
        }