From a2be29dfa32a675249f743632a24450d5147a112 Mon Sep 17 00:00:00 2001 From: Jeremy Allison Date: Fri, 12 Mar 2010 14:31:47 -0800 Subject: 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. --- source3/modules/vfs_acl_common.c | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) (limited to 'source3/modules') 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)) { -- cgit