From 1862561d1a1dc56f76e02e2116e52239e48a8274 Mon Sep 17 00:00:00 2001 From: Volker Lendecke Date: Wed, 25 Oct 2023 09:50:23 +0200 Subject: [PATCH] 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 --- source3/smbd/smb2_reply.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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 */ -- 2.47.3