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/net_rpc.c') 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 From 700cece822baee4824224bd707ed27370981256d Mon Sep 17 00:00:00 2001 From: Günther Deschner Date: Thu, 23 Oct 2008 19:01:04 +0200 Subject: s3-samr: remove duplicate copies of SAM server specific access rights. Guenther --- source3/utils/net_rpc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'source3/utils/net_rpc.c') diff --git a/source3/utils/net_rpc.c b/source3/utils/net_rpc.c index ad22a55cdb..9db755d30b 100644 --- a/source3/utils/net_rpc.c +++ b/source3/utils/net_rpc.c @@ -6113,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", -- cgit From f126371f179688a5194f297da4b625439fff7532 Mon Sep 17 00:00:00 2001 From: Günther Deschner Date: Thu, 23 Oct 2008 19:39:14 +0200 Subject: s3-samr: remove duplicate copies of Domain Object specific access rights. Guenther --- source3/utils/net_rpc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'source3/utils/net_rpc.c') diff --git a/source3/utils/net_rpc.c b/source3/utils/net_rpc.c index 9db755d30b..d3b10019d4 100644 --- a/source3/utils/net_rpc.c +++ b/source3/utils/net_rpc.c @@ -6127,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)) { -- cgit