diff options
Diffstat (limited to 'source3/utils/net_rpc.c')
-rw-r--r-- | source3/utils/net_rpc.c | 22 |
1 files changed, 9 insertions, 13 deletions
diff --git a/source3/utils/net_rpc.c b/source3/utils/net_rpc.c index 531bbfe43c..d3b10019d4 100644 --- a/source3/utils/net_rpc.c +++ b/source3/utils/net_rpc.c @@ -4285,16 +4285,15 @@ static void show_userlist(struct rpc_pipe_client *pipe_hnd, uint32 acc_granted; if (share_sd != NULL) { - if (!se_access_check(share_sd, &tokens[i].token, - 1, &acc_granted, &status)) { + status = se_access_check(share_sd, &tokens[i].token, + 1, &acc_granted); + + if (!NT_STATUS_IS_OK(status)) { DEBUG(1, ("Could not check share_sd for " "user %s\n", tokens[i].name)); continue; } - - if (!NT_STATUS_IS_OK(status)) - continue; } if (root_sd == NULL) { @@ -4302,16 +4301,13 @@ static void show_userlist(struct rpc_pipe_client *pipe_hnd, continue; } - if (!se_access_check(root_sd, &tokens[i].token, - 1, &acc_granted, &status)) { + status = se_access_check(root_sd, &tokens[i].token, + 1, &acc_granted); + if (!NT_STATUS_IS_OK(status)) { DEBUG(1, ("Could not check root_sd for user %s\n", tokens[i].name)); continue; } - - if (!NT_STATUS_IS_OK(status)) - continue; - d_printf(" %s\n", tokens[i].name); } @@ -6117,7 +6113,7 @@ static int rpc_trustdom_list(struct net_context *c, int argc, const char **argv) /* SamrConnect2 */ nt_status = rpccli_samr_Connect2(pipe_hnd, mem_ctx, pipe_hnd->desthost, - SA_RIGHT_SAM_OPEN_DOMAIN, + SAMR_ACCESS_OPEN_DOMAIN, &connect_hnd); if (!NT_STATUS_IS_OK(nt_status)) { DEBUG(0, ("Couldn't open SAMR policy handle. Error was %s\n", @@ -6131,7 +6127,7 @@ static int rpc_trustdom_list(struct net_context *c, int argc, const char **argv) able to enumerate accounts*/ nt_status = rpccli_samr_OpenDomain(pipe_hnd, mem_ctx, &connect_hnd, - SA_RIGHT_DOMAIN_ENUM_ACCOUNTS, + SAMR_DOMAIN_ACCESS_ENUM_ACCOUNTS, queried_dom_sid, &domain_hnd); if (!NT_STATUS_IS_OK(nt_status)) { |