cifs: fix mount option display for sec=krb5i
Subsystems (2)
PATCH 1/1 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 96281b9e46eb ("smb3: for kerberos mounts display the credential uid used")
Signed-off-by Petr Pavlu <[email protected]>
--- fs/cifs/cifsfs.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-)
fs/cifs/cifsfs.c +5 -1
@@ -414,7 +414,7 @@ cifs_show_security(struct seq_file *s, struct cifs_ses *ses)seq_puts (s,"ntlm" );break ;case Kerberos: -seq_printf (s,"krb5,cruid=%u" ,from_kuid_munged (&init_user_ns,ses->cred_uid)); +seq_puts (s,"krb5" );break ;case RawNTLMSSP:seq_puts (s,"ntlmssp" );
@@ -427,6 +427,10 @@ cifs_show_security(struct seq_file *s, struct cifs_ses *ses)if (ses->sign)seq_puts (s,"i" ); + +if (ses->sectype == Kerberos) +seq_printf (s,",cruid=%u" , +from_kuid_munged (&init_user_ns, ses->cred_uid)); } static void
Signature · 1 line
2.16.4
Steve French
Appliedmerged into cifs-2.6.git for-next
Quoted 38 lines · Petr Pavlu
Fix display for sec=krb5i which was wrongly interleaved by cruid, resulting in string "sec=krb5,cruid=<...>i" instead of "sec=krb5i,cruid=<...>".
Fixes 96281b9e46eb ("smb3: for kerberos mounts display the credential uid used")Signed-off-by Petr Pavlu <[email protected]>--- fs/cifs/cifsfs.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-)fs/cifs/cifsfs.c +5
-2@@ -414,7 +414,7 @@ cifs_show_security(struct seq_file *s, struct cifs_ses *ses)seq_puts (s,"ntlm" );break ;case Kerberos: -seq_printf (s,"krb5,cruid=%u" ,from_kuid_munged (&init_user_ns,ses->cred_uid)); +seq_puts (s,"krb5" );break ;case RawNTLMSSP:seq_puts (s,"ntlmssp" );@@ -427,6 +427,10 @@ cifs_show_security(struct seq_file *s, struct cifs_ses *ses)if (ses->sign)seq_puts (s,"i" ); + +if (ses->sectype == Kerberos) +seq_printf (s,",cruid=%u" , +from_kuid_munged (&init_user_ns, ses->cred_uid)); } static void --2.16.4
Signature · 3 lines
Thanks, Steve