From: Volker Lendecke Date: Wed, 25 Oct 2023 07:50:23 +0000 (+0200) Subject: smbd: Open file as REPARSE_POINT in unlink_internals() X-Git-Tag: talloc-2.4.2~940 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=1862561d1a1dc56f76e02e2116e52239e48a8274;p=thirdparty%2Fsamba.git smbd: Open file as REPARSE_POINT in unlink_internals() 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 Reviewed-by: Jeremy Allison Autobuild-User(master): Jeremy Allison Autobuild-Date(master): Wed Nov 1 19:56:33 UTC 2023 on atb-devel-224 --- diff --git a/source3/smbd/smb2_reply.c b/source3/smbd/smb2_reply.c index 01622ee5ffd..ce66e9b869f 100644 --- a/source3/smbd/smb2_reply.c +++ b/source3/smbd/smb2_reply.c @@ -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 */