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)
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: