From owner-freebsd-hackers@freebsd.org Fri Feb 19 23:18:39 2021 Return-Path: Delivered-To: freebsd-hackers@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 146C0543F99 for ; Fri, 19 Feb 2021 23:18:39 +0000 (UTC) (envelope-from chrisj@rtems.org) Received: from nsstlmta33p.bpe.bigpond.com (nsstlmta33p.bpe.bigpond.com [203.38.21.33]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "", Issuer "Openwave Messaging Inc." (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Dj6vd1llNz3m6t for ; Fri, 19 Feb 2021 23:18:36 +0000 (UTC) (envelope-from chrisj@rtems.org) Received: from smtp.telstra.com ([10.10.24.4]) by nsstlfep33p-svc.bpe.nexus.telstra.com.au with ESMTP id <20210219231831.CCDS4353.nsstlfep33p-svc.bpe.nexus.telstra.com.au@smtp.telstra.com> for ; Sat, 20 Feb 2021 10:18:31 +1100 X-RG-Spam: Unknown X-RazorGate-Vade: gggruggvucftvghtrhhoucdtuddrgeduledrjeejgddtjecutefuodetggdotefrodftvfcurfhrohhfihhlvgemucfupfevtfgpvffgnffuvffttedpqfgfvfenuceurghilhhouhhtmecugedttdenucenucfjughrpefvhffuohfkffgfgggtgfesthejredttdefjeenucfhrhhomhepvehhrhhishculfhohhhnshcuoegthhhrihhsjhesrhhtvghmshdrohhrgheqnecuggftrfgrthhtvghrnheptdejtdetieeigfehhfehvdetueehtedtfedtudffueduvdelvdegkeelvdfghefhnecukfhppedufeelrddufedtrddvgeehrddvtddtnecuvehluhhsthgvrhfuihiivgeptdenucfrrghrrghmpehhvghlohepmhgrihhlrdgtohhnthgvmhhpohhrrghrhidrnhgvthdrrghupdhinhgvthepudefledrudeftddrvdeghedrvddttddpmhgrihhlfhhrohhmpeeotghhrhhishhjsehrthgvmhhsrdhorhhgqedprhgtphhtthhopeeofhhrvggvsghsugdqhhgrtghkvghrshesfhhrvggvsghsugdrohhrgheq X-RazorGate-Vade-Verdict: clean 0 X-RazorGate-Vade-Classification: clean X-RG-VS-CLASS: clean Received: from mail.contemporary.net.au (139.130.245.200) by smtp.telstra.com (5.8.420) id 5FE6CCD00F92E31D for freebsd-hackers@freebsd.org; Sat, 20 Feb 2021 10:18:30 +1100 Received: from [10.10.11.8] ([10.10.11.8]) (authenticated bits=0) by mail.contemporary.net.au (8.15.2/8.15.2) with ESMTPSA id 11JNISLS033591 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128 verify=NO) for ; Sat, 20 Feb 2021 10:18:29 +1100 (EST) (envelope-from chrisj@rtems.org) To: freebsd-hackers@freebsd.org From: Chris Johns Subject: sys/fs/nfsclient ACCESS attributes with RTEMS Organization: https://www.rtems.org/ Message-ID: <0e14503a-ca7b-cd0f-6472-289fc9ac301b@rtems.org> Date: Sat, 20 Feb 2021 10:18:28 +1100 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:78.0) Gecko/20100101 Thunderbird/78.7.1 MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Language: en-AU Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-102.9 required=2.7 tests=ALL_TRUSTED,BAYES_00, USER_IN_WELCOMELIST,USER_IN_WHITELIST autolearn=ham autolearn_force=no version=3.4.2 X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on corb.contemporary.net.au X-Rspamd-Queue-Id: 4Dj6vd1llNz3m6t X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org; dkim=none; dmarc=none; spf=none (mx1.freebsd.org: domain of chrisj@rtems.org has no SPF policy when checking 203.38.21.33) smtp.mailfrom=chrisj@rtems.org X-Spamd-Result: default: False [-2.20 / 15.00]; RCVD_VIA_SMTP_AUTH(0.00)[]; TO_DN_NONE(0.00)[]; HAS_ORG_HEADER(0.00)[]; RCVD_COUNT_THREE(0.00)[4]; NEURAL_HAM_SHORT(-1.00)[-1.000]; FROM_EQ_ENVFROM(0.00)[]; MIME_TRACE(0.00)[0:+]; RBL_DBL_DONT_QUERY_IPS(0.00)[203.38.21.33:from]; ASN(0.00)[asn:1221, ipnet:203.36.0.0/14, country:AU]; R_DKIM_NA(0.00)[]; MID_RHS_MATCH_FROM(0.00)[]; RCVD_IN_DNSWL_LOW(-0.10)[203.38.21.33:from]; RCVD_TLS_LAST(0.00)[]; ARC_NA(0.00)[]; NEURAL_HAM_MEDIUM(-1.00)[-1.000]; FROM_HAS_DN(0.00)[]; TO_MATCH_ENVRCPT_ALL(0.00)[]; NEURAL_HAM_LONG(-1.00)[-1.000]; MIME_GOOD(-0.10)[text/plain]; PREVIOUSLY_DELIVERED(0.00)[freebsd-hackers@freebsd.org]; AUTH_NA(1.00)[]; RCPT_COUNT_ONE(0.00)[1]; SPAMHAUS_ZRD(0.00)[203.38.21.33:from:127.0.2.255]; DMARC_NA(0.00)[rtems.org]; R_SPF_NA(0.00)[no SPF record]; MAILMAN_DEST(0.00)[freebsd-hackers] X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Technical discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 19 Feb 2021 23:18:39 -0000 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