From: "Pali Rohár" <pali@kernel.org>
To: Trond Myklebust <trondmy@kernel.org>, Anna Schumaker <anna@kernel.org>
Cc: linux-nfs@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: [PATCH 0/5] nfs: Fix mounting NFS3 AUTH_NULL exports
Date: Thu, 12 Sep 2024 15:02:15 +0200 [thread overview]
Message-ID: <20240912130220.17032-1-pali@kernel.org> (raw)
Linux NFS3 kernel client currently has broken support for NFS3
AUTH_NULL-only exports and also broken mount option -o sec=none
(which explicitly specifies that mount should use AUTH_NULL).
For AUTH_NULL-only server exports, Linux NFS3 kernel client mounts such
export with AUTH_UNIX authentication which results in unusable mount
point (any operation on it fails with error because server rejects
AUTH_UNIX authentication).
Half of the problem is with MNTv3 servers, as some of them (e.g. Linux
one) never announce AUTH_NULL authentication for any export. Linux MNTv3
server does not announce it even when the export has the only AUTH_NULL
auth method allowed, instead it announce AUTH_UNIX (even when AUTH_UNIX
is disabled for that export in Linux NFS3 knfsd server). So MNTv3 server
for AUTH_NONE-only exports instruct Linux NFS3 kernel client to use
AUTH_UNIX and then NFS3 server refuse access to files with AUTH_UNIX.
Main problem on the client side is that mount option -o sec=none for
NFS3 client is not processed and Linux NFS kernel client always skips
AUTH_NULL (even when server announce it, and also even when user
specifies -o sec=none on mount command line).
This patch series address these issues in NFS3 client code.
Add a workaround for buggy MNTv3 servers which do not announce AUTH_NULL,
by trying AUTH_NULL authentication as an absolutely last chance when
everything else fails. And honors user choice of AUTH_NULL if user
explicitly specified -o sec=none as mount option.
AUTH_NULL authentication is useful for read-only exports, including
public exports. As authentication for these types of exports do not have
to be required.
Patch series was tested with AUTH_NULL-only, AUTH_UNIX-only and combined
AUTH_NULL+AUTH_UNIX exports from Linux knfsd NFS3 server + default Linux
MNTv3 userspace server. And also tested with exports from modified MNTv3
server to properly return AUTH_NULL support in response list.
Patch series is based on the latest upstream tag v6.11-rc7.
Pali Rohár (5):
nfs: Fix support for NFS3 mount with -o sec=none from Linux MNTv3
server
nfs: Propagate AUTH_NULL/AUTH_UNIX PATHCONF NFS3ERR_ACCESS failures
nfs: Try to use AUTH_NULL for NFS3 mount when no -o sec was given
nfs: Fix -o sec=none output in /proc/mounts
nfs: Remove duplicate debug message 'using auth flavor'
fs/nfs/client.c | 14 ++++++++++-
fs/nfs/super.c | 64 +++++++++++++++++++++++++++++++++++++++----------
2 files changed, 65 insertions(+), 13 deletions(-)
--
2.20.1
next reply other threads:[~2024-09-12 13:02 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-09-12 13:02 Pali Rohár [this message]
2024-09-12 13:02 ` [PATCH 1/5] nfs: Fix support for NFS3 mount with -o sec=none from Linux MNTv3 server Pali Rohár
2024-09-12 13:02 ` [PATCH 2/5] nfs: Propagate AUTH_NULL/AUTH_UNIX PATHCONF NFS3ERR_ACCESS failures Pali Rohár
2024-09-12 13:02 ` [PATCH 3/5] nfs: Try to use AUTH_NULL for NFS3 mount when no -o sec was given Pali Rohár
2024-09-12 13:02 ` [PATCH 4/5] nfs: Fix -o sec=none output in /proc/mounts Pali Rohár
2024-09-12 13:02 ` [PATCH 5/5] nfs: Remove duplicate debug message 'using auth flavor' Pali Rohár
2024-09-12 21:06 ` [PATCH 0/5] nfs: Fix mounting NFS3 AUTH_NULL exports Anna Schumaker
2024-09-12 21:11 ` Pali Rohár
2024-10-05 15:15 ` Pali Rohár
2024-10-28 9:54 ` Pali Rohár
2024-12-22 16:40 ` Pali Rohár
2025-04-18 18:03 ` Pali Rohár
2025-05-04 8:48 ` Pali Rohár
2025-05-18 9:57 ` Pali Rohár
2025-09-20 13:35 ` Pali Rohár
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20240912130220.17032-1-pali@kernel.org \
--to=pali@kernel.org \
--cc=anna@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-nfs@vger.kernel.org \
--cc=trondmy@kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox