summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--source3/rpc_server/srv_srvsvc_nt.c19
1 files changed, 3 insertions, 16 deletions
diff --git a/source3/rpc_server/srv_srvsvc_nt.c b/source3/rpc_server/srv_srvsvc_nt.c
index f1dabd64a9..2ae4a73874 100644
--- a/source3/rpc_server/srv_srvsvc_nt.c
+++ b/source3/rpc_server/srv_srvsvc_nt.c
@@ -310,7 +310,6 @@ BOOL share_access_check(connection_struct *conn, int snum, uint16 vuid, uint32 d
NT_USER_TOKEN *token = NULL;
user_struct *vuser = get_valid_user_struct(vuid);
BOOL ret = True;
- BOOL is_root = False;
mem_ctx = talloc_init();
if (mem_ctx == NULL)
@@ -321,24 +320,12 @@ BOOL share_access_check(connection_struct *conn, int snum, uint16 vuid, uint32 d
if (!psd)
goto out;
- if (vuser) {
+ if (vuser)
token = vuser->nt_user_token;
- if (vuser->uid == (uid_t)0)
- is_root = True;
- } else {
+ else
token = conn->nt_user_token;
- if (conn->uid == (uid_t)0)
- is_root = True;
- }
- /*
- * Root gets a free pass.
- */
-
- if (is_root)
- ret = True;
- else
- ret = se_access_check(psd, token, desired_access, &granted, &status);
+ ret = se_access_check(psd, token, desired_access, &granted, &status);
out: