• Andrew's avatar
    Implement NFSv41 ACLs through xattr · ea1463c5
    Andrew authored
    This implements NFSv41 (RFC 5661) ACLs in a manner
    compatible with vfs_nfs4acl_xattr in Samba and
    nfs4xdr-acl-tools.
    
    There are three key areas of change in this commit:
    1) NFSv4 ACL management through system.nfs4_acl_xdr xattr.
      Install an xattr handler for "system.nfs4_acl_xdr" that
      presents an xattr containing full NFSv41 ACL structures
      generated through rpcgen using specification from the Samba
      project. This xattr is used by userspace programs to read and
      set permissions.
    
    2) add an i_op->permissions endpoint: zpl_permissions(). This
      is used by the VFS in Linux to determine whether to allow /
      deny an operation. Wherever possible, we try to avoid having
      to call zfs_access(). If kernel has NFSv4 patch for VFS, then
      perform more complete check of avaiable access mask.
    
    3) add capability-based overrides to secpolicy_vnode_access2()
      there are various situations in which ACL may need to be
      overridden based on capabilities. This logic is almost directl...
    ea1463c5