]> git.ipfire.org Git - thirdparty/samba.git/commitdiff
3: smbd: SMB1 UNIX extensions - For POSIX mknod we can only create blk/chr/fifo/sock...
authorJeremy Allison <jra@samba.org>
Tue, 15 Oct 2019 20:35:44 +0000 (13:35 -0700)
committerJeremy Allison <jra@samba.org>
Wed, 6 Nov 2019 18:08:40 +0000 (18:08 +0000)
Fail requests to create other object types.

Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Volker Lendecke <vl@samba.org>
source3/smbd/trans2.c

index 767253d283b3e12819ed80ab4f3ce5749415b045..bcff091f0ea546631ccf67e976683e9e8f7a63cf 100644 (file)
@@ -8016,6 +8016,11 @@ static NTSTATUS smb_unix_mknod(connection_struct *conn,
 #endif
 
        switch (file_type) {
+               /* We can't create other objects here. */
+               case UNIX_TYPE_FILE:
+               case UNIX_TYPE_DIR:
+               case UNIX_TYPE_SYMLINK:
+                       return NT_STATUS_ACCESS_DENIED;
 #if defined(S_IFIFO)
                case UNIX_TYPE_FIFO:
                        unixmode |= S_IFIFO;