The branch, master has been updated via efcaeff2c33 WHATSNEW.txt: Add explaination of --without-smb1-server and --with-smb1-server configure options. via 8d62b7aca71 ci: Create samba-fileserver-without-smb1 environment via b6d416205b2 configure: Fail smbd w/o smb1 if selftest when configured with ad_dc via a9b5727632f configure: Add option for disabling the smb1 server via 0de91444523 s3: smbd: Rename init_smb_request() -> init_smb1_request(). via 1574443b464 s3: smbd: Rename reply_outbuf() -> reply_smb1_outbuf(). via 97fd5e56c02 s3: smbd: Rename create_outbuf() -> create_smb1_outbuf() via c453cfbf87d s3: smbd: Rename construct_reply_common_req() -> construct_smb1_reply_common_req() via 2d5e97f222e s3: smbd: Rename construct_reply_common() -> construct_smb1_reply_common(). via 9caa467cc23 s3: smbd: Rename srv_set_message() -> srv_smb1_set_message(). via d949073e0d8 s3: smbd: Rename valid_smb_header() -> valid_smb1_header() via e17ad24c02c smbd: Remove srv_send_smb via a48bf2431e3 smbd: Remove uses of srv_send_smb via 536330d2eb5 smbd: Move reply_pipe_write to smb1_pipes.c via 085b16e0c2c smbd: Process error reply if SMB1 negprot parsing fails via aa61db2d0be smbd: Enable multi-protocol negotiate w/out SMB1 via f0ae7fba879 smbd: Move init_smb_request to smb2_process.c via ed23ce77d94 smbd: Move valid_smb_header to smb2_process.c via 8084c432521 smbd: Disable use of smb_fn_name when SMB1 is disabled via f810a113a89 smbd: Remove duplicate read_nttrans_ea_list function prototype via 858a49d1573 smbd: Disable SMB_SET_POSIX_LOCK when SMB1 is disabled via 941ed7efd2c smbd: Disable SMB_QUERY_CIFS_UNIX_INFO when SMB1 is disable via b70c88fb0bc smbd: Disable use of smb_fn_name without SMB1 in error.c via e081b25e07f torture: Disable vfs chain test dependant on SMB1 via 85753e4693e smbd: Move trans2.c -> smb2_trans2.c via b2e52ab97e0 s3: smbd: Move reply_findnclose() from trans2.c to smb1_reply.c via 481b7bfd298 s3: smbd: Move reply_findclose() from trans2.c to smb1_reply.c via 97136a7a8aa smbd: Move reply_transs2 to smb1_trans2.c via aab698e5266 smbd: Move reply_trans2 to smb1_trans2.c via 547f5c78ad0 smbd: Move smb_set_posix_lock to smb1_trans2.c via 88b07d3b7f0 smbd: Move send_trans2_replies to smb1_trans2.c via 34feb418813 smbd: Move smb1_utils.h include to smbd.h via 7e1ff0ff35b smbd: Move process.c -> smb1_process.c via 43672e15585 smbd: Move smbd_process to smb2_process.c via 2e0e49f41b2 smbd: Disable smb1 in smbd_process via 6f792afe437 smbd: Move smbd_add_connection to smb2_process.c via c43c9ef3eed smbd: Disable smb1 in smbd_smb2_server_connection_read_handler via 3d37047f3c5 smbd: Disable smb1 in smbd_server_connection_handler via e153f4270c6 smbd: Disable smb1 in smbd_add_connection via 7a8f77acb93 smbd: Move smbXsrv_connection_dbg to smb2_process.c via 635bf8513be smbd: Move smbXsrv_connection_init_tables to smb2_process.c via 137d29897c5 smbd: Disable smb1 in smbXsrv_connection_init_tables via f2fc4227a55 smbd: Move process_smb to smb2_process.c via 92d18a3599f smbd: Move reply_outbuf and construct_reply_common_req to smb2_process.c via 5582077b922 smbd: Move push_deferred_open_message_smb to smb2_process.c via 9e4517468ea smbd: Separate smb1 code from push_deferred_open_message_smb via 8e3f809953e smbd: Move get_deferred_open_message_state to smb2_process.c via f1cc153ed95 smbd: Move open_was_deferred to smb2_process.c via 86452205abb smbd: Move schedule_deferred_open_message_smb to smb2_process.c via 4a4be53530d smbd: Move remove_deferred_open_message_smb to smb2_process.c via 7e55512a3b3 smbd: Move receive_smb_talloc/smb2_receive_talloc to smb2_process.c via b2313722454 smbd: Split receive_smb_talloc into smb1_receive_talloc/smb2_receive_talloc via cd111f72697 smbd: Move read_packet_remainder to smb2_process.c via e287f7c27bd smbd: Move srv_set_message to smb2_process.c via 08aa1619c6a smbd: Move srv_send_smb/smb2_srv_send to smb2_process.c via 8914b9ca8ef smbd: Split srv_send_smb into smb1_srv_send/smb2_srv_send via e8c36c25a4b smbd: Split process_smb() into process_smb1() and process_smb2() via 7439d7eb7d2 smbd: Move signing.c -> smb1_signing.c via 3e38df7d208 smbd: Disable call to smb1_srv_init_signing without smb1 via 7893b3cb92e smbd: Move srv_init_signing to smb2_signing.c via 047df615619 smbd: Move smb2_srv_init_signing to smb2_signing.c via cafa8260ade smbd: Move service.c -> smb2_service.c via 0ad4a38a47e smbd: Move make_connection to smb1_service.c via b431ec8da01 smbd: Disable call to smb1_srv_is_signing_active without smb1 via 3daa70d7a71 smbd: Move reply.c -> smb1_reply.c via 0be7643b06f smbd: Move smbd_do_unlocking to smb2_reply.c via a85436ac48e smbd: Move get_lock_offset to smb2_reply.c via fdf5727c1e6 smbd: Move copy_file to smb2_reply.c via 160849a822d smbd: Move rename_internals to smb2_reply.c via 4140d1790aa smbd: Move rename_internals_fsp to smb2_reply.c via a8985a8ad83 smbd: Move sendfile_short_send to smb2_reply.c via 01ee69a958b smbd: Move fake_sendfile to smb2_reply.c via 56ac1efc700 smbd: Move unlink_internals to smb2_reply.c via 95d9606827b smbd: Move reply_special to smb2_reply.c via f0396b9af9e smbd: Move check_fsp_ntquota_handle to smb2_reply.c via 347c7af9e9f smbd: move check_fsp to smb2_reply.c via 0d21c676ae5 smbd: Move check_fsp_open to smb2_reply.c via a8e1f65cba4 smbd: Move srvstr_pull_req_talloc to smb2_reply.c via 0e3a46fc0be smbd: Move srvstr_get_path* to smb2_reply.c via 08fa5527cda smbd: Move check_path_syntax* to smb2_reply.c via 2069d235f72 smbd: Move pipes.c -> smb2_pipes.c via 0a68f9d47cb smbd: Move reply_pipe_read_and_X to smb1_pipes.c via 3d3713860f2 smbd: Move reply_pipe_write_and_X to smb1_pipes.c via c350372110d smbd: Move reply_open_pipe_and_X to smb1_pipes.c via 4f0a8e5b211 smbd: Move oplock.c -> smb2_oplock.c via 1e0b0402f8a smbd: Disable smb1 oplock calls when smb1 is disabled via bed19efa1c4 smbd: Move send_break_message_smb1 to smb1_oplock.c via bb34663958e smbd: Move new_break_message_smb1 to smb1_oplock.c via feb6c593789 smbd: Move nttrans.c -> smb1_nttrans.c via a5292f0b1b5 smbd: Move smbd_do_query_getinfo_quota to smb2_nttrans.c via 0ed7f06e99d smbd: Move smbd_do_query_security_desc to smb2_nttrans.c via 17e04761cbc smbd: Move copy_internals to smb2_nttrans.c via 7e88a86a157 smbd: Move set_sd_blob to smb2_nttrans.c via 2448874345f smbd: Move set_sd to smb2_nttrans.c via 1139ad7b8bc smbd: Move negprot.c -> smb1_negprot.c via dd633d561b1 smbd: negprot_spnego allow disabling smb1 spnego set via 23615a27a58 smbd: Move negprot_spnego to smb2_negprot.c via d42a78f63a7 smbd: Move ipc.c -> smb1_ipc.c via 49f7763dc04 smbd: Move nt_status_np_pipe to smb2_ipc.c via 3b1c02e469f smbd: Move aio.c -> smb2_aio.c via 6a17ce3295c smbd: Move schedule_aio_write_and_X to smb1_aio.c via c510bd332e4 smbd: Move schedule_aio_read_and_X to smb1_aio.c via 35b184b5e37 smbd: Allow disabling SMB1 in struct smbXsrv_connection via 630d946df86 smbd: Disable build for SMB1 only files via e00b09ce49f smbd: Move lanman.c -> smb1_lanman.c via 92b6efe3abb smbd: Move sesssetup.c -> smb1_sesssetup.c via 2266fd4ccee smbd: Move message.c -> smb1_message.c via 77343f8f5ef smbd: Add WITH_SMB1SERVER enabled for now from 6e6ced4b8cb smbd: Use dirfsp and atname passed to open_file()
https://git.samba.org/?p=samba.git;a=shortlog;h=master - Log ----------------------------------------------------------------- commit efcaeff2c333496a52ee5b74d03a6daf962ce665 Author: Jeremy Allison <j...@samba.org> Date: Tue Apr 5 10:32:20 2022 -0700 WHATSNEW.txt: Add explaination of --without-smb1-server and --with-smb1-server configure options. Signed-off-by: Jeremy Allison <j...@samba.org> Reviewed-by: David Mulder <dmul...@suse.com> Autobuild-User(master): Jeremy Allison <j...@samba.org> Autobuild-Date(master): Thu Apr 7 18:33:31 UTC 2022 on sn-devel-184 commit 8d62b7aca71fc20017e950ac4ec372324b907803 Author: David Mulder <dmul...@suse.com> Date: Thu Mar 3 14:07:50 2022 -0700 ci: Create samba-fileserver-without-smb1 environment Signed-off-by: David Mulder <dmul...@suse.com> Reviewed-by: Jeremy Allison <j...@samba.org> commit b6d416205b2880356852715f4fb49adf8d756bbc Author: David Mulder <dmul...@suse.com> Date: Wed Apr 6 12:55:01 2022 -0600 configure: Fail smbd w/o smb1 if selftest when configured with ad_dc When we build with samba selftest and ad_dc, we must include smb1 in smbd. Signed-off-by: David Mulder <dmul...@suse.com> Reviewed-by: Jeremy Allison <j...@samba.org> commit a9b5727632f5e6b23478af6e90ec3b3ac4a3e609 Author: David Mulder <dmul...@suse.com> Date: Mon Mar 7 10:10:14 2022 -0700 configure: Add option for disabling the smb1 server Signed-off-by: David Mulder <dmul...@suse.com> Reviewed-by: Jeremy Allison <j...@samba.org> commit 0de914445234a8e8f42855c6a51a4ccf4776904e Author: Jeremy Allison <j...@samba.org> Date: Mon Apr 4 19:55:39 2022 -0700 s3: smbd: Rename init_smb_request() -> init_smb1_request(). Signed-off-by: Jeremy Allison <j...@samba.org> Reviewed-by: David Mulder <dmul...@suse.com> commit 1574443b4645062bdb1f361db6edd2d6dc7bfbf4 Author: Jeremy Allison <j...@samba.org> Date: Mon Apr 4 19:53:20 2022 -0700 s3: smbd: Rename reply_outbuf() -> reply_smb1_outbuf(). Signed-off-by: Jeremy Allison <j...@samba.org> Reviewed-by: David Mulder <dmul...@suse.com> commit 97fd5e56c02b83bf8e717a862cbf17cd0ea806d4 Author: Jeremy Allison <j...@samba.org> Date: Mon Apr 4 18:45:44 2022 -0700 s3: smbd: Rename create_outbuf() -> create_smb1_outbuf() Signed-off-by: Jeremy Allison <j...@samba.org> Reviewed-by: David Mulder <dmul...@suse.com> commit c453cfbf87d954dc907952bb25f8288a3f0d9e83 Author: Jeremy Allison <j...@samba.org> Date: Mon Apr 4 18:43:54 2022 -0700 s3: smbd: Rename construct_reply_common_req() -> construct_smb1_reply_common_req() Signed-off-by: Jeremy Allison <j...@samba.org> Reviewed-by: David Mulder <dmul...@suse.com> commit 2d5e97f222ef261bb1808f40c89f6dc250aedcf5 Author: Jeremy Allison <j...@samba.org> Date: Mon Apr 4 18:42:02 2022 -0700 s3: smbd: Rename construct_reply_common() -> construct_smb1_reply_common(). Signed-off-by: Jeremy Allison <j...@samba.org> Reviewed-by: David Mulder <dmul...@suse.com> commit 9caa467cc2307b88accf7ae92398d0e6da061b3e Author: Jeremy Allison <j...@samba.org> Date: Mon Apr 4 18:40:11 2022 -0700 s3: smbd: Rename srv_set_message() -> srv_smb1_set_message(). Signed-off-by: Jeremy Allison <j...@samba.org> Reviewed-by: David Mulder <dmul...@suse.com> commit d949073e0d8b5b1fa14b453f3f13d4678ff886fa Author: Jeremy Allison <j...@samba.org> Date: Mon Apr 4 18:35:16 2022 -0700 s3: smbd: Rename valid_smb_header() -> valid_smb1_header() Signed-off-by: Jeremy Allison <j...@samba.org> Reviewed-by: David Mulder <dmul...@suse.com> commit e17ad24c02cbd5c17882f32a777fa13c8ac6c1fa Author: David Mulder <dmul...@suse.com> Date: Thu Mar 31 13:09:57 2022 -0600 smbd: Remove srv_send_smb Signed-off-by: David Mulder <dmul...@suse.com> Signed-off-by: Jeremy Allison <j...@samba.org> commit a48bf2431e36732488ac08e5c80fbf3a84ab0dd0 Author: David Mulder <dmul...@suse.com> Date: Thu Mar 31 13:09:13 2022 -0600 smbd: Remove uses of srv_send_smb Replace them with direct calls to smb1_srv_send and smb2_srv_send. Signed-off-by: David Mulder <dmul...@suse.com> Signed-off-by: Jeremy Allison <j...@samba.org> commit 536330d2eb5219482e905d365f3ca56e3dfa2fe3 Author: David Mulder <dmul...@suse.com> Date: Thu Mar 31 11:37:25 2022 -0600 smbd: Move reply_pipe_write to smb1_pipes.c Signed-off-by: David Mulder <dmul...@suse.com> Signed-off-by: Jeremy Allison <j...@samba.org> commit 085b16e0c2c14be46b8dfc4adc48eff1ca3c386c Author: David Mulder <dmul...@suse.com> Date: Wed Mar 30 02:57:21 2022 -0600 smbd: Process error reply if SMB1 negprot parsing fails Signed-off-by: David Mulder <dmul...@suse.com> Signed-off-by: Jeremy Allison <j...@samba.org> commit aa61db2d0be624649eaa60aeb40750158a7b535d Author: David Mulder <dmul...@suse.com> Date: Wed Mar 23 06:43:40 2022 -0600 smbd: Enable multi-protocol negotiate w/out SMB1 This enables the multi-protocol negotiate when the SMB1 build is disabled. It requires enabling parts of the SMB1 negotiation. Signed-off-by: David Mulder <dmul...@suse.com> Signed-off-by: Jeremy Allison <j...@samba.org> commit f0ae7fba87960311081a776ef1befb04b98dd0b5 Author: David Mulder <dmul...@suse.com> Date: Fri Mar 25 14:08:18 2022 -0600 smbd: Move init_smb_request to smb2_process.c init_smb_request is needed for a multi-protocol negotiation. Signed-off-by: David Mulder <dmul...@suse.com> Reviewed-by: Jeremy Allison <j...@samba.org> commit ed23ce77d940eacb5a2a8e35cba50d7159e185b7 Author: David Mulder <dmul...@suse.com> Date: Fri Mar 25 13:59:14 2022 -0600 smbd: Move valid_smb_header to smb2_process.c valid_smb_header is needed for a multi-protocol negotiation. Signed-off-by: David Mulder <dmul...@suse.com> Reviewed-by: Jeremy Allison <j...@samba.org> commit 8084c432521525cac853a6e269e2a0d0a5a69467 Author: David Mulder <dmul...@suse.com> Date: Mon Mar 21 14:23:15 2022 -0600 smbd: Disable use of smb_fn_name when SMB1 is disabled perfcount_test.c was using the smb_fn_name function, which doesn't exist when SMB1 is disabled. Signed-off-by: David Mulder <dmul...@suse.com> Reviewed-by: Jeremy Allison <j...@samba.org> commit f810a113a892117c9b8a0ea1d649bc1d21aeb636 Author: David Mulder <dmul...@suse.com> Date: Mon Mar 21 14:18:58 2022 -0600 smbd: Remove duplicate read_nttrans_ea_list function prototype Because this stray prototype was mixed in with the smb1 code, it caused the smb2-only build to fail. Instead of duplicating the function prototype, lets just include the correct header. Signed-off-by: David Mulder <dmul...@suse.com> Reviewed-by: Jeremy Allison <j...@samba.org> commit 858a49d15730f9177ef57b4f79519548772a409a Author: David Mulder <dmul...@suse.com> Date: Mon Mar 21 14:11:04 2022 -0600 smbd: Disable SMB_SET_POSIX_LOCK when SMB1 is disabled Signed-off-by: David Mulder <dmul...@suse.com> Reviewed-by: Jeremy Allison <j...@samba.org> commit 941ed7efd2c6d0d3f49304a4150677285680ae2e Author: David Mulder <dmul...@suse.com> Date: Mon Mar 21 14:10:24 2022 -0600 smbd: Disable SMB_QUERY_CIFS_UNIX_INFO when SMB1 is disable Signed-off-by: David Mulder <dmul...@suse.com> Reviewed-by: Jeremy Allison <j...@samba.org> commit b70c88fb0bca8c9614239e05cb495fded5c76a67 Author: David Mulder <dmul...@suse.com> Date: Mon Mar 21 13:50:08 2022 -0600 smbd: Disable use of smb_fn_name without SMB1 in error.c Signed-off-by: David Mulder <dmul...@suse.com> Reviewed-by: Jeremy Allison <j...@samba.org> commit e081b25e07ff48bf5bcfc2266915464fad9d28a9 Author: David Mulder <dmul...@suse.com> Date: Thu Mar 10 14:54:35 2022 -0700 torture: Disable vfs chain test dependant on SMB1 Signed-off-by: David Mulder <dmul...@suse.com> Reviewed-by: Jeremy Allison <j...@samba.org> commit 85753e4693eb589310012376f2ce606238c86e26 Author: David Mulder <dmul...@suse.com> Date: Mon Mar 21 13:26:09 2022 -0600 smbd: Move trans2.c -> smb2_trans2.c Signed-off-by: David Mulder <dmul...@suse.com> Reviewed-by: Jeremy Allison <j...@samba.org> commit b2e52ab97e0d3f542e66daa8e7466cc2ad56db21 Author: Jeremy Allison <j...@samba.org> Date: Mon Apr 4 19:50:58 2022 -0700 s3: smbd: Move reply_findnclose() from trans2.c to smb1_reply.c Signed-off-by: Jeremy Allison <j...@samba.org> Reviewed-by: David Mulder <dmul...@suse.com> commit 481b7bfd298b8dd555271eff49fbd31aa661736a Author: Jeremy Allison <j...@samba.org> Date: Mon Apr 4 19:48:25 2022 -0700 s3: smbd: Move reply_findclose() from trans2.c to smb1_reply.c Signed-off-by: Jeremy Allison <j...@samba.org> Reviewed-by: David Mulder <dmul...@suse.com> commit 97136a7a8aae819a34ebd6a595229c5313f2fcf3 Author: David Mulder <dmul...@suse.com> Date: Mon Mar 21 13:15:19 2022 -0600 smbd: Move reply_transs2 to smb1_trans2.c Signed-off-by: David Mulder <dmul...@suse.com> Reviewed-by: Jeremy Allison <j...@samba.org> commit aab698e5266ed4abba01274ec7b9ef135af98efd Author: David Mulder <dmul...@suse.com> Date: Mon Mar 21 12:29:26 2022 -0600 smbd: Move reply_trans2 to smb1_trans2.c Signed-off-by: David Mulder <dmul...@suse.com> Reviewed-by: Jeremy Allison <j...@samba.org> commit 547f5c78ad0ecd4fe8e627f1a0567db65ed0bf8a Author: David Mulder <dmul...@suse.com> Date: Mon Mar 21 11:59:15 2022 -0600 smbd: Move smb_set_posix_lock to smb1_trans2.c Signed-off-by: David Mulder <dmul...@suse.com> Reviewed-by: Jeremy Allison <j...@samba.org> commit 88b07d3b7f084796cd843918b91f5cc4184cf9ef Author: David Mulder <dmul...@suse.com> Date: Mon Mar 21 11:51:41 2022 -0600 smbd: Move send_trans2_replies to smb1_trans2.c Signed-off-by: David Mulder <dmul...@suse.com> Reviewed-by: Jeremy Allison <j...@samba.org> commit 34feb418813f8b9c584c5c2b5adf3ea9acf5b802 Author: David Mulder <dmul...@suse.com> Date: Mon Mar 21 09:56:04 2022 -0600 smbd: Move smb1_utils.h include to smbd.h Signed-off-by: David Mulder <dmul...@suse.com> Reviewed-by: Jeremy Allison <j...@samba.org> commit 7e1ff0ff35bb2645c37e7ee17634c024aaed99af Author: David Mulder <dmul...@suse.com> Date: Mon Mar 21 08:30:48 2022 -0600 smbd: Move process.c -> smb1_process.c Signed-off-by: David Mulder <dmul...@suse.com> Reviewed-by: Jeremy Allison <j...@samba.org> commit 43672e15585dcfe747a1a3a7adb823db4aad64c7 Author: David Mulder <dmul...@suse.com> Date: Mon Mar 21 08:05:15 2022 -0600 smbd: Move smbd_process to smb2_process.c Signed-off-by: David Mulder <dmul...@suse.com> Reviewed-by: Jeremy Allison <j...@samba.org> commit 2e0e49f41b21dc7b0d87fbe566467f62140ab53b Author: David Mulder <dmul...@suse.com> Date: Fri Mar 18 15:44:10 2022 -0600 smbd: Disable smb1 in smbd_process Signed-off-by: David Mulder <dmul...@suse.com> Reviewed-by: Jeremy Allison <j...@samba.org> commit 6f792afe437dd6b780b27de4317319824222ba14 Author: David Mulder <dmul...@suse.com> Date: Fri Mar 18 15:37:17 2022 -0600 smbd: Move smbd_add_connection to smb2_process.c Signed-off-by: David Mulder <dmul...@suse.com> Reviewed-by: Jeremy Allison <j...@samba.org> commit c43c9ef3eed1054272def85cc0958d8f59446738 Author: David Mulder <dmul...@suse.com> Date: Fri Mar 18 15:29:56 2022 -0600 smbd: Disable smb1 in smbd_smb2_server_connection_read_handler Signed-off-by: David Mulder <dmul...@suse.com> Reviewed-by: Jeremy Allison <j...@samba.org> commit 3d37047f3c5a8bfc48293601d50e61198f76012e Author: David Mulder <dmul...@suse.com> Date: Fri Mar 18 15:26:27 2022 -0600 smbd: Disable smb1 in smbd_server_connection_handler Signed-off-by: David Mulder <dmul...@suse.com> Reviewed-by: Jeremy Allison <j...@samba.org> commit e153f4270c681dbf32e7d3444365296e04454274 Author: David Mulder <dmul...@suse.com> Date: Fri Mar 18 15:17:39 2022 -0600 smbd: Disable smb1 in smbd_add_connection Signed-off-by: David Mulder <dmul...@suse.com> Reviewed-by: Jeremy Allison <j...@samba.org> commit 7a8f77acb93904c898e09ed4ceb23dae00385fdd Author: David Mulder <dmul...@suse.com> Date: Fri Mar 18 15:13:25 2022 -0600 smbd: Move smbXsrv_connection_dbg to smb2_process.c Signed-off-by: David Mulder <dmul...@suse.com> Reviewed-by: Jeremy Allison <j...@samba.org> commit 635bf8513bebf179165b06912a065f3c637693c4 Author: David Mulder <dmul...@suse.com> Date: Fri Mar 18 15:10:01 2022 -0600 smbd: Move smbXsrv_connection_init_tables to smb2_process.c Signed-off-by: David Mulder <dmul...@suse.com> Reviewed-by: Jeremy Allison <j...@samba.org> commit 137d29897c5c9a6ef77832b98fbc446dff2588b4 Author: David Mulder <dmul...@suse.com> Date: Fri Mar 18 15:05:27 2022 -0600 smbd: Disable smb1 in smbXsrv_connection_init_tables Signed-off-by: David Mulder <dmul...@suse.com> Reviewed-by: Jeremy Allison <j...@samba.org> commit f2fc4227a551d2bc9cb80014d7bdc3216081abbb Author: David Mulder <dmul...@suse.com> Date: Fri Mar 18 14:53:19 2022 -0600 smbd: Move process_smb to smb2_process.c Signed-off-by: David Mulder <dmul...@suse.com> Reviewed-by: Jeremy Allison <j...@samba.org> commit 92d18a3599f8068b9d576f9d0e7ed70192ce0c61 Author: David Mulder <dmul...@suse.com> Date: Fri Mar 18 14:45:09 2022 -0600 smbd: Move reply_outbuf and construct_reply_common_req to smb2_process.c Signed-off-by: David Mulder <dmul...@suse.com> Reviewed-by: Jeremy Allison <j...@samba.org> commit 5582077b922d97c8a32ddcdc58071b427d3cb29a Author: David Mulder <dmul...@suse.com> Date: Fri Mar 18 14:28:08 2022 -0600 smbd: Move push_deferred_open_message_smb to smb2_process.c Signed-off-by: David Mulder <dmul...@suse.com> Reviewed-by: Jeremy Allison <j...@samba.org> commit 9e4517468ea6aed8e6da941a4519327a9a07c6be Author: David Mulder <dmul...@suse.com> Date: Fri Mar 18 14:22:27 2022 -0600 smbd: Separate smb1 code from push_deferred_open_message_smb Signed-off-by: David Mulder <dmul...@suse.com> Reviewed-by: Jeremy Allison <j...@samba.org> commit 8e3f809953e29927fedd00bec0d17d31194fd855 Author: David Mulder <dmul...@suse.com> Date: Fri Mar 18 14:15:30 2022 -0600 smbd: Move get_deferred_open_message_state to smb2_process.c Signed-off-by: David Mulder <dmul...@suse.com> Reviewed-by: Jeremy Allison <j...@samba.org> commit f1cc153ed95632e9108ca9369d7326a8cf40952e Author: David Mulder <dmul...@suse.com> Date: Fri Mar 18 14:08:12 2022 -0600 smbd: Move open_was_deferred to smb2_process.c Signed-off-by: David Mulder <dmul...@suse.com> Reviewed-by: Jeremy Allison <j...@samba.org> commit 86452205abb56fecf238dade8b44f5af8dd9d86a Author: David Mulder <dmul...@suse.com> Date: Fri Mar 18 13:35:41 2022 -0600 smbd: Move schedule_deferred_open_message_smb to smb2_process.c Signed-off-by: David Mulder <dmul...@suse.com> Reviewed-by: Jeremy Allison <j...@samba.org> commit 4a4be53530d02588b23b3f95c9b3da255efb0211 Author: David Mulder <dmul...@suse.com> Date: Fri Mar 18 12:28:19 2022 -0600 smbd: Move remove_deferred_open_message_smb to smb2_process.c Signed-off-by: David Mulder <dmul...@suse.com> Reviewed-by: Jeremy Allison <j...@samba.org> commit 7e55512a3b3983112c68ce0294b6cdc98c389016 Author: David Mulder <dmul...@suse.com> Date: Fri Mar 18 09:41:02 2022 -0600 smbd: Move receive_smb_talloc/smb2_receive_talloc to smb2_process.c Signed-off-by: David Mulder <dmul...@suse.com> Reviewed-by: Jeremy Allison <j...@samba.org> commit b2313722454a3cacdb3f6d71ff1f8a6efb65683b Author: David Mulder <dmul...@suse.com> Date: Fri Mar 18 09:22:21 2022 -0600 smbd: Split receive_smb_talloc into smb1_receive_talloc/smb2_receive_talloc Signed-off-by: David Mulder <dmul...@suse.com> Reviewed-by: Jeremy Allison <j...@samba.org> commit cd111f7269768e3e67325c0e9f019c9f1dc8644e Author: David Mulder <dmul...@suse.com> Date: Thu Mar 17 15:29:18 2022 -0600 smbd: Move read_packet_remainder to smb2_process.c Signed-off-by: David Mulder <dmul...@suse.com> Reviewed-by: Jeremy Allison <j...@samba.org> commit e287f7c27bd13bec73bd301643ec80e8f8957ae7 Author: David Mulder <dmul...@suse.com> Date: Thu Mar 17 15:23:33 2022 -0600 smbd: Move srv_set_message to smb2_process.c Signed-off-by: David Mulder <dmul...@suse.com> Reviewed-by: Jeremy Allison <j...@samba.org> commit 08aa1619c6ae1dc05ecf54391661fa1ff7babedd Author: David Mulder <dmul...@suse.com> Date: Fri Mar 18 08:22:31 2022 -0600 smbd: Move srv_send_smb/smb2_srv_send to smb2_process.c Signed-off-by: David Mulder <dmul...@suse.com> Reviewed-by: Jeremy Allison <j...@samba.org> commit 8914b9ca8efee224cd74c7c37e02d66f4d806647 Author: David Mulder <dmul...@suse.com> Date: Fri Mar 18 08:13:43 2022 -0600 smbd: Split srv_send_smb into smb1_srv_send/smb2_srv_send Signed-off-by: David Mulder <dmul...@suse.com> Reviewed-by: Jeremy Allison <j...@samba.org> commit e8c36c25a4b09b5e643297de71e3692fecd46b9b Author: David Mulder <dmul...@suse.com> Date: Thu Mar 10 13:09:06 2022 -0700 smbd: Split process_smb() into process_smb1() and process_smb2() Signed-off-by: David Mulder <dmul...@suse.com> Reviewed-by: Jeremy Allison <j...@samba.org> commit 7439d7eb7d2cfb2ac8a3fbd2aeb24415b4318ffa Author: David Mulder <dmul...@suse.com> Date: Thu Mar 17 14:54:01 2022 -0600 smbd: Move signing.c -> smb1_signing.c Signed-off-by: David Mulder <dmul...@suse.com> Reviewed-by: Jeremy Allison <j...@samba.org> commit 3e38df7d2085e340a7c1fae34cbb09f174d749b3 Author: David Mulder <dmul...@suse.com> Date: Thu Mar 17 14:29:41 2022 -0600 smbd: Disable call to smb1_srv_init_signing without smb1 Signed-off-by: David Mulder <dmul...@suse.com> Reviewed-by: Jeremy Allison <j...@samba.org> commit 7893b3cb92ee78d1af976dfbcc425222fb5fe0e6 Author: David Mulder <dmul...@suse.com> Date: Thu Mar 17 14:28:10 2022 -0600 smbd: Move srv_init_signing to smb2_signing.c Signed-off-by: David Mulder <dmul...@suse.com> Reviewed-by: Jeremy Allison <j...@samba.org> commit 047df615619cd923bf3c6ec73b7283f8ae6d946a Author: David Mulder <dmul...@suse.com> Date: Thu Mar 17 13:55:25 2022 -0600 smbd: Move smb2_srv_init_signing to smb2_signing.c Signed-off-by: David Mulder <dmul...@suse.com> Reviewed-by: Jeremy Allison <j...@samba.org> commit cafa8260ade13e7f1943db52d64f42659c493368 Author: David Mulder <dmul...@suse.com> Date: Thu Mar 17 13:35:44 2022 -0600 smbd: Move service.c -> smb2_service.c Signed-off-by: David Mulder <dmul...@suse.com> Reviewed-by: Jeremy Allison <j...@samba.org> commit 0ad4a38a47ed4a16f4145b36887314bd9460bf3a Author: David Mulder <dmul...@suse.com> Date: Thu Mar 17 13:32:30 2022 -0600 smbd: Move make_connection to smb1_service.c Signed-off-by: David Mulder <dmul...@suse.com> Reviewed-by: Jeremy Allison <j...@samba.org> commit b431ec8da0181fe8609d222467839037e86b8986 Author: David Mulder <dmul...@suse.com> Date: Thu Mar 17 13:21:32 2022 -0600 smbd: Disable call to smb1_srv_is_signing_active without smb1 Signed-off-by: David Mulder <dmul...@suse.com> Reviewed-by: Jeremy Allison <j...@samba.org> commit 3daa70d7a717c2f55c685547da395a587db83186 Author: David Mulder <dmul...@suse.com> Date: Thu Mar 17 12:59:22 2022 -0600 smbd: Move reply.c -> smb1_reply.c Signed-off-by: David Mulder <dmul...@suse.com> Reviewed-by: Jeremy Allison <j...@samba.org> commit 0be7643b06f2f8312aa2ca9dd5025a25e025fdf4 Author: David Mulder <dmul...@suse.com> Date: Thu Mar 17 12:29:42 2022 -0600 smbd: Move smbd_do_unlocking to smb2_reply.c Signed-off-by: David Mulder <dmul...@suse.com> Reviewed-by: Jeremy Allison <j...@samba.org> commit a85436ac48e011be401e2a551a6f2a93480cf515 Author: David Mulder <dmul...@suse.com> Date: Thu Mar 17 12:20:30 2022 -0600 smbd: Move get_lock_offset to smb2_reply.c Signed-off-by: David Mulder <dmul...@suse.com> Reviewed-by: Jeremy Allison <j...@samba.org> commit fdf5727c1e6e54dee80c54974f54053f0c8e4561 Author: David Mulder <dmul...@suse.com> Date: Thu Mar 17 11:34:46 2022 -0600 smbd: Move copy_file to smb2_reply.c Signed-off-by: David Mulder <dmul...@suse.com> Reviewed-by: Jeremy Allison <j...@samba.org> commit 160849a822da00ab9de6dcbc69e67b146fb07952 Author: David Mulder <dmul...@suse.com> Date: Thu Mar 17 11:30:25 2022 -0600 smbd: Move rename_internals to smb2_reply.c Signed-off-by: David Mulder <dmul...@suse.com> Reviewed-by: Jeremy Allison <j...@samba.org> commit 4140d1790aaaaa0710c3e6104b8a0b0687103f86 Author: David Mulder <dmul...@suse.com> Date: Thu Mar 17 11:25:05 2022 -0600 smbd: Move rename_internals_fsp to smb2_reply.c Signed-off-by: David Mulder <dmul...@suse.com> Reviewed-by: Jeremy Allison <j...@samba.org> commit a8985a8ad8381d9252b1dc534f20d25c9ed6ddc6 Author: David Mulder <dmul...@suse.com> Date: Thu Mar 17 11:18:26 2022 -0600 smbd: Move sendfile_short_send to smb2_reply.c Signed-off-by: David Mulder <dmul...@suse.com> Reviewed-by: Jeremy Allison <j...@samba.org> commit 01ee69a958bf671c324d0ccb59205cfc83cb0b4d Author: David Mulder <dmul...@suse.com> Date: Thu Mar 17 11:15:23 2022 -0600 smbd: Move fake_sendfile to smb2_reply.c Signed-off-by: David Mulder <dmul...@suse.com> Reviewed-by: Jeremy Allison <j...@samba.org> commit 56ac1efc700a4cd5a5326f845bd5dd9e0f560710 Author: David Mulder <dmul...@suse.com> Date: Thu Mar 17 11:10:51 2022 -0600 smbd: Move unlink_internals to smb2_reply.c Signed-off-by: David Mulder <dmul...@suse.com> Reviewed-by: Jeremy Allison <j...@samba.org> commit 95d9606827b5f7de10bc1b6ae1fea4b3601c4339 Author: David Mulder <dmul...@suse.com> Date: Thu Mar 17 11:04:28 2022 -0600 smbd: Move reply_special to smb2_reply.c Signed-off-by: David Mulder <dmul...@suse.com> Reviewed-by: Jeremy Allison <j...@samba.org> commit f0396b9af9e027428150e9bff1160b4b31d13ec7 Author: David Mulder <dmul...@suse.com> Date: Thu Mar 17 10:57:04 2022 -0600 smbd: Move check_fsp_ntquota_handle to smb2_reply.c Signed-off-by: David Mulder <dmul...@suse.com> Reviewed-by: Jeremy Allison <j...@samba.org> commit 347c7af9e9ffd5f6f0b5aa0329cdf19d5160b5d2 Author: David Mulder <dmul...@suse.com> Date: Thu Mar 17 10:53:35 2022 -0600 smbd: move check_fsp to smb2_reply.c Signed-off-by: David Mulder <dmul...@suse.com> Reviewed-by: Jeremy Allison <j...@samba.org> commit 0d21c676ae55c5d3303f4ab32611130546fa27f6 Author: David Mulder <dmul...@suse.com> Date: Thu Mar 17 10:51:59 2022 -0600 smbd: Move check_fsp_open to smb2_reply.c Signed-off-by: David Mulder <dmul...@suse.com> Reviewed-by: Jeremy Allison <j...@samba.org> commit a8e1f65cba40f6b15e103ce04002ade887bc3458 Author: David Mulder <dmul...@suse.com> Date: Thu Mar 17 10:45:00 2022 -0600 smbd: Move srvstr_pull_req_talloc to smb2_reply.c Signed-off-by: David Mulder <dmul...@suse.com> Reviewed-by: Jeremy Allison <j...@samba.org> commit 0e3a46fc0be02bdac08c5cbcca8dad98b39496b8 Author: David Mulder <dmul...@suse.com> Date: Tue Mar 15 16:32:34 2022 -0600 smbd: Move srvstr_get_path* to smb2_reply.c Signed-off-by: David Mulder <dmul...@suse.com> Reviewed-by: Jeremy Allison <j...@samba.org> commit 08fa5527cdac66adff92f51813aba38c6ea902ed Author: David Mulder <dmul...@suse.com> Date: Tue Mar 15 16:29:59 2022 -0600 smbd: Move check_path_syntax* to smb2_reply.c Signed-off-by: David Mulder <dmul...@suse.com> Reviewed-by: Jeremy Allison <j...@samba.org> commit 2069d235f72f78877c48a37d9c931cb121dd78ef Author: David Mulder <dmul...@suse.com> Date: Tue Mar 15 15:13:52 2022 -0600 smbd: Move pipes.c -> smb2_pipes.c Signed-off-by: David Mulder <dmul...@suse.com> Reviewed-by: Jeremy Allison <j...@samba.org> commit 0a68f9d47cbda7f4b2fe279a8f6c9b8c484ba3cc Author: David Mulder <dmul...@suse.com> Date: Tue Mar 15 15:00:05 2022 -0600 smbd: Move reply_pipe_read_and_X to smb1_pipes.c Signed-off-by: David Mulder <dmul...@suse.com> Reviewed-by: Jeremy Allison <j...@samba.org> commit 3d3713860f2a26bcefccfb51d7f8f0419f66eb7f Author: David Mulder <dmul...@suse.com> Date: Tue Mar 15 14:55:38 2022 -0600 smbd: Move reply_pipe_write_and_X to smb1_pipes.c Signed-off-by: David Mulder <dmul...@suse.com> Reviewed-by: Jeremy Allison <j...@samba.org> commit c350372110d99352888ea0a228cf9180e08cb94c Author: David Mulder <dmul...@suse.com> Date: Tue Mar 15 14:50:16 2022 -0600 smbd: Move reply_open_pipe_and_X to smb1_pipes.c Signed-off-by: David Mulder <dmul...@suse.com> Reviewed-by: Jeremy Allison <j...@samba.org> commit 4f0a8e5b211e1f66780fe6c574310a4f6c8df43d Author: David Mulder <dmul...@suse.com> Date: Tue Mar 15 14:53:18 2022 -0600 smbd: Move oplock.c -> smb2_oplock.c Signed-off-by: David Mulder <dmul...@suse.com> Reviewed-by: Jeremy Allison <j...@samba.org> commit 1e0b0402f8ab54efb17faeb0fc3afae15cf4f979 Author: David Mulder <dmul...@suse.com> Date: Tue Mar 15 14:38:03 2022 -0600 smbd: Disable smb1 oplock calls when smb1 is disabled Signed-off-by: David Mulder <dmul...@suse.com> Reviewed-by: Jeremy Allison <j...@samba.org> commit bed19efa1c4e201aded2bd168a108d0a5ce0fea6 Author: David Mulder <dmul...@suse.com> Date: Tue Mar 15 14:36:06 2022 -0600 smbd: Move send_break_message_smb1 to smb1_oplock.c Signed-off-by: David Mulder <dmul...@suse.com> Reviewed-by: Jeremy Allison <j...@samba.org> commit bb34663958eae11524f21d5f22a8ed651842c6c3 Author: David Mulder <dmul...@suse.com> Date: Tue Mar 15 14:32:08 2022 -0600 smbd: Move new_break_message_smb1 to smb1_oplock.c Signed-off-by: David Mulder <dmul...@suse.com> Reviewed-by: Jeremy Allison <j...@samba.org> commit feb6c593789478c00bfd2fa6580cc78b5fcd8975 Author: David Mulder <dmul...@suse.com> Date: Fri Mar 11 12:20:52 2022 -0700 smbd: Move nttrans.c -> smb1_nttrans.c nttrans.c now contians only smb1 code Signed-off-by: David Mulder <dmul...@suse.com> Reviewed-by: Jeremy Allison <j...@samba.org> commit a5292f0b1b58a72e5bb891a070218d4237efbfaa Author: David Mulder <dmul...@suse.com> Date: Fri Mar 11 12:16:49 2022 -0700 smbd: Move smbd_do_query_getinfo_quota to smb2_nttrans.c Signed-off-by: David Mulder <dmul...@suse.com> Reviewed-by: Jeremy Allison <j...@samba.org> commit 0ed7f06e99d9d2548a98a070114b2b6e93541709 Author: David Mulder <dmul...@suse.com> Date: Fri Mar 11 12:10:56 2022 -0700 smbd: Move smbd_do_query_security_desc to smb2_nttrans.c Signed-off-by: David Mulder <dmul...@suse.com> Reviewed-by: Jeremy Allison <j...@samba.org> commit 17e04761cbc570468536a4dae3e817f7c876dc94 Author: David Mulder <dmul...@suse.com> Date: Fri Mar 11 12:06:38 2022 -0700 smbd: Move copy_internals to smb2_nttrans.c Signed-off-by: David Mulder <dmul...@suse.com> Reviewed-by: Jeremy Allison <j...@samba.org> commit 7e88a86a157cbfcbe416d1c8737df15f71885abe Author: David Mulder <dmul...@suse.com> Date: Fri Mar 11 11:21:40 2022 -0700 smbd: Move set_sd_blob to smb2_nttrans.c Signed-off-by: David Mulder <dmul...@suse.com> Reviewed-by: Jeremy Allison <j...@samba.org> commit 2448874345f9a3a42c7343e7ff5c98d95e434f31 Author: David Mulder <dmul...@suse.com> Date: Fri Mar 11 11:16:18 2022 -0700 smbd: Move set_sd to smb2_nttrans.c Signed-off-by: David Mulder <dmul...@suse.com> Reviewed-by: Jeremy Allison <j...@samba.org> commit 1139ad7b8bcefc4bdca5850715ccd556cc07cb47 Author: David Mulder <dmul...@suse.com> Date: Fri Mar 11 10:20:48 2022 -0700 smbd: Move negprot.c -> smb1_negprot.c negprot.c only contains smb1 code. Signed-off-by: David Mulder <dmul...@suse.com> Reviewed-by: Jeremy Allison <j...@samba.org> commit dd633d561b167e2923037826d6fbdd20d40e1fb8 Author: David Mulder <dmul...@suse.com> Date: Fri Mar 11 10:43:16 2022 -0700 smbd: negprot_spnego allow disabling smb1 spnego set Signed-off-by: David Mulder <dmul...@suse.com> Reviewed-by: Jeremy Allison <j...@samba.org> commit 23615a27a584c29c09be94bd6e9a1d493de64533 Author: David Mulder <dmul...@suse.com> Date: Fri Mar 11 10:18:04 2022 -0700 smbd: Move negprot_spnego to smb2_negprot.c Signed-off-by: David Mulder <dmul...@suse.com> Reviewed-by: Jeremy Allison <j...@samba.org> commit d42a78f63a79fc4842de3bd74730739d3b804dca Author: David Mulder <dmul...@suse.com> Date: Fri Mar 11 09:57:57 2022 -0700 smbd: Move ipc.c -> smb1_ipc.c Signed-off-by: David Mulder <dmul...@suse.com> Reviewed-by: Jeremy Allison <j...@samba.org> commit 49f7763dc04c5299d2a7bfce439ec1ac047aa749 Author: David Mulder <dmul...@suse.com> Date: Fri Mar 11 09:53:04 2022 -0700 smbd: Move nt_status_np_pipe to smb2_ipc.c Signed-off-by: David Mulder <dmul...@suse.com> Reviewed-by: Jeremy Allison <j...@samba.org> commit 3b1c02e469fda5c893397a632af4ce47f53ac23f Author: David Mulder <dmul...@suse.com> Date: Fri Mar 11 09:47:04 2022 -0700 smbd: Move aio.c -> smb2_aio.c aio.c now contians only smb2 code Signed-off-by: David Mulder <dmul...@suse.com> Reviewed-by: Jeremy Allison <j...@samba.org> commit 6a17ce3295c43f010e53f407675fc04e9bff5ff6 Author: David Mulder <dmul...@suse.com> Date: Fri Mar 11 09:21:35 2022 -0700 smbd: Move schedule_aio_write_and_X to smb1_aio.c Signed-off-by: David Mulder <dmul...@suse.com> Reviewed-by: Jeremy Allison <j...@samba.org> commit c510bd332e47bb58759f166d79c3271ba4308c23 Author: David Mulder <dmul...@suse.com> Date: Fri Mar 11 09:17:59 2022 -0700 smbd: Move schedule_aio_read_and_X to smb1_aio.c Signed-off-by: David Mulder <dmul...@suse.com> Reviewed-by: Jeremy Allison <j...@samba.org> commit 35b184b5e375dae41bd84ae94c62c45fc44cbd9e Author: David Mulder <dmul...@suse.com> Date: Thu Mar 10 14:22:39 2022 -0700 smbd: Allow disabling SMB1 in struct smbXsrv_connection Signed-off-by: David Mulder <dmul...@suse.com> Reviewed-by: Jeremy Allison <j...@samba.org> commit 630d946df864bdf0d77740bea395ea6a5ab2ce3d Author: David Mulder <dmul...@suse.com> Date: Thu Mar 3 13:02:04 2022 -0700 smbd: Disable build for SMB1 only files Signed-off-by: David Mulder <dmul...@suse.com> Reviewed-by: Jeremy Allison <j...@samba.org> commit e00b09ce49f9b0ec9153e93dc13e4dd18ca5a19d Author: David Mulder <dmul...@suse.com> Date: Fri Mar 11 08:50:12 2022 -0700 smbd: Move lanman.c -> smb1_lanman.c lanman.c only contains smb1 code. Signed-off-by: David Mulder <dmul...@suse.com> Reviewed-by: Jeremy Allison <j...@samba.org> commit 92b6efe3abbf538cfa8ba318cc598d4362338f41 Author: David Mulder <dmul...@suse.com> Date: Fri Mar 11 08:46:46 2022 -0700 smbd: Move sesssetup.c -> smb1_sesssetup.c sesssetup.c only contains smb1 code. Signed-off-by: David Mulder <dmul...@suse.com> Reviewed-by: Jeremy Allison <j...@samba.org> commit 2266fd4cceeba44058c1275baf85686e4421d8ee Author: David Mulder <dmul...@suse.com> Date: Fri Mar 11 08:44:02 2022 -0700 smbd: Move message.c -> smb1_message.c message.c only contains smb1 code. Signed-off-by: David Mulder <dmul...@suse.com> Reviewed-by: Jeremy Allison <j...@samba.org> commit 77343f8f5ef54b14b241462eaaf7342f93af054d Author: David Mulder <dmul...@suse.com> Date: Wed Apr 6 12:35:15 2022 -0600 smbd: Add WITH_SMB1SERVER enabled for now This adds the definition WITH_SMB1SERVER, enabled by default for now meant for removing smb1 server code. This will be removed and replaced with a configure option later. Signed-off-by: David Mulder <dmul...@suse.com> Reviewed-by: Jeremy Allison <j...@samba.org> ----------------------------------------------------------------------- Summary of changes: .gitlab-ci-main.yml | 18 + WHATSNEW.txt | 31 + script/autobuild.py | 20 + source3/modules/perfcount_test.c | 2 + source3/smbd/error.c | 16 +- source3/smbd/globals.h | 17 + source3/smbd/open.c | 1 - source3/smbd/proto.h | 248 +- source3/smbd/smb1_aio.c | 406 + source3/smbd/smb1_aio.h | 29 + source3/smbd/{ipc.c => smb1_ipc.c} | 35 +- source3/smbd/smb1_ipc.h | 33 + source3/smbd/{lanman.c => smb1_lanman.c} | 0 source3/smbd/smb1_lanman.h | 28 + source3/smbd/{message.c => smb1_message.c} | 8 +- source3/smbd/smb1_message.h | 23 + source3/smbd/{negprot.c => smb1_negprot.c} | 103 +- source3/smbd/smb1_negprot.h | 21 + source3/smbd/{nttrans.c => smb1_nttrans.c} | 821 +- source3/smbd/smb1_nttrans.h | 25 + source3/smbd/smb1_oplock.c | 71 + source3/smbd/smb1_oplock.h | 26 + source3/smbd/{pipes.c => smb1_pipes.c} | 305 +- source3/smbd/smb1_pipes.h | 26 + source3/smbd/{process.c => smb1_process.c} | 1836 +--- source3/smbd/smb1_process.h | 67 + source3/smbd/{reply.c => smb1_reply.c} | 6155 +++++------- source3/smbd/smb1_reply.h | 80 + source3/smbd/smb1_service.c | 229 + source3/smbd/smb1_service.h | 24 + source3/smbd/{sesssetup.c => smb1_sesssetup.c} | 4 +- source3/smbd/smb1_sesssetup.h | 25 + source3/smbd/{signing.c => smb1_signing.c} | 28 +- source3/smbd/smb1_signing.h | 36 + source3/smbd/smb1_trans2.c | 3438 +++++++ source3/smbd/smb1_trans2.h | 40 + source3/smbd/smb1_utils.c | 1 - source3/smbd/{aio.c => smb2_aio.c} | 415 +- source3/smbd/smb2_create.c | 1 + source3/smbd/smb2_ipc.c | 40 + source3/smbd/smb2_negprot.c | 273 + source3/smbd/smb2_nttrans.c | 831 ++ source3/smbd/{oplock.c => smb2_oplock.c} | 50 +- source3/smbd/smb2_pipes.c | 151 + source3/smbd/smb2_process.c | 2024 ++++ source3/smbd/smb2_reply.c | 2111 +++++ source3/smbd/{service.c => smb2_service.c} | 206 +- source3/smbd/smb2_signing.c | 57 + source3/smbd/{trans2.c => smb2_trans2.c} | 11317 ++++++++--------------- source3/smbd/smbd.h | 17 + source3/torture/cmd_vfs.c | 2 + source3/torture/wscript_build | 8 +- source3/wscript_build | 48 +- wscript | 14 + 54 files changed, 16594 insertions(+), 15247 deletions(-) create mode 100644 source3/smbd/smb1_aio.c create mode 100644 source3/smbd/smb1_aio.h rename source3/smbd/{ipc.c => smb1_ipc.c} (96%) create mode 100644 source3/smbd/smb1_ipc.h rename source3/smbd/{lanman.c => smb1_lanman.c} (100%) create mode 100644 source3/smbd/smb1_lanman.h rename source3/smbd/{message.c => smb1_message.c} (98%) create mode 100644 source3/smbd/smb1_message.h rename source3/smbd/{negprot.c => smb1_negprot.c} (87%) create mode 100644 source3/smbd/smb1_negprot.h rename source3/smbd/{nttrans.c => smb1_nttrans.c} (76%) create mode 100644 source3/smbd/smb1_nttrans.h create mode 100644 source3/smbd/smb1_oplock.c create mode 100644 source3/smbd/smb1_oplock.h rename source3/smbd/{pipes.c => smb1_pipes.c} (78%) create mode 100644 source3/smbd/smb1_pipes.h rename source3/smbd/{process.c => smb1_process.c} (58%) create mode 100644 source3/smbd/smb1_process.h rename source3/smbd/{reply.c => smb1_reply.c} (74%) create mode 100644 source3/smbd/smb1_reply.h create mode 100644 source3/smbd/smb1_service.c create mode 100644 source3/smbd/smb1_service.h rename source3/smbd/{sesssetup.c => smb1_sesssetup.c} (99%) create mode 100644 source3/smbd/smb1_sesssetup.h rename source3/smbd/{signing.c => smb1_signing.c} (90%) create mode 100644 source3/smbd/smb1_signing.h create mode 100644 source3/smbd/smb1_trans2.c create mode 100644 source3/smbd/smb1_trans2.h rename source3/smbd/{aio.c => smb2_aio.c} (54%) create mode 100644 source3/smbd/smb2_ipc.c create mode 100644 source3/smbd/smb2_nttrans.c rename source3/smbd/{oplock.c => smb2_oplock.c} (96%) create mode 100644 source3/smbd/smb2_pipes.c create mode 100644 source3/smbd/smb2_process.c create mode 100644 source3/smbd/smb2_reply.c rename source3/smbd/{service.c => smb2_service.c} (83%) create mode 100644 source3/smbd/smb2_signing.c rename source3/smbd/{trans2.c => smb2_trans2.c} (66%) Changeset truncated at 500 lines: diff --git a/.gitlab-ci-main.yml b/.gitlab-ci-main.yml index fa73fbd05e5..3ac0e772576 100644 --- a/.gitlab-ci-main.yml +++ b/.gitlab-ci-main.yml @@ -288,6 +288,15 @@ samba-h5l-build: - job: samba-h5l-build artifacts: true +samba-without-smb1-build: + extends: .shared_template_build_only + +.needs_samba-without-smb1-build: + extends: .shared_template_test_only + needs: + - job: samba-without-smb1-build + artifacts: true + samba-nt4-build: extends: .shared_template_build_only @@ -417,6 +426,11 @@ samba-fips: - .needs_samba-h5l-build - .private_test_only +.needs_samba-without-smb1-build-private: + extends: + - .needs_samba-without-smb1-build + - .private_test_only + .needs_samba-nt4-build-private: extends: - .needs_samba-nt4-build @@ -430,6 +444,9 @@ samba-fips: samba-fileserver: extends: .needs_samba-h5l-build-private +samba-fileserver-without-smb1: + extends: .needs_samba-without-smb1-build-private + # This is a full build without the AD DC so we test the build with MIT # Kerberos from the default system (Ubuntu 18.04 at this stage). # Runtime behaviour checked via the ktest (static ccache and keytab) @@ -485,6 +502,7 @@ pages: - samba-ad-back1 - samba-ad-back2 - samba-fileserver + - samba-fileserver-without-smb1 - samba-ad-dc-1 - samba-nt4 - samba-schemaupgrade diff --git a/WHATSNEW.txt b/WHATSNEW.txt index 48f3fcfb090..a0cffa6d75b 100644 --- a/WHATSNEW.txt +++ b/WHATSNEW.txt @@ -16,6 +16,37 @@ UPGRADING NEW FEATURES/CHANGES ==================== +Configure without the SMB1 Server +--------------------------------- + +It is now possible to configure Samba without support for +the SMB1 protocol in smbd. This can be selected at configure +time with either of the options: + +--with-smb1-server +--without-smb1-server + +By default (without either of these options set) Samba +is configured to include SMB1 support (i.e. --with-smb1-server +is the default). When Samba is configured without SMB1 support, +none of the SMB1 code is included inside smbd except the minimal +stub code needed to allow a client to connect as SMB1 and immediately +negotiate the selected protocol into SMB2 (as a Windows server also +allows). + +None of the SMB1-only smb.conf parameters are removed when +configured without SMB1, but these parameters are ignored by +the smbd server. This allows deployment without having to change +an existing smb.conf file. + +This option allows sites, OEMs and integrators to configure Samba +to remove the old and insecure SMB1 protocol from their products. + +Note that the Samba client libraries still support SMB1 connections +even when Samba is configured as --without-smb1-server. This is +to ensure maximum compatibility with environments containing old +SMB1 servers. + Bronze bit and S4U support with MIT Kerberos 1.20 ------------------------------------------------- diff --git a/script/autobuild.py b/script/autobuild.py index b72b6f7125c..d309fa0e97c 100755 --- a/script/autobuild.py +++ b/script/autobuild.py @@ -270,6 +270,16 @@ tasks = { ], }, + "samba-without-smb1-build": { + "git-clone-required": True, + "sequence": [ + ("configure", "./configure.developer --without-smb1-server --without-ad-dc" + samba_configure_params), + ("make", "make -j"), + ("check-clean-tree", CLEAN_SOURCE_TREE_CMD), + ("chmod-R-a-w", "chmod -R a-w ."), + ], + }, + "samba-no-opath-build": { "git-clone-required": True, "sequence": [ @@ -451,6 +461,16 @@ tasks = { ], }, + "samba-fileserver-without-smb1": { + "dependency": "samba-without-smb1-build", + "sequence": [ + ("random-sleep", random_sleep(300, 900)), + ("test", make_test(include_envs=["fileserver"])), + ("lcov", LCOV_CMD), + ("check-clean-tree", CLEAN_SOURCE_TREE_CMD), + ], + }, + # This is a full build without the AD DC so we test the build with # MIT Kerberos from the current system. Runtime behaviour is # confirmed via the ktest (static ccache and keytab) environment diff --git a/source3/modules/perfcount_test.c b/source3/modules/perfcount_test.c index 1e006c34bad..ec95a716298 100644 --- a/source3/modules/perfcount_test.c +++ b/source3/modules/perfcount_test.c @@ -151,7 +151,9 @@ static const char *smb_subop_name(int op, int subop) static void perfcount_test_dump_counter(struct perfcount_test_counter *ptc, int lvl) { +#if defined(WITH_SMB1SERVER) DEBUG(lvl, ("OP: %s\n", smb_fn_name(ptc->op))); +#endif if (ptc->sub_op > 0) { DEBUG(lvl, ("SUBOP: %s\n", smb_subop_name(ptc->op, ptc->sub_op))); diff --git a/source3/smbd/error.c b/source3/smbd/error.c index 3f9ecaa2c5c..fdea1917c30 100644 --- a/source3/smbd/error.c +++ b/source3/smbd/error.c @@ -78,7 +78,11 @@ void error_packet_set(char *outbuf, uint8_t eclass, uint32_t ecode, NTSTATUS nts DEBUG(3,("NT error packet at %s(%d) cmd=%d (%s) %s\n", file, line, (int)CVAL(outbuf,smb_com), +#if defined(WITH_SMB1SERVER) smb_fn_name(CVAL(outbuf,smb_com)), +#else + "", +#endif nt_errstr(ntstatus))); } else { /* We're returning a DOS error only, @@ -99,7 +103,11 @@ void error_packet_set(char *outbuf, uint8_t eclass, uint32_t ecode, NTSTATUS nts DEBUG(3,("DOS error packet at %s(%d) cmd=%d (%s) eclass=%d ecode=%d\n", file, line, (int)CVAL(outbuf,smb_com), +#if defined(WITH_SMB1SERVER) smb_fn_name(CVAL(outbuf,smb_com)), +#else + "", +#endif eclass, ecode)); } @@ -107,7 +115,7 @@ void error_packet_set(char *outbuf, uint8_t eclass, uint32_t ecode, NTSTATUS nts size_t error_packet(char *outbuf, uint8_t eclass, uint32_t ecode, NTSTATUS ntstatus, int line, const char *file) { - size_t outsize = srv_set_message(outbuf,0,0,True); + size_t outsize = srv_smb1_set_message(outbuf,0,0,True); error_packet_set(outbuf, eclass, ecode, ntstatus, line, file); return outsize; } @@ -116,7 +124,7 @@ void reply_nt_error(struct smb_request *req, NTSTATUS ntstatus, int line, const char *file) { TALLOC_FREE(req->outbuf); - reply_outbuf(req, 0, 0); + reply_smb1_outbuf(req, 0, 0); error_packet_set((char *)req->outbuf, 0, 0, ntstatus, line, file); } @@ -128,7 +136,7 @@ void reply_force_dos_error(struct smb_request *req, uint8_t eclass, uint32_t eco int line, const char *file) { TALLOC_FREE(req->outbuf); - reply_outbuf(req, 0, 0); + reply_smb1_outbuf(req, 0, 0); error_packet_set((char *)req->outbuf, eclass, ecode, NT_STATUS_DOS(eclass, ecode), @@ -140,7 +148,7 @@ void reply_both_error(struct smb_request *req, uint8_t eclass, uint32_t ecode, NTSTATUS status, int line, const char *file) { TALLOC_FREE(req->outbuf); - reply_outbuf(req, 0, 0); + reply_smb1_outbuf(req, 0, 0); error_packet_set((char *)req->outbuf, eclass, ecode, status, line, file); } diff --git a/source3/smbd/globals.h b/source3/smbd/globals.h index a024305486c..efcf02f0d24 100644 --- a/source3/smbd/globals.h +++ b/source3/smbd/globals.h @@ -247,6 +247,7 @@ NTSTATUS reply_smb20ff(struct smb_request *req, uint16_t choice); NTSTATUS smbd_smb2_process_negprot(struct smbXsrv_connection *xconn, uint64_t expected_seq_low, const uint8_t *inpdu, size_t size); +NTSTATUS smb2_multi_protocol_reply_negprot(struct smb_request *req); DATA_BLOB smbd_smb2_generate_outbody(struct smbd_smb2_request *req, size_t size); @@ -385,6 +386,7 @@ struct smbXsrv_connection { struct smbd_smb2_send_queue *queue; } ack; +#if defined(WITH_SMB1SERVER) struct { struct { /* @@ -450,6 +452,7 @@ struct smbXsrv_connection { struct msg_state *msg_state; } smb1; +#endif struct { struct smbd_smb2_request_read_state { struct smbd_smb2_request *req; @@ -910,4 +913,18 @@ extern struct smbXsrv_client *global_smbXsrv_client; void smbd_init_globals(void); +/**************************************************************************** + The buffer we keep around whilst an aio request is in process. +*****************************************************************************/ + +struct aio_extra { + files_struct *fsp; + struct smb_request *smbreq; + DATA_BLOB outbuf; + struct lock_struct lock; + size_t nbyte; + off_t offset; + bool write_through; +}; + #endif /* _SOURCE3_SMBD_GLOBALS_H_ */ diff --git a/source3/smbd/open.c b/source3/smbd/open.c index c534ccd183a..8048063dd0a 100644 --- a/source3/smbd/open.c +++ b/source3/smbd/open.c @@ -21,7 +21,6 @@ */ #include "includes.h" -#include "smb1_utils.h" #include "system/filesys.h" #include "lib/util/server_id.h" #include "printing.h" diff --git a/source3/smbd/proto.h b/source3/smbd/proto.h index 88ab4ccf73c..9510f70529d 100644 --- a/source3/smbd/proto.h +++ b/source3/smbd/proto.h @@ -46,39 +46,19 @@ #ifndef _SMBD_PROTO_H_ #define _SMBD_PROTO_H_ -/* The following definitions come from smbd/signing.c */ - struct smbXsrv_client; struct smbXsrv_connection; struct dcesrv_context; -bool smb1_srv_check_sign_mac(struct smbXsrv_connection *conn, - const char *inbuf, uint32_t *seqnum, bool trusted_channel); -NTSTATUS smb1_srv_calculate_sign_mac(struct smbXsrv_connection *conn, - char *outbuf, uint32_t seqnum); -void smb1_srv_cancel_sign_response(struct smbXsrv_connection *conn); +/* The following definitions come from smbd/smb2_signing.c */ + +bool smb2_srv_init_signing(struct smbXsrv_connection *conn); bool srv_init_signing(struct smbXsrv_connection *conn); -void smb1_srv_set_signing_negotiated(struct smbXsrv_connection *conn, - bool allowed, bool mandatory); -bool smb1_srv_is_signing_active(struct smbXsrv_connection *conn); -bool smb1_srv_is_signing_negotiated(struct smbXsrv_connection *conn); -void smb1_srv_set_signing(struct smbXsrv_connection *conn, - const DATA_BLOB user_session_key, - const DATA_BLOB response); /* The following definitions come from smbd/aio.c */ struct aio_extra; bool aio_write_through_requested(struct aio_extra *aio_ex); -NTSTATUS schedule_aio_read_and_X(connection_struct *conn, - struct smb_request *req, - files_struct *fsp, off_t startpos, - size_t smb_maxcnt); -NTSTATUS schedule_aio_write_and_X(connection_struct *conn, - struct smb_request *req, - files_struct *fsp, const char *data, - off_t startpos, - size_t numtowrite); NTSTATUS schedule_smb2_aio_read(connection_struct *conn, struct smb_request *smbreq, files_struct *fsp, @@ -94,6 +74,16 @@ NTSTATUS schedule_aio_smb2_write(connection_struct *conn, bool write_through); bool cancel_smb2_aio(struct smb_request *smbreq); bool aio_add_req_to_fsp(files_struct *fsp, struct tevent_req *req); +struct aio_extra *create_aio_extra(TALLOC_CTX *mem_ctx, + files_struct *fsp, + size_t buflen); +struct tevent_req *pwrite_fsync_send(TALLOC_CTX *mem_ctx, + struct tevent_context *ev, + struct files_struct *fsp, + const void *data, + size_t n, off_t offset, + bool write_through); +ssize_t pwrite_fsync_recv(struct tevent_req *req, int *perr); /* The following definitions come from smbd/blocking.c */ @@ -475,24 +465,9 @@ NTSTATUS parent_pathref(TALLOC_CTX *mem_ctx, struct smb_filename **_parent, struct smb_filename **_atname); -/* The following definitions come from smbd/ipc.c */ +/* The following definitions come from smbd/smb2_ipc.c */ NTSTATUS nt_status_np_pipe(NTSTATUS status); -void send_trans_reply(connection_struct *conn, - struct smb_request *req, - char *rparam, int rparam_len, - char *rdata, int rdata_len, - bool buffer_too_large); -void reply_trans(struct smb_request *req); -void reply_transs(struct smb_request *req); - -/* The following definitions come from smbd/lanman.c */ - -void api_reply(connection_struct *conn, uint64_t vuid, - struct smb_request *req, - char *data, char *params, - int tdscnt, int tpscnt, - int mdrcnt, int mprcnt); /* The following definitions come from smbd/mangle.c */ @@ -523,13 +498,6 @@ const struct mangle_fns *mangle_hash_init(void); const struct mangle_fns *mangle_hash2_init(void); const struct mangle_fns *posix_mangle_init(void); -/* The following definitions come from smbd/message.c */ - -void reply_sends(struct smb_request *req); -void reply_sendstrt(struct smb_request *req); -void reply_sendtxt(struct smb_request *req); -void reply_sendend(struct smb_request *req); - /* The following definitions come from smbd/msdfs.c */ bool parse_msdfs_symlink(TALLOC_CTX *ctx, @@ -601,10 +569,6 @@ NTSTATUS create_conn_struct_tos_cwd(struct messaging_context *msg, const struct auth_session_info *session_info, struct conn_struct_tos **_c); -/* The following definitions come from smbd/negprot.c */ - -void reply_negprot(struct smb_request *req); - /* The following definitions come from smbd/notify.c */ bool change_notify_fsp_has_changes(struct files_struct *fsp); @@ -697,16 +661,18 @@ int vfs_set_ntquota(files_struct *fsp, enum SMB_QUOTA_TYPE qtype, struct dom_sid int vfs_get_user_ntquota_list(files_struct *fsp, SMB_NTQUOTA_LIST **qt_list); void *init_quota_handle(TALLOC_CTX *mem_ctx); -/* The following definitions come from smbd/nttrans.c */ +/* The following definitions come from smbd/smb2_nttrans.c */ -void reply_ntcreate_and_X(struct smb_request *req); NTSTATUS set_sd(files_struct *fsp, struct security_descriptor *psd, uint32_t security_info_sent); NTSTATUS set_sd_blob(files_struct *fsp, uint8_t *data, uint32_t sd_len, uint32_t security_info_sent); -struct ea_list *read_nttrans_ea_list(TALLOC_CTX *ctx, const char *pdata, size_t data_size); -void reply_ntcancel(struct smb_request *req); -void reply_ntrename(struct smb_request *req); +NTSTATUS copy_internals(TALLOC_CTX *ctx, + connection_struct *conn, + struct smb_request *req, + struct smb_filename *smb_fname_src, + struct smb_filename *smb_fname_dst, + uint32_t attrs); NTSTATUS smbd_do_query_security_desc(connection_struct *conn, TALLOC_CTX *mem_ctx, files_struct *fsp, @@ -714,12 +680,6 @@ NTSTATUS smbd_do_query_security_desc(connection_struct *conn, uint32_t max_data_count, uint8_t **ppmarshalled_sd, size_t *psd_size); -NTSTATUS copy_internals(TALLOC_CTX *ctx, - connection_struct *conn, - struct smb_request *req, - struct smb_filename *smb_fname_src, - struct smb_filename *smb_fname_dst, - uint32_t attrs); #ifdef HAVE_SYS_QUOTAS struct smb2_query_quota_info; @@ -734,8 +694,6 @@ NTSTATUS smbd_do_query_getinfo_quota(TALLOC_CTX *mem_ctx, uint8_t **p_data, uint32_t *p_data_size); #endif -void reply_nttrans(struct smb_request *req); -void reply_nttranss(struct smb_request *req); /* The following definitions come from smbd/open.c */ @@ -835,10 +793,6 @@ int register_homes_share(const char *username); NTSTATUS open_np_file(struct smb_request *smb_req, const char *name, struct files_struct **pfsp); -void reply_open_pipe_and_X(connection_struct *conn, struct smb_request *req); -void reply_pipe_write(struct smb_request *req); -void reply_pipe_write_and_X(struct smb_request *req); -void reply_pipe_read_and_X(struct smb_request *req); /* The following definitions come from smbd/posix_acls.c */ @@ -891,16 +845,32 @@ NTSTATUS make_default_filesystem_acl( const SMB_STRUCT_STAT *psbuf, struct security_descriptor **ppdesc); -/* The following definitions come from smbd/process.c */ - -bool srv_send_smb(struct smbXsrv_connection *xconn, char *buffer, - bool no_signing, uint32_t seqnum, - bool do_encrypt, - struct smb_perfcount_data *pcd); -size_t srv_set_message(char *buf, +/* The following definitions come from smbd/smb2_process.c */ + +bool smb2_srv_send(struct smbXsrv_connection *xconn, char *buffer, + bool no_signing, uint32_t seqnum, + bool do_encrypt, + struct smb_perfcount_data *pcd); +#if !defined(WITH_SMB1SERVER) +bool smb1_srv_send(struct smbXsrv_connection *xconn, char *buffer, + bool do_signing, uint32_t seqnum, + bool do_encrypt, + struct smb_perfcount_data *pcd); +#endif +size_t srv_smb1_set_message(char *buf, size_t num_words, size_t num_bytes, bool zero); +NTSTATUS read_packet_remainder(int fd, char *buffer, + unsigned int timeout, ssize_t len); +NTSTATUS receive_smb_talloc(TALLOC_CTX *mem_ctx, + struct smbXsrv_connection *xconn, + int sock, + char **buffer, unsigned int timeout, + size_t *p_unread, bool *p_encrypted, + size_t *p_len, + uint32_t *seqnum, + bool trusted_channel); void remove_deferred_open_message_smb(struct smbXsrv_connection *xconn, uint64_t mid); bool schedule_deferred_open_message_smb(struct smbXsrv_connection *xconn, @@ -913,38 +883,33 @@ bool push_deferred_open_message_smb(struct smb_request *req, struct timeval timeout, struct file_id id, struct deferred_open_record *open_rec); -NTSTATUS allow_new_trans(struct trans_state *list, uint64_t mid); -void reply_outbuf(struct smb_request *req, uint8_t num_words, uint32_t num_bytes); -void smb_request_done(struct smb_request *req); -const char *smb_fn_name(int type); -void add_to_common_flags2(uint32_t v); -void remove_from_common_flags2(uint32_t v); -void construct_reply_common_req(struct smb_request *req, char *outbuf); -bool smb1_is_chain(const uint8_t *buf); -bool smb1_walk_chain(const uint8_t *buf, - bool (*fn)(uint8_t cmd, - uint8_t wct, const uint16_t *vwv, - uint16_t num_bytes, const uint8_t *bytes, - void *private_data), - void *private_data); -unsigned smb1_chain_length(const uint8_t *buf); -bool smb1_parse_chain(TALLOC_CTX *mem_ctx, const uint8_t *buf, - struct smbXsrv_connection *xconn, -- Samba Shared Repository