The Samba-Bugzilla – Attachment 4014 Details for
Bug 5653
default ZFS/NFSv4 ACL is not correctly ordered to be used on Win
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
(f)chmod() acmm blocking on ZFS
vfs_zfsacl.c-CR.6811774-diff (text/plain), 3.15 KB, created by
Jura Sasek
on 2009-03-26 15:43:25 UTC
(
hide
)
Description:
(f)chmod() acmm blocking on ZFS
Filename:
MIME Type:
Creator:
Jura Sasek
Created:
2009-03-26 15:43:25 UTC
Size:
3.15 KB
patch
obsolete
> >------- usr/src/cmd/samba/vfs_zfsacl.c ------- > >--- samba-3.0.34/source/modules/vfs_zfsacl.c Fri Oct 24 23:02:05 2008 >+++ samba-3.0.34/source/modules/vfs_zfsacl.c Thu Mar 26 12:33:26 2009 >@@ -33,7 +33,7 @@ > > /* zfsacl - module parameters (s) > * can be set on share using the prefix "zfsacl:" >- * acesort = { dontcare | ntfs [default] } >+ * acesort = { dontcare [default] | ntfs } > * dontcare = ZFS/NFSv4 ACEs are stored into the NTFS ACL "as is" > * ntfs = ZFS/NFSv4 ACEs are stored into the NTFS ACL in the manner > * usual on the NTFS ("deny" ACEs are located before the any >@@ -65,7 +65,7 @@ > memset(params, 0, sizeof(zfsacl_vfs_params)); > params->acesort = (enum zfsacl_acesort_enum)lp_parm_enum( > SNUM(fsp->conn), type_name, >- "acesort", enum_zfsacl_acesort, e_ntfs); >+ "acesort", enum_zfsacl_acesort, e_dontcare); > > DEBUG(10, ("acesort: %s\n", > enum_zfsacl_acesort[params->acesort].name)); >@@ -316,13 +316,13 @@ > Function declarations taken from vfs_solarisacl > */ > >-SMB_ACL_T zfsacl_fail__sys_acl_get_file(vfs_handle_struct *handle, >+static SMB_ACL_T zfsacl_fail__sys_acl_get_file(vfs_handle_struct *handle, > const char *path_p, > SMB_ACL_TYPE_T type) > { > return (SMB_ACL_T)NULL; > } >-SMB_ACL_T zfsacl_fail__sys_acl_get_fd(vfs_handle_struct *handle, >+static SMB_ACL_T zfsacl_fail__sys_acl_get_fd(vfs_handle_struct *handle, > files_struct *fsp, > int fd) > { >@@ -329,7 +329,7 @@ > return (SMB_ACL_T)NULL; > } > >-int zfsacl_fail__sys_acl_set_file(vfs_handle_struct *handle, >+static int zfsacl_fail__sys_acl_set_file(vfs_handle_struct *handle, > const char *name, > SMB_ACL_TYPE_T type, > SMB_ACL_T theacl) >@@ -337,7 +337,7 @@ > return(-1); > } > >-int zfsacl_fail__sys_acl_set_fd(vfs_handle_struct *handle, >+static int zfsacl_fail__sys_acl_set_fd(vfs_handle_struct *handle, > files_struct *fsp, > int fd, SMB_ACL_T theacl) > { >@@ -344,12 +344,22 @@ > return(-1); > } > >-int zfsacl_fail__sys_acl_delete_def_file(vfs_handle_struct *handle, >+static int zfsacl_fail__sys_acl_delete_def_file(vfs_handle_struct *handle, > const char *path) > { > return(-1); > } > >+/* (f)chmod() stub-calls */ >+ >+static int zfsacl_chmod(struct vfs_handle_struct *handle, const char *path, uid_t uid, gid_t gid) { >+ return (True); >+} >+ >+static int zfsacl_fchmod(struct vfs_handle_struct *handle, struct files_struct *fsp, int fd, uid_t uid, gid_t gid) { >+ return (True); >+} >+ > /* VFS operations structure */ > > static vfs_op_tuple zfsacl_ops[] = { >@@ -370,6 +380,21 @@ > SMB_VFS_OP_SYS_ACL_DELETE_DEF_FILE, > SMB_VFS_LAYER_OPAQUE}, > >+ /* >+ * chmod(2) call on ZFS is returning the file back >+ * under the POSIX control. In the fact the POSIX-mask >+ * is taken to add 6 special ACEs: >+ * [{owner@,group@,everyone@}*{deny,allow}] >+ * NTFS not requires the POSIX behavior so I will try >+ * to block the (f)chmod() calls on ZFS volume >+ * ... than I will see. >+ * Jiri Sasek >+ */ >+ {SMB_VFS_OP(zfsacl_chmod), SMB_VFS_OP_CHMOD, >+ SMB_VFS_LAYER_OPAQUE}, >+ {SMB_VFS_OP(zfsacl_fchmod), SMB_VFS_OP_FCHMOD, >+ SMB_VFS_LAYER_OPAQUE}, >+ > /* actual methods */ > {SMB_VFS_OP(zfsacl_fget_nt_acl), SMB_VFS_OP_FGET_NT_ACL, > SMB_VFS_LAYER_OPAQUE},
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Raw
Actions:
View
Attachments on
bug 5653
:
3447
| 4014