]> git.ipfire.org Git - thirdparty/samba.git/commitdiff
smbd: Open file as REPARSE_POINT in smb_posix_unlink()
authorVolker Lendecke <vl@samba.org>
Wed, 25 Oct 2023 07:29:13 +0000 (09:29 +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/smb1_trans2.c

index 3f8ad70eccec6b649b126aedf9c948c5e405dd70..bf07f325397b6d1d3537f8cc5372134dd139a50d 100644 (file)
@@ -3619,7 +3619,7 @@ static NTSTATUS smb_posix_unlink(connection_struct *conn,
        files_struct *fsp = NULL;
        uint16_t flags = 0;
        int info = 0;
-       int create_options = 0;
+       int create_options = FILE_OPEN_REPARSE_POINT;
        struct smb2_create_blobs *posx = NULL;
 
        if (!CAN_WRITE(conn)) {