summaryrefslogtreecommitdiff
path: root/source3/modules
diff options
context:
space:
mode:
authorJeremy Allison <jra@samba.org>2010-03-12 14:31:47 -0800
committerJeremy Allison <jra@samba.org>2010-03-12 14:31:47 -0800
commita2be29dfa32a675249f743632a24450d5147a112 (patch)
tree4db445dfdecab1001fab91b96e24ab12fa810e1d /source3/modules
parente80ceb1d7355c8c46a2ed90d5721cf367640f4e8 (diff)
downloadsamba-a2be29dfa32a675249f743632a24450d5147a112.tar.gz
samba-a2be29dfa32a675249f743632a24450d5147a112.tar.bz2
samba-a2be29dfa32a675249f743632a24450d5147a112.zip
Missed a couple more uses of conn->server_info->ptok that need to be get_current_nttok(conn)
Centralize the root check into smb1_file_se_access_check() so this is used by modules/vfs_acl_common.c also. Jeremy.
Diffstat (limited to 'source3/modules')
-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 5d6cfe7f3e..9e356b933e 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)) {