summaryrefslogtreecommitdiff
path: root/source3
diff options
context:
space:
mode:
Diffstat (limited to 'source3')
-rw-r--r--source3/utils/net_rpc_rights.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/source3/utils/net_rpc_rights.c b/source3/utils/net_rpc_rights.c
index 2bc5efe3cf..ddcfff3685 100644
--- a/source3/utils/net_rpc_rights.c
+++ b/source3/utils/net_rpc_rights.c
@@ -449,8 +449,11 @@ static NTSTATUS rpc_rights_grant_internal(struct net_context *c,
}
result = name_to_sid(pipe_hnd, mem_ctx, &sid, argv[0]);
+ if (NT_STATUS_EQUAL(result, NT_STATUS_NONE_MAPPED))
+ result = NT_STATUS_NO_SUCH_USER;
+
if (!NT_STATUS_IS_OK(result))
- return result;
+ goto done;
result = rpccli_lsa_open_policy2(pipe_hnd, mem_ctx, true,
SEC_RIGHTS_MAXIMUM_ALLOWED,