aboutsummaryrefslogtreecommitdiffstats
path: root/fs/cifs/cifsfs.c
diff options
context:
space:
mode:
Diffstat (limited to 'fs/cifs/cifsfs.c')
-rw-r--r--fs/cifs/cifsfs.c33
1 files changed, 33 insertions, 0 deletions
diff --git a/fs/cifs/cifsfs.c b/fs/cifs/cifsfs.c
index 989442dcfb45..e9def996e383 100644
--- a/fs/cifs/cifsfs.c
+++ b/fs/cifs/cifsfs.c
@@ -352,6 +352,37 @@ cifs_show_address(struct seq_file *s, struct TCP_Server_Info *server)
352 } 352 }
353} 353}
354 354
355static void
356cifs_show_security(struct seq_file *s, struct TCP_Server_Info *server)
357{
358 seq_printf(s, ",sec=");
359
360 switch (server->secType) {
361 case LANMAN:
362 seq_printf(s, "lanman");
363 break;
364 case NTLMv2:
365 seq_printf(s, "ntlmv2");
366 break;
367 case NTLM:
368 seq_printf(s, "ntlm");
369 break;
370 case Kerberos:
371 seq_printf(s, "krb5");
372 break;
373 case RawNTLMSSP:
374 seq_printf(s, "ntlmssp");
375 break;
376 default:
377 /* shouldn't ever happen */
378 seq_printf(s, "unknown");
379 break;
380 }
381
382 if (server->sec_mode & (SECMODE_SIGN_REQUIRED | SECMODE_SIGN_ENABLED))
383 seq_printf(s, "i");
384}
385
355/* 386/*
356 * cifs_show_options() is for displaying mount options in /proc/mounts. 387 * cifs_show_options() is for displaying mount options in /proc/mounts.
357 * Not all settable options are displayed but most of the important 388 * Not all settable options are displayed but most of the important
@@ -365,6 +396,8 @@ cifs_show_options(struct seq_file *s, struct vfsmount *m)
365 struct sockaddr *srcaddr; 396 struct sockaddr *srcaddr;
366 srcaddr = (struct sockaddr *)&tcon->ses->server->srcaddr; 397 srcaddr = (struct sockaddr *)&tcon->ses->server->srcaddr;
367 398
399 cifs_show_security(s, tcon->ses->server);
400
368 seq_printf(s, ",unc=%s", tcon->treeName); 401 seq_printf(s, ",unc=%s", tcon->treeName);
369 402
370 if (cifs_sb->mnt_cifs_flags & CIFS_MOUNT_MULTIUSER) 403 if (cifs_sb->mnt_cifs_flags & CIFS_MOUNT_MULTIUSER)