]> git.ipfire.org Git - thirdparty/linux.git/commit - fs/smb/server/vfs.c
ksmbd: remove follow symlinks support
authorNamjae Jeon <linkinjeon@kernel.org>
Tue, 21 Sep 2021 05:19:33 +0000 (14:19 +0900)
committerSteve French <stfrench@microsoft.com>
Thu, 23 Sep 2021 04:37:38 +0000 (23:37 -0500)
commit4ea477988c423a57241ea4840b12832de6fabdfd
tree3a22c20d0b7300de5acfb70c1b93c91faf792ef9
parent18a015bccf9e8927008d0a255c9f14b8ec15a648
ksmbd: remove follow symlinks support

Use  LOOKUP_NO_SYMLINKS flags for default lookup to prohibit the middle of
symlink component lookup and remove follow symlinks parameter support.
We re-implement it as reparse point later.

Test result:
smbclient -Ulinkinjeon%1234 //172.30.1.42/share -c
"get hacked/passwd passwd"
NT_STATUS_OBJECT_NAME_NOT_FOUND opening remote file \hacked\passwd

Cc: Ralph Böhme <slow@samba.org>
Cc: Steve French <smfrench@gmail.com>
Acked-by: Ronnie Sahlberg <lsahlber@redhat.com>
Signed-off-by: Namjae Jeon <linkinjeon@kernel.org>
Signed-off-by: Steve French <stfrench@microsoft.com>
fs/ksmbd/smb2pdu.c
fs/ksmbd/vfs.c