Skip to content

Commit

Permalink
cifs: Display local UID details for SMB sessions in DebugData
Browse files Browse the repository at this point in the history
This is useful for distinguishing SMB sessions on a multiuser mount.

Signed-off-by: Paul Aurich <paul@darkrain42.org>
Signed-off-by: Steve French <stfrench@microsoft.com>
Reviewed-by: Aurelien Aptel <aaptel@suse.com>
  • Loading branch information
Paul Aurich authored and Steve French committed Jul 2, 2020
1 parent 9ebcfad commit aadd69c
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion fs/cifs/cifs_debug.c
Original file line number Diff line number Diff line change
Expand Up @@ -399,14 +399,18 @@ static int cifs_debug_data_proc_show(struct seq_file *m, void *v)
if (ses->sign)
seq_puts(m, " signed");

seq_printf(m, "\n\tUser: %d Cred User: %d",
from_kuid(&init_user_ns, ses->linux_uid),
from_kuid(&init_user_ns, ses->cred_uid));

if (ses->chan_count > 1) {
seq_printf(m, "\n\n\tExtra Channels: %zu\n",
ses->chan_count-1);
for (j = 1; j < ses->chan_count; j++)
cifs_dump_channel(m, j, &ses->chans[j]);
}

seq_puts(m, "\n\tShares:");
seq_puts(m, "\n\n\tShares:");
j = 0;

seq_printf(m, "\n\t%d) IPC: ", j);
Expand Down

0 comments on commit aadd69c

Please sign in to comment.