smbd: Disable SMB_SET_POSIX_LOCK when SMB1 is disabled
authorDavid Mulder <dmulder@suse.com>
Mon, 21 Mar 2022 20:11:04 +0000 (14:11 -0600)
committerJeremy Allison <jra@samba.org>
Thu, 7 Apr 2022 17:37:30 +0000 (17:37 +0000)
Signed-off-by: David Mulder <dmulder@suse.com>
Reviewed-by: Jeremy Allison <jra@samba.org>
source3/smbd/smb2_trans2.c

index e29af69dc67eb37e8dd11d0df4ce3e7dfc6d4029..65d8532468d7e37c36623c8781b091f2421b3bc4 100644 (file)
@@ -6695,6 +6695,7 @@ static NTSTATUS smbd_do_posix_setfilepathinfo(struct connection_struct *conn,
                }
 #endif
 
+#if defined(WITH_SMB1SERVER)
                case SMB_SET_POSIX_LOCK:
                {
                        if (fsp == NULL) {
@@ -6704,6 +6705,7 @@ static NTSTATUS smbd_do_posix_setfilepathinfo(struct connection_struct *conn,
                                                    pdata, total_data, fsp);
                        break;
                }
+#endif
 
                case SMB_POSIX_PATH_OPEN:
                {