]> git.ipfire.org Git - thirdparty/samba.git/commitdiff
smbd: Open file as REPARSE_POINT in rename_internals()
authorVolker Lendecke <vl@samba.org>
Wed, 25 Oct 2023 07:36:58 +0000 (09:36 +0200)
committerJeremy Allison <jra@samba.org>
Wed, 1 Nov 2023 18:55:32 +0000 (18:55 +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>
source3/smbd/smb2_reply.c

index ce7f59aa7b9df5133044bb2a81f6af8cc985c404..01622ee5ffd9891d7b81cf52eb03ff647c8b6bea 100644 (file)
@@ -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);