Date: Sat, 20 Feb 2021 16:13:21 +0000 From: Rick Macklem <rmacklem@uoguelph.ca> To: Chris Johns <chrisj@rtems.org>, "freebsd-hackers@freebsd.org" <freebsd-hackers@freebsd.org> Subject: Re: sys/fs/nfsclient ACCESS attributes with RTEMS Message-ID: <YQXPR0101MB09680A67466B2FE37726CFA3DD839@YQXPR0101MB0968.CANPRD01.PROD.OUTLOOK.COM> In-Reply-To: <0e14503a-ca7b-cd0f-6472-289fc9ac301b@rtems.org> References: <0e14503a-ca7b-cd0f-6472-289fc9ac301b@rtems.org>
next in thread | previous in thread | raw e-mail | index | archive | help
Chris Johns wrote:=0A= >I have made some progress in porting the FreeBSD kernel NFS client file sy= stem=0A= >to RTEMS. The connection to an NVFv4 server is stable and I can change=0A= >directories, list directories and read files. I however cannot make a dire= ctory.=0A= >I get a permissions error. This is the fragment of traffic showing the err= or:=0A= >=0A= >10.10.5.45 -> 10.10.5.4 NFS 246 V4 Call Access ACCESS FH: 0xbb937afe, [Che= ck: RD=0A= >LU MD XT DL XE]=0A= >10.10.5.4 -> 10.10.5.45 NFS 350 V4 Reply (Call In 72) Access ACCESS, [NOT= =0A= >Supported: XE], [Access Denied: MD XT DL], [Allowed: RD LU]=0A= For whatever reason, the client only has read/lookup access to 0xbb937afe (= presumably=0A= a directory).=0A= =0A= >10.10.5.45 -> 10.10.5.4 NFS 282 V4 Call Lookup LOOKUP DH: 0xbb937afe/read_= write_test=0A= >10.10.5.4 -> 10.10.5.45 NFS 342 V4 Reply (Call In 74) Lookup LOOKUP Status= :=0A= >NFS4ERR_NOENT=0A= >10.10.5.45 -> 10.10.5.4 NFS 282 V4 Call Lookup LOOKUP DH: 0xbb937afe/read_= write_test=0A= >10.10.5.4 -> 10.10.5.45 NFS 342 V4 Reply (Call In 76) Lookup LOOKUP Status= :=0A= >NFS4ERR_NOENT=0A= >10.10.5.45 -> 10.10.5.4 NFS 358 V4 Call Create CREATE=0A= >10.10.5.4 -> 10.10.5.45 NFS 210 V4 Reply (Call In 78) Create CREATE Status= :=0A= >NFS4ERR_ACCESS=0A= >=0A= >The server is set up for an NFSv4 export and I have `no_squash_root` set f= or=0A= >testing. There is no security enabled (nfs@...). The RTEMS client mount op= tions are:=0A= Since "no_quash_root" doesn't exist on FreeBSD NFS servers (implemented wit= h the=0A= -maproot export option on FreeBSD), I'll assume a non-FreeBSD server.=0A= --> As such, I have no idea why the access is limited. (mode bits, ACL,...?= ).=0A= =0A= If you test against a FreeBSD server, you can "sysctl vfs.nfsd.debuglevel= =3D4" and=0A= make it pretty chatty to help figure out what is going on.=0A= =0A= rick=0A= =0A= ma =3D mount_arg(ma, "rw", NULL, 0);=0A= ma =3D mount_arg(ma, "nfsv4", NULL, 0);=0A= ma =3D mount_arg(ma, "minorversion", "1", -1);=0A= ma =3D mount_arg(ma, "nolockd", NULL, 0);=0A= error =3D kernel_mount(ma, MNT_VERIFIED);=0A= =0A= The mount seems OK. The cred used in all the calls is the same and has uid= =3D0, gid=3D0.=0A= =0A= The fragment of code I am using to test with runs fine from a FreeBSD shell= as=0A= root. The ACCESS attributes for the FreeBSD test executable is:=0A= =0A= 10.10.5.2 -> 10.10.5.4 NFS 210 V4 Call Access ACCESS FH: 0x18096ab3, [Check= : RD=0A= LU MD XT DL XE]=0A= 10.10.5.4 -> 10.10.5.2 NFS 302 V4 Reply (Call In 67) Access ACCESS, [NOT=0A= Supported: XE], [Allowed: RD LU MD XT DL]=0A= =0A= The same ACCESS attributes for the RTEMS client is:=0A= =0A= 10.10.5.45 -> 10.10.5.4 NFS 246 V4 Call Access ACCESS FH: 0xbb937afe, [Chec= k: RD=0A= LU MD XT DL XE]=0A= 10.10.5.4 -> 10.10.5.45 NFS 350 V4 Reply (Call In 72) Access ACCESS, [NOT= =0A= Supported: XE], [Access Denied: MD XT DL], [Allowed: RD LU]=0A= =0A= I do not know what or where in the connection or mount triggers this behavi= our=0A= in the server. What is the reason for this and where could I take a look to= see=0A= what I have not set up in my client?=0A= =0A= Thanks=0A= Chris=0A= _______________________________________________=0A= freebsd-hackers@freebsd.org mailing list=0A= https://lists.freebsd.org/mailman/listinfo/freebsd-hackers=0A= To unsubscribe, send any mail to "freebsd-hackers-unsubscribe@freebsd.org"= =0A= =0A=
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?YQXPR0101MB09680A67466B2FE37726CFA3DD839>