Date: Sat, 20 Feb 2021 10:18:28 +1100 From: Chris Johns <chrisj@rtems.org> To: freebsd-hackers@freebsd.org Subject: sys/fs/nfsclient ACCESS attributes with RTEMS Message-ID: <0e14503a-ca7b-cd0f-6472-289fc9ac301b@rtems.org>
next in thread | raw e-mail | index | archive | help
Hello, I have made some progress in porting the FreeBSD kernel NFS client file system to RTEMS. The connection to an NVFv4 server is stable and I can change directories, list directories and read files. I however cannot make a directory. I get a permissions error. This is the fragment of traffic showing the error: 10.10.5.45 -> 10.10.5.4 NFS 246 V4 Call Access ACCESS FH: 0xbb937afe, [Check: RD LU MD XT DL XE] 10.10.5.4 -> 10.10.5.45 NFS 350 V4 Reply (Call In 72) Access ACCESS, [NOT Supported: XE], [Access Denied: MD XT DL], [Allowed: RD LU] 10.10.5.45 -> 10.10.5.4 NFS 282 V4 Call Lookup LOOKUP DH: 0xbb937afe/read_write_test 10.10.5.4 -> 10.10.5.45 NFS 342 V4 Reply (Call In 74) Lookup LOOKUP Status: NFS4ERR_NOENT 10.10.5.45 -> 10.10.5.4 NFS 282 V4 Call Lookup LOOKUP DH: 0xbb937afe/read_write_test 10.10.5.4 -> 10.10.5.45 NFS 342 V4 Reply (Call In 76) Lookup LOOKUP Status: NFS4ERR_NOENT 10.10.5.45 -> 10.10.5.4 NFS 358 V4 Call Create CREATE 10.10.5.4 -> 10.10.5.45 NFS 210 V4 Reply (Call In 78) Create CREATE Status: NFS4ERR_ACCESS The server is set up for an NFSv4 export and I have `no_squash_root` set for testing. There is no security enabled (nfs@...). The RTEMS client mount options are: ma = mount_arg(ma, "rw", NULL, 0); ma = mount_arg(ma, "nfsv4", NULL, 0); ma = mount_arg(ma, "minorversion", "1", -1); ma = mount_arg(ma, "nolockd", NULL, 0); error = kernel_mount(ma, MNT_VERIFIED); The mount seems OK. The cred used in all the calls is the same and has uid=0, gid=0. The fragment of code I am using to test with runs fine from a FreeBSD shell as root. The ACCESS attributes for the FreeBSD test executable is: 10.10.5.2 -> 10.10.5.4 NFS 210 V4 Call Access ACCESS FH: 0x18096ab3, [Check: RD LU MD XT DL XE] 10.10.5.4 -> 10.10.5.2 NFS 302 V4 Reply (Call In 67) Access ACCESS, [NOT Supported: XE], [Allowed: RD LU MD XT DL] The same ACCESS attributes for the RTEMS client is: 10.10.5.45 -> 10.10.5.4 NFS 246 V4 Call Access ACCESS FH: 0xbb937afe, [Check: RD LU MD XT DL XE] 10.10.5.4 -> 10.10.5.45 NFS 350 V4 Reply (Call In 72) Access ACCESS, [NOT Supported: XE], [Access Denied: MD XT DL], [Allowed: RD LU] I do not know what or where in the connection or mount triggers this behaviour in the server. What is the reason for this and where could I take a look to see what I have not set up in my client? Thanks Chris
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?0e14503a-ca7b-cd0f-6472-289fc9ac301b>