Skip to content

Commit 3f6166a

Browse files
petrpavlusmfrench
authored andcommitted
cifs: fix mount option display for sec=krb5i
Fix display for sec=krb5i which was wrongly interleaved by cruid, resulting in string "sec=krb5,cruid=<...>i" instead of "sec=krb5i,cruid=<...>". Fixes: 96281b9 ("smb3: for kerberos mounts display the credential uid used") Signed-off-by: Petr Pavlu <[email protected]> Signed-off-by: Steve French <[email protected]>
1 parent bb6d3fb commit 3f6166a

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

fs/cifs/cifsfs.c

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -414,7 +414,7 @@ cifs_show_security(struct seq_file *s, struct cifs_ses *ses)
414414
seq_puts(s, "ntlm");
415415
break;
416416
case Kerberos:
417-
seq_printf(s, "krb5,cruid=%u", from_kuid_munged(&init_user_ns,ses->cred_uid));
417+
seq_puts(s, "krb5");
418418
break;
419419
case RawNTLMSSP:
420420
seq_puts(s, "ntlmssp");
@@ -427,6 +427,10 @@ cifs_show_security(struct seq_file *s, struct cifs_ses *ses)
427427

428428
if (ses->sign)
429429
seq_puts(s, "i");
430+
431+
if (ses->sectype == Kerberos)
432+
seq_printf(s, ",cruid=%u",
433+
from_kuid_munged(&init_user_ns, ses->cred_uid));
430434
}
431435

432436
static void

0 commit comments

Comments
 (0)