s3 OneFS: Change ACLs to do a stat-only open before get/set_security_descriptor
authorTim Prouty <tprouty@samba.org>
Thu, 5 Feb 2009 01:28:21 +0000 (17:28 -0800)
committerTim Prouty <tprouty@samba.org>
Tue, 10 Feb 2009 07:47:46 +0000 (23:47 -0800)
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.

source3/modules/onefs_acl.c

index 14b27b80e0044eb55e8225c37e076115e93c3df6..0ef7e0be51e758ca16a3a3857e90e4da277527db 100644 (file)
@@ -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,