Skip to content

Commit aadd69c

Browse files
darkrain42smfrench
authored andcommitted
cifs: Display local UID details for SMB sessions in DebugData
This is useful for distinguishing SMB sessions on a multiuser mount. Signed-off-by: Paul Aurich <[email protected]> Signed-off-by: Steve French <[email protected]> Reviewed-by: Aurelien Aptel <[email protected]>
1 parent 9ebcfad commit aadd69c

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

fs/cifs/cifs_debug.c

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -399,14 +399,18 @@ static int cifs_debug_data_proc_show(struct seq_file *m, void *v)
399399
if (ses->sign)
400400
seq_puts(m, " signed");
401401

402+
seq_printf(m, "\n\tUser: %d Cred User: %d",
403+
from_kuid(&init_user_ns, ses->linux_uid),
404+
from_kuid(&init_user_ns, ses->cred_uid));
405+
402406
if (ses->chan_count > 1) {
403407
seq_printf(m, "\n\n\tExtra Channels: %zu\n",
404408
ses->chan_count-1);
405409
for (j = 1; j < ses->chan_count; j++)
406410
cifs_dump_channel(m, j, &ses->chans[j]);
407411
}
408412

409-
seq_puts(m, "\n\tShares:");
413+
seq_puts(m, "\n\n\tShares:");
410414
j = 0;
411415

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

0 commit comments

Comments
 (0)