Skip to contentSkip to conversation

mount option sec=none not displayed properly in /proc/mounts

PATCH New Steve French 1 participant 1 message Sep 12, 2015

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

PATCH 1/1 mount option sec=none not displayed properly in /proc/mounts

When the user specifies "sec=none" in a cifs mount, we set sec_type as unspecified (and set a flag and the username will be null) rather than setting sectype as "none" so cifs_show_security was not properly displaying it in cifs /proc/mounts entries.

---
 fs/cifs/cifsfs.c | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)
fs/cifs/cifsfs.c +4 -1
index 6a1119e..e739950 100644
@@ -325,8 +325,11 @@ cifs_show_address(struct seq_file *s, struct TCP_Server_Info *server)
 static void
 cifs_show_security(struct seq_file *s, struct cifs_ses *ses)
 {
-	if (ses->sectype == Unspecified)
+	if (ses->sectype == Unspecified) {
+		if (ses->user_name == NULL)
+			seq_puts(s, ",sec=none");
 		return;
+	}
 
 	seq_puts(s, ",sec=");
 
Signature · 1 line
1.9.1