summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSagi Grimberg <sagi@grimberg.me>2026-04-28 11:15:14 +0300
committerAnna Schumaker <anna.schumaker@hammerspace.com>2026-06-08 17:21:55 +0300
commitf74ad9eee7221ca67fa489b44c3d065c54e65d4d (patch)
tree45f3a52f10cd0add9db6edb1d4fde8d4bff207e6
parent91668417d4e925c98cae4a55b1b9860380ddbf16 (diff)
downloadlinux-f74ad9eee7221ca67fa489b44c3d065c54e65d4d.tar.xz
NFS: show redacted cert_serial and privkey_serial in mount options
mount output should not reveal the contents of the serials, but indicate they were provided. Signed-off-by: Sagi Grimberg <sagi@grimberg.me> Signed-off-by: Anna Schumaker <anna.schumaker@hammerspace.com>
-rw-r--r--fs/nfs/super.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/fs/nfs/super.c b/fs/nfs/super.c
index 4cd420b14ce3..ff798b6685f8 100644
--- a/fs/nfs/super.c
+++ b/fs/nfs/super.c
@@ -509,6 +509,10 @@ static void nfs_show_mount_options(struct seq_file *m, struct nfs_server *nfss,
default:
break;
}
+ if (clp->cl_xprtsec.cert_serial)
+ seq_puts(m, ",cert_serial=<redacted>");
+ if (clp->cl_xprtsec.privkey_serial)
+ seq_puts(m, ",privkey_serial=<redacted>");
if (version != 4)
nfs_show_mountd_options(m, nfss, showdefaults);