summaryrefslogtreecommitdiff
path: root/source3/utils
diff options
context:
space:
mode:
authorJeremy Allison <jra@samba.org>2008-10-31 10:51:45 -0700
committerJeremy Allison <jra@samba.org>2008-10-31 10:51:45 -0700
commit8344e945742ff343702b9667e26082c560014523 (patch)
tree1e63530a7e4d96b47abaab0192f1f302b6aefb2e /source3/utils
parent161cb81911fe8877bfefd8bd3553f0b3166299fb (diff)
downloadsamba-8344e945742ff343702b9667e26082c560014523.tar.gz
samba-8344e945742ff343702b9667e26082c560014523.tar.bz2
samba-8344e945742ff343702b9667e26082c560014523.zip
Unify se_access_check with the S4 code. Will make
calculation of SEC_FLAG_MAXIMUM_ALLOWED much easier for files. Jeremy.
Diffstat (limited to 'source3/utils')
-rw-r--r--source3/utils/net_rpc.c18
1 files changed, 7 insertions, 11 deletions
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);
}