diff mbox series

Display cruid on krb5 mounts

Message ID CAH2r5muf6csp6Y=dN=P8iLLkj7bUniUgUE=duyg9pkZrQQsVtQ@mail.gmail.com
State New
Headers show
Series Display cruid on krb5 mounts | expand

Commit Message

Steve French March 3, 2019, 7:06 p.m. UTC
Can be helpful to tell which users we have gotten tickets for for
multiuser krb5 mounts
diff mbox series

Patch

From d3871f6ddd7f03b417c6e162cd4bf70d66468ab8 Mon Sep 17 00:00:00 2001
From: Steve French <stfrench@microsoft.com>
Date: Sat, 2 Mar 2019 06:56:54 -0600
Subject: [PATCH 41/41] smb3: for kerberos mounts display the credential uid
 used

For kerberos mounts, the cruid is helpful to display in
/proc/mounts in order to tell which uid's krb5 cache we
got the ticket for and to tell in the multiuser krb5 case
which local users (uids) we have Kerberos authentic sessions
for.

Signed-off-by: Steve French <stfrench@microsoft.com>
Reviewed-by: Ronnie Sahlberg <lsahlber@redhat.com>
---
 fs/cifs/cifsfs.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/fs/cifs/cifsfs.c b/fs/cifs/cifsfs.c
index f2c0d863fb52..217276b8b942 100644
--- a/fs/cifs/cifsfs.c
+++ b/fs/cifs/cifsfs.c
@@ -381,7 +381,7 @@  cifs_show_security(struct seq_file *s, struct cifs_ses *ses)
 		seq_puts(s, "ntlm");
 		break;
 	case Kerberos:
-		seq_puts(s, "krb5");
+		seq_printf(s, "krb5,cruid=%u", from_kuid_munged(&init_user_ns,ses->cred_uid));
 		break;
 	case RawNTLMSSP:
 		seq_puts(s, "ntlmssp");
-- 
2.17.1