s3 OneFS: Expand the usage of the ignore sacl parameter
authortodd stecher <todd.stecher@gmail.com>
Wed, 11 Feb 2009 17:52:02 +0000 (09:52 -0800)
committerTim Prouty <tprouty@samba.org>
Wed, 11 Feb 2009 20:26:47 +0000 (12:26 -0800)
source3/modules/onefs_acl.c
source3/modules/onefs_open.c

index 0ef7e0be51e758ca16a3a3857e90e4da277527db..02394794c24348fef0b2fe36bbe85eae8c29cc76 100644 (file)
@@ -619,6 +619,12 @@ onefs_fget_nt_acl(vfs_handle_struct *handle, files_struct *fsp,
        DEBUG(5, ("Getting sd for file %s. security_info=%u\n",
            fsp->fsp_name, security_info));
 
+       if (lp_parm_bool(SNUM(fsp->conn), PARM_ONEFS_TYPE,
+               PARM_IGNORE_SACL, PARM_IGNORE_SACL_DEFAULT)) {
+               DEBUG(5, ("Ignoring SACL on %s.\n", fsp->fsp_name));
+               security_info &= ~SACL_SECURITY_INFORMATION;
+       }
+
        if (fsp->fh->fd == -1) {
                if ((fsp->fh->fd = onefs_sys_create_file(handle->conn,
                                                         -1,
index b2b11ebaaca799fa2c5f31806a83c6f7a6e87c79..e335dc7e281ee32b4b1cb4934e150b6f407b3537 100644 (file)
@@ -744,6 +744,11 @@ NTSTATUS onefs_open_file_ntcreate(connection_struct *conn,
                open_access_mask |= FILE_WRITE_DATA;
        }
 
+       if (lp_parm_bool(SNUM(fsp->conn), PARM_ONEFS_TYPE,
+               PARM_IGNORE_SACL, PARM_IGNORE_SACL_DEFAULT)) {
+               access_mask &= ~SYSTEM_SECURITY_ACCESS;
+       }
+
        DEBUG(10, ("onefs_open_file_ntcreate: fname=%s, after mapping "
                   "open_access_mask=%#x, access_mask=0x%x\n",
                   fname, open_access_mask, access_mask));