sys/fs/nfsclient ACCESS attributes with RTEMS

Chris Johns chrisj at rtems.org
Fri Feb 19 23:18:39 UTC 2021


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 at ...). 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


More information about the freebsd-hackers mailing list