diff options
author | Jeff Layton <jlayton@redhat.com> | 2011-06-13 11:50:41 -0400 |
---|---|---|
committer | Steve French <sfrench@us.ibm.com> | 2011-06-13 16:34:34 -0400 |
commit | 3e715513643f0207c8f3c22010b54954cd697474 (patch) | |
tree | 7f35f4bc196fff989bb2a17fb22a86e348b03cf9 /fs/cifs/cifsfs.c | |
parent | 7fdbaa1b8daa1009b705985b903e3d2ebccad456 (diff) |
cifs: show sec= option in /proc/mounts
Signed-off-by: Jeff Layton <jlayton@redhat.com>
Signed-off-by: Steve French <sfrench@us.ibm.com>
Diffstat (limited to 'fs/cifs/cifsfs.c')
-rw-r--r-- | fs/cifs/cifsfs.c | 33 |
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 | ||
355 | static void | ||
356 | cifs_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) |