[PATCH 4/5] nfs: Fix -o sec=none output in /proc/mounts

From: Pali Rohár
Date: Thu Sep 12 2024 - 09:04:08 EST


Linux nfs userspace tools supports AUTH_NULL flavor under name 'none'.
This name is used in /etc/exports file and also in '-o sec' mount option.

So for compatibility show AUTH_NULL flavor in /proc/mounts output as 'none'
instead of 'null'.

Signed-off-by: Pali Rohár <pali@xxxxxxxxxx>
Cc: stable@xxxxxxxxxxxxxxx
---
fs/nfs/super.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/fs/nfs/super.c b/fs/nfs/super.c
index 4cb319be55ca..86d98d15ee22 100644
--- a/fs/nfs/super.c
+++ b/fs/nfs/super.c
@@ -321,7 +321,7 @@ static const char *nfs_pseudoflavour_to_name(rpc_authflavor_t flavour)
const char *str;
} sec_flavours[NFS_AUTH_INFO_MAX_FLAVORS] = {
/* update NFS_AUTH_INFO_MAX_FLAVORS when this list changes! */
- { RPC_AUTH_NULL, "null" },
+ { RPC_AUTH_NULL, "none" },
{ RPC_AUTH_UNIX, "sys" },
{ RPC_AUTH_GSS_KRB5, "krb5" },
{ RPC_AUTH_GSS_KRB5I, "krb5i" },
--
2.20.1