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>
This commit is contained in:
Sagi Grimberg 2026-04-28 11:15:14 +03:00 committed by Anna Schumaker
parent 91668417d4
commit f74ad9eee7

View File

@ -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);