]> git.ipfire.org Git - thirdparty/samba.git/commitdiff
smbd: Open file as REPARSE_POINT in unlink_internals()
authorVolker Lendecke <vl@samba.org>
Wed, 25 Oct 2023 07:50:23 +0000 (09:50 +0200)
committerJeremy Allison <jra@samba.org>
Wed, 1 Nov 2023 19:56:33 +0000 (19:56 +0000)
In the future we'll block opening symlinks as such in
SMB_VFS_CREATE_FILE() unless we open as reparse points.

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
Autobuild-User(master): Jeremy Allison <jra@samba.org>
Autobuild-Date(master): Wed Nov  1 19:56:33 UTC 2023 on atb-devel-224

source3/smbd/smb2_reply.c

index 01622ee5ffd9891d7b81cf52eb03ff647c8b6bea..ce66e9b869fb698cee13f3475ea8e0db17b0f88a 100644 (file)
@@ -964,7 +964,8 @@ NTSTATUS unlink_internals(connection_struct *conn,
                 DELETE_ACCESS,         /* access_mask */
                 FILE_SHARE_NONE,       /* share_access */
                 FILE_OPEN,             /* create_disposition*/
-                FILE_NON_DIRECTORY_FILE, /* create_options */
+                FILE_NON_DIRECTORY_FILE |
+                       FILE_OPEN_REPARSE_POINT, /* create_options */
                 FILE_ATTRIBUTE_NORMAL, /* file_attributes */
                 0,                     /* oplock_request */
                 NULL,                  /* lease */