From patchwork Sun Mar 3 19:06:00 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Steve French X-Patchwork-Id: 10837225 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 99A3E1390 for ; Sun, 3 Mar 2019 19:06:14 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 77F3C29D16 for ; Sun, 3 Mar 2019 19:06:14 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 695CF29D2C; Sun, 3 Mar 2019 19:06:14 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-8.0 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FROM,MAILING_LIST_MULTI,RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 59D9729D16 for ; Sun, 3 Mar 2019 19:06:13 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726596AbfCCTGM (ORCPT ); Sun, 3 Mar 2019 14:06:12 -0500 Received: from mail-pg1-f181.google.com ([209.85.215.181]:35671 "EHLO mail-pg1-f181.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726440AbfCCTGM (ORCPT ); Sun, 3 Mar 2019 14:06:12 -0500 Received: by mail-pg1-f181.google.com with SMTP id e17so1435292pgd.2 for ; Sun, 03 Mar 2019 11:06:12 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:from:date:message-id:subject:to; bh=6MOynt0IufqdDBBRhNHG+AeIheXJttMv9z2TVOJQR9k=; b=uYhWN+W+55SoXqBdFJdlgGyCNSWaF7fMkT1Q6r+we8VevYkeAD8aUZRGp5ENaSWIWH mWkZYjNJIsTaveJyKJrRl/cMOTY/mb/+FLJC+fbVxlVORVBfL+15VgaFqb5KWtPBil5n BB6LuzSTo8Di81Q2yo/LgrHIaAayBNKYjrQmHihJINbi/In7pdStUbgErBciCDhuB9Br Kd+NhDvnhbCClv44KixAxvKgPn7VvKIKhNKIMfC01wywNqkPMb3h5mu1HazM9de61GqO RCf+iQNzloe8M93WeCPIWg1KKjVhccF7Im1KxHN6Y9OM64gIIqMgRXtsTtGmB+yP+LVc ydNQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:from:date:message-id:subject:to; bh=6MOynt0IufqdDBBRhNHG+AeIheXJttMv9z2TVOJQR9k=; b=N/LDuhEG0CXCW5KkHyJumgjK/r4zN643dBkEBj0JeAfGgNkOKhOLSU51WVyNg6VlzV uD9Ysmc8poqitQKJXJU8UbR9EfHRei/l3utCp9YHGQ96uYCtQJKZptBDNf1YROu+o8uI fYL8B1ONj8XA/SpZdHLd24ciGr80kNZRrx0dm85KjWHgLNQp+zv9wxz2xfm5Yc/dHfvP lTTXku4NSF2Df14Xgbi0io/znqjvdm24cI+AWMVbDYnp15QdfhnpCK8YdeHlKaMKWW6a 4m70bM5DsOpr5IkYKyck3CnIG9NqwNIBOTCs6fFE9b4D6qhhdwUeMyybJm17ntNJw+Tz KdDQ== X-Gm-Message-State: AHQUAuY7l9LfNbKKNJVV1z83NuA0B8Y19hR2bzLLLGNfWp1Qxz0cCfWd MJpfoT3ln9GCYV3oooBss34G/ziPyVUfeIn+CdyGLQ== X-Google-Smtp-Source: APXvYqxjHS7QhEyAEYD19SA0K+tU1V+PPTdoeS7LeZwfU3TxmH6Ujaoa8LrLwvaxNRvTspD6c11MWvprLjWmEUWPpMs= X-Received: by 2002:aa7:8d42:: with SMTP id s2mr16421690pfe.116.1551639971207; Sun, 03 Mar 2019 11:06:11 -0800 (PST) MIME-Version: 1.0 From: Steve French Date: Sun, 3 Mar 2019 13:06:00 -0600 Message-ID: Subject: [PATCH] Display cruid on krb5 mounts To: CIFS Sender: linux-cifs-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-cifs@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Can be helpful to tell which users we have gotten tickets for for multiuser krb5 mounts From d3871f6ddd7f03b417c6e162cd4bf70d66468ab8 Mon Sep 17 00:00:00 2001 From: Steve French 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 Reviewed-by: Ronnie Sahlberg --- 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