summaryrefslogtreecommitdiffstats
path: root/source3/modules/vfs_acl_common.c
diff options
context:
space:
mode:
Diffstat (limited to 'source3/modules/vfs_acl_common.c')
-rw-r--r--source3/modules/vfs_acl_common.c16
1 files changed, 9 insertions, 7 deletions
diff --git a/source3/modules/vfs_acl_common.c b/source3/modules/vfs_acl_common.c
index 5d6cfe7f3e6..9e356b933e9 100644
--- a/source3/modules/vfs_acl_common.c
+++ b/source3/modules/vfs_acl_common.c
@@ -471,8 +471,12 @@ static NTSTATUS check_parent_acl_common(vfs_handle_struct *handle,
nt_errstr(status) ));
return status;
}
- status = smb1_file_se_access_check(parent_desc,
- handle->conn->server_info->ptok,
+ if (pp_parent_desc) {
+ *pp_parent_desc = parent_desc;
+ }
+ status = smb1_file_se_access_check(handle->conn,
+ parent_desc,
+ get_current_nttok(handle->conn),
access_mask,
&access_granted);
if(!NT_STATUS_IS_OK(status)) {
@@ -485,9 +489,6 @@ static NTSTATUS check_parent_acl_common(vfs_handle_struct *handle,
nt_errstr(status) ));
return status;
}
- if (pp_parent_desc) {
- *pp_parent_desc = parent_desc;
- }
return NT_STATUS_OK;
}
@@ -535,8 +536,9 @@ static int open_acl_common(vfs_handle_struct *handle,
&pdesc);
if (NT_STATUS_IS_OK(status)) {
/* See if we can access it. */
- status = smb1_file_se_access_check(pdesc,
- handle->conn->server_info->ptok,
+ status = smb1_file_se_access_check(handle->conn,
+ pdesc,
+ get_current_nttok(handle->conn),
fsp->access_mask,
&access_granted);
if (!NT_STATUS_IS_OK(status)) {