summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTim Prouty <tprouty@samba.org>2009-02-04 17:28:21 -0800
committerTim Prouty <tprouty@samba.org>2009-02-09 23:47:46 -0800
commit9a7491e83177ba32e30f29e1b84b8b8be9888953 (patch)
treee066c6da20d4d57daaa20a5b5bc6250602dbb88d
parent16d2c2fa58c57539a9b540eb93825806caaea0b5 (diff)
downloadsamba-9a7491e83177ba32e30f29e1b84b8b8be9888953.tar.gz
samba-9a7491e83177ba32e30f29e1b84b8b8be9888953.tar.bz2
samba-9a7491e83177ba32e30f29e1b84b8b8be9888953.zip
s3 OneFS: Change ACLs to do a stat-only open before get/set_security_descriptor
This ensures that getting/stting a security descriptor does not contend an oplock. The correct access checks will be still be done in the kernel on the get/set rather than the open.
-rw-r--r--source3/modules/onefs_acl.c26
1 files changed, 4 insertions, 22 deletions
diff --git a/source3/modules/onefs_acl.c b/source3/modules/onefs_acl.c
index 14b27b80e0..0ef7e0be51 100644
--- a/source3/modules/onefs_acl.c
+++ b/source3/modules/onefs_acl.c
@@ -620,19 +620,11 @@ onefs_fget_nt_acl(vfs_handle_struct *handle, files_struct *fsp,
fsp->fsp_name, security_info));
if (fsp->fh->fd == -1) {
- enum ifs_ace_rights desired_access = 0;
-
- if (security_info & (OWNER_SECURITY_INFORMATION |
- GROUP_SECURITY_INFORMATION | DACL_SECURITY_INFORMATION))
- desired_access |= IFS_RTS_STD_READ_CONTROL;
- if (security_info & SACL_SECURITY_INFORMATION)
- desired_access |= IFS_RTS_SACL_ACCESS;
-
if ((fsp->fh->fd = onefs_sys_create_file(handle->conn,
-1,
fsp->fsp_name,
- desired_access,
- desired_access,
+ 0,
+ 0,
0,
0,
0,
@@ -906,21 +898,11 @@ onefs_fset_nt_acl(vfs_handle_struct *handle, files_struct *fsp,
fd = fsp->fh->fd;
if (fd == -1) {
- enum ifs_ace_rights desired_access = 0;
-
- if (security_info_sent &
- (OWNER_SECURITY_INFORMATION | GROUP_SECURITY_INFORMATION))
- desired_access |= IFS_RTS_STD_WRITE_OWNER;
- if (security_info_sent & DACL_SECURITY_INFORMATION)
- desired_access |= IFS_RTS_STD_WRITE_DAC;
- if (security_info_sent & SACL_SECURITY_INFORMATION)
- desired_access |= IFS_RTS_SACL_ACCESS;
-
if ((fd = onefs_sys_create_file(handle->conn,
-1,
fsp->fsp_name,
- desired_access,
- desired_access,
+ 0,
+ 0,
0,
0,
0,