From: Volker Lendecke Date: Wed, 25 Oct 2023 07:36:58 +0000 (+0200) Subject: smbd: Open file as REPARSE_POINT in rename_internals() X-Git-Tag: talloc-2.4.2~942 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=93f0a3671256d7bb66c64e31607660611e83af59;p=thirdparty%2Fsamba.git smbd: Open file as REPARSE_POINT in rename_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 --- diff --git a/source3/smbd/smb2_reply.c b/source3/smbd/smb2_reply.c index ce7f59aa7b9..01622ee5ffd 100644 --- a/source3/smbd/smb2_reply.c +++ b/source3/smbd/smb2_reply.c @@ -1854,7 +1854,7 @@ NTSTATUS rename_internals(TALLOC_CTX *ctx, uint32_t access_mask) { NTSTATUS status = NT_STATUS_OK; - int create_options = 0; + int create_options = FILE_OPEN_REPARSE_POINT; struct smb2_create_blobs *posx = NULL; struct files_struct *fsp = NULL; bool posix_pathname = (smb_fname_src->flags & SMB_FILENAME_POSIX_PATH);