Web lists-archives.com

[Samba] Operation Not Supported error for GETXATTR when VFS plugin "nfs4acl_xattr" is used




Hello All

I am trying to use nfs4acl_xattr plugin from samba source code.

https://www.samba.org/samba/docs/current/man-html/vfs_nfs4acl_xattr.8.html

I mounted NFSv4 mount point locally and exported it through samba with vfs
objects set to nfs4acl_xattr.









*[root@test3 ajain]# net conf showshare local[local]        path =
/home/ajain/mount        comment = local share        guest ok = no
read only = no        hosts allow = ALL        vfs objects = nfs4acl_xattr*


The share is not accessible when the plugin is enabled and I see all the
accesses fail with EOPNOTSUPP (errno 95).









*[root@test2 ~]#  smbclient //test3/local --user=test -WdomainEnter
domain\test's password:Kinit for test@domain to access test3 failed: Cannot
find KDC for requested realmDomain=[domain] OS=[Windows 6.1] Server=[Samba
4.6.2]smb: \>smb: \> lsNT_STATUS_NOT_SUPPORTED listing \*smb: \>*



When I added debug prints inside the plugin, I am seeing GETXATTR call
fails with error 95.
The path is generally "." since samba does vfs_ChDir to the directory
before calling get_nt_acl_fn

Here are my experiments so far:

* If I write the small program to do getxattr on the path where we have
mounted NFS share, it works fine. Even if we do chdir to directory and then
do getxattr it works fine. If we do getxattr on just the root directory of
the mount point, it works well. So from underlying mount point, there is no
issue.

* nfs4_getfacl and nfs4_setfacl commands perfectly work fine on the local
mount point.

* In the plugin itself, if I change the path to actual directory instead of
".", it still fails with same error.

Can someone help me understand, why following call may fail when the path
is locally mounted NFS share and not a VFS path:

*                length = SMB_VFS_NEXT_GETXATTR(handle, path,
NFS4ACL_XATTR_NAME, blob.data, blob.length);*

Since next module in the stack is Default_VFS, isn't it supposed to forward
the request to local NFS client? I do not see any packets on NFS port of
the local NFS client when this operation fails.


Setup information:

Samba Version: 4.6.2
CentOS Linux release 7.2.1511 (Core)
3.10.0-327.el7.x86_64


Any help on this issue is appreciated.


Thanks
~ Akash
-- 
To unsubscribe from this list go to the following URL and read the
instructions:  https://lists.samba.org/mailman/options/samba