Ignore:
Timestamp:
May 26, 2009, 9:44:50 AM (16 years ago)
Author:
Herwig Bauernfeind
Message:

Update 3.2 branch to 3.2.6

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/samba-3.2.x/source/modules/vfs_zfsacl.c

    r141 r228  
    221221}
    222222
     223/* nils.goroll@hamburg.de 2008-06-16 :
     224
     225   See also
     226   - https://bugzilla.samba.org/show_bug.cgi?id=5446
     227   - http://bugs.opensolaris.org/view_bug.do?bug_id=6688240
     228
     229   Solaris supports NFSv4 and ZFS ACLs through a common system call, acl(2)
     230   with ACE_SETACL / ACE_GETACL / ACE_GETACLCNT, which is being wrapped for
     231   use by samba in this module.
     232
     233   As the acl(2) interface is identical for ZFS and for NFS, this module,
     234   vfs_zfsacl, can not only be used for ZFS, but also for sharing NFSv4
     235   mounts on Solaris.
     236
     237   But while "traditional" POSIX DRAFT ACLs (using acl(2) with SETACL
     238   / GETACL / GETACLCNT) fail for ZFS, the Solaris NFS client
     239   implemets a compatibility wrapper, which will make calls to
     240   traditional ACL calls though vfs_solarisacl succeed. As the
     241   compatibility wrapper's implementation is (by design) incomplete,
     242   we want to make sure that it is never being called.
     243
     244   As long as Samba does not support an exiplicit method for a module
     245   to define conflicting vfs methods, we should override all conflicting
     246   methods here.
     247
     248   For this to work, we need to make sure that this module is initialised
     249   *after* vfs_solarisacl
     250
     251   Function declarations taken from vfs_solarisacl
     252*/
     253
     254SMB_ACL_T zfsacl_fail__sys_acl_get_file(vfs_handle_struct *handle,
     255                                        const char *path_p,
     256                                        SMB_ACL_TYPE_T type)
     257{
     258        return (SMB_ACL_T)NULL;
     259}
     260SMB_ACL_T zfsacl_fail__sys_acl_get_fd(vfs_handle_struct *handle,
     261                                      files_struct *fsp,
     262                                      int fd)
     263{
     264        return (SMB_ACL_T)NULL;
     265}
     266
     267int zfsacl_fail__sys_acl_set_file(vfs_handle_struct *handle,
     268                                  const char *name,
     269                                  SMB_ACL_TYPE_T type,
     270                                  SMB_ACL_T theacl)
     271{
     272        return -1;
     273}
     274
     275int zfsacl_fail__sys_acl_set_fd(vfs_handle_struct *handle,
     276                                files_struct *fsp,
     277                                int fd, SMB_ACL_T theacl)
     278{
     279        return -1;
     280}
     281
     282int zfsacl_fail__sys_acl_delete_def_file(vfs_handle_struct *handle,
     283                                         const char *path)
     284{
     285        return -1;
     286}
     287
    223288/* VFS operations structure */
    224289
    225290static vfs_op_tuple zfsacl_ops[] = {
     291        /* invalidate conflicting VFS methods */
     292        {SMB_VFS_OP(zfsacl_fail__sys_acl_get_file),
     293         SMB_VFS_OP_SYS_ACL_GET_FILE,
     294         SMB_VFS_LAYER_OPAQUE},
     295        {SMB_VFS_OP(zfsacl_fail__sys_acl_get_fd),
     296         SMB_VFS_OP_SYS_ACL_GET_FD,
     297         SMB_VFS_LAYER_OPAQUE},
     298        {SMB_VFS_OP(zfsacl_fail__sys_acl_set_file),
     299         SMB_VFS_OP_SYS_ACL_SET_FILE,
     300         SMB_VFS_LAYER_OPAQUE},
     301        {SMB_VFS_OP(zfsacl_fail__sys_acl_set_fd),
     302         SMB_VFS_OP_SYS_ACL_SET_FD,
     303         SMB_VFS_LAYER_OPAQUE},
     304        {SMB_VFS_OP(zfsacl_fail__sys_acl_delete_def_file),
     305         SMB_VFS_OP_SYS_ACL_DELETE_DEF_FILE,
     306         SMB_VFS_LAYER_OPAQUE},
     307
     308        /* actual methods */
    226309        {SMB_VFS_OP(zfsacl_fget_nt_acl), SMB_VFS_OP_FGET_NT_ACL,
    227310         SMB_VFS_LAYER_OPAQUE},
Note: See TracChangeset for help on using the changeset viewer.