From 8344e945742ff343702b9667e26082c560014523 Mon Sep 17 00:00:00 2001 From: Jeremy Allison Date: Fri, 31 Oct 2008 10:51:45 -0700 Subject: Unify se_access_check with the S4 code. Will make calculation of SEC_FLAG_MAXIMUM_ALLOWED much easier for files. Jeremy. --- source3/utils/net_rpc.c | 18 +++++++----------- 1 file changed, 7 insertions(+), 11 deletions(-) (limited to 'source3/utils') diff --git a/source3/utils/net_rpc.c b/source3/utils/net_rpc.c index 531bbfe43c..ad22a55cdb 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); } -- cgit