]> git.ipfire.org Git - thirdparty/kernel/linux.git/commitdiff
NFS: show redacted cert_serial and privkey_serial in mount options
authorSagi Grimberg <sagi@grimberg.me>
Tue, 28 Apr 2026 08:15:14 +0000 (11:15 +0300)
committerAnna Schumaker <anna.schumaker@hammerspace.com>
Mon, 8 Jun 2026 14:21:55 +0000 (10:21 -0400)
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>
fs/nfs/super.c

index 4cd420b14ce3f3436199ea6f654177741d9eb48a..ff798b6685f8a246ecb7d816912441e274f78e82 100644 (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);