cifs: allow dumping keys for directories too
authorShyam Prasad N <sprasad@microsoft.com>
Fri, 16 Jun 2023 10:37:46 +0000 (10:37 +0000)
committerSteve French <stfrench@microsoft.com>
Sat, 22 Jul 2023 19:42:54 +0000 (14:42 -0500)
commitb3edef6b9cd0b8893a5649ab1fa8bce71045d139
tree3e14a2aecddc93ba3c79b26029571eb0966dd920
parentfdf0eaf11452d72945af31804e2a1048ee1b574c
cifs: allow dumping keys for directories too

Dumping the enc/dec keys is a session wide operation.
And it should not matter if the ioctl was run on
a regular file or a directory.

Currently, we obtain the tcon pointer from the
cifs file handle. But since there's no dir open call
in cifs, this is not populated for dirs.

This change allows dumping of session keys using ioctl
even for directories. To do this, we'll now get the
tcon pointer from the superblock, and not from the file
handle.

Signed-off-by: Shyam Prasad N <sprasad@microsoft.com>
Signed-off-by: Steve French <stfrench@microsoft.com>
fs/smb/client/ioctl.c