Skip to contentSkip to conversation

NFS: show redacted cert_serial and privkey_serial in mount options

PATCH New Sagi Grimberg 1 participant 1 message Apr 28

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 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.

---
 fs/nfs/super.c | 4 ++++
 1 file changed, 4 insertions(+)
fs/nfs/super.c +4 -0
index 7a318581f85b..ffeb8d3075b9 100644
@@ -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);
Signature · 1 line
2.43.0