samba.git
2 years agotorture: Disable vfs chain test dependant on SMB1
David Mulder [Thu, 10 Mar 2022 21:54:35 +0000 (14:54 -0700)]
torture: Disable vfs chain test dependant on SMB1

Signed-off-by: David Mulder <dmulder@suse.com>
Reviewed-by: Jeremy Allison <jra@samba.org>
2 years agosmbd: Move trans2.c -> smb2_trans2.c
David Mulder [Mon, 21 Mar 2022 19:26:09 +0000 (13:26 -0600)]
smbd: Move trans2.c -> smb2_trans2.c

Signed-off-by: David Mulder <dmulder@suse.com>
Reviewed-by: Jeremy Allison <jra@samba.org>
2 years agos3: smbd: Move reply_findnclose() from trans2.c to smb1_reply.c
Jeremy Allison [Tue, 5 Apr 2022 02:50:58 +0000 (19:50 -0700)]
s3: smbd: Move reply_findnclose() from trans2.c to smb1_reply.c

Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: David Mulder <dmulder@suse.com>
2 years agos3: smbd: Move reply_findclose() from trans2.c to smb1_reply.c
Jeremy Allison [Tue, 5 Apr 2022 02:48:25 +0000 (19:48 -0700)]
s3: smbd: Move reply_findclose() from trans2.c to smb1_reply.c

Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: David Mulder <dmulder@suse.com>
2 years agosmbd: Move reply_transs2 to smb1_trans2.c
David Mulder [Mon, 21 Mar 2022 19:15:19 +0000 (13:15 -0600)]
smbd: Move reply_transs2 to smb1_trans2.c

Signed-off-by: David Mulder <dmulder@suse.com>
Reviewed-by: Jeremy Allison <jra@samba.org>
2 years agosmbd: Move reply_trans2 to smb1_trans2.c
David Mulder [Mon, 21 Mar 2022 18:29:26 +0000 (12:29 -0600)]
smbd: Move reply_trans2 to smb1_trans2.c

Signed-off-by: David Mulder <dmulder@suse.com>
Reviewed-by: Jeremy Allison <jra@samba.org>
2 years agosmbd: Move smb_set_posix_lock to smb1_trans2.c
David Mulder [Mon, 21 Mar 2022 17:59:15 +0000 (11:59 -0600)]
smbd: Move smb_set_posix_lock to smb1_trans2.c

Signed-off-by: David Mulder <dmulder@suse.com>
Reviewed-by: Jeremy Allison <jra@samba.org>
2 years agosmbd: Move send_trans2_replies to smb1_trans2.c
David Mulder [Mon, 21 Mar 2022 17:51:41 +0000 (11:51 -0600)]
smbd: Move send_trans2_replies to smb1_trans2.c

Signed-off-by: David Mulder <dmulder@suse.com>
Reviewed-by: Jeremy Allison <jra@samba.org>
2 years agosmbd: Move smb1_utils.h include to smbd.h
David Mulder [Mon, 21 Mar 2022 15:56:04 +0000 (09:56 -0600)]
smbd: Move smb1_utils.h include to smbd.h

Signed-off-by: David Mulder <dmulder@suse.com>
Reviewed-by: Jeremy Allison <jra@samba.org>
2 years agosmbd: Move process.c -> smb1_process.c
David Mulder [Mon, 21 Mar 2022 14:30:48 +0000 (08:30 -0600)]
smbd: Move process.c -> smb1_process.c

Signed-off-by: David Mulder <dmulder@suse.com>
Reviewed-by: Jeremy Allison <jra@samba.org>
2 years agosmbd: Move smbd_process to smb2_process.c
David Mulder [Mon, 21 Mar 2022 14:05:15 +0000 (08:05 -0600)]
smbd: Move smbd_process to smb2_process.c

Signed-off-by: David Mulder <dmulder@suse.com>
Reviewed-by: Jeremy Allison <jra@samba.org>
2 years agosmbd: Disable smb1 in smbd_process
David Mulder [Fri, 18 Mar 2022 21:44:10 +0000 (15:44 -0600)]
smbd: Disable smb1 in smbd_process

Signed-off-by: David Mulder <dmulder@suse.com>
Reviewed-by: Jeremy Allison <jra@samba.org>
2 years agosmbd: Move smbd_add_connection to smb2_process.c
David Mulder [Fri, 18 Mar 2022 21:37:17 +0000 (15:37 -0600)]
smbd: Move smbd_add_connection to smb2_process.c

Signed-off-by: David Mulder <dmulder@suse.com>
Reviewed-by: Jeremy Allison <jra@samba.org>
2 years agosmbd: Disable smb1 in smbd_smb2_server_connection_read_handler
David Mulder [Fri, 18 Mar 2022 21:29:56 +0000 (15:29 -0600)]
smbd: Disable smb1 in smbd_smb2_server_connection_read_handler

Signed-off-by: David Mulder <dmulder@suse.com>
Reviewed-by: Jeremy Allison <jra@samba.org>
2 years agosmbd: Disable smb1 in smbd_server_connection_handler
David Mulder [Fri, 18 Mar 2022 21:26:27 +0000 (15:26 -0600)]
smbd: Disable smb1 in smbd_server_connection_handler

Signed-off-by: David Mulder <dmulder@suse.com>
Reviewed-by: Jeremy Allison <jra@samba.org>
2 years agosmbd: Disable smb1 in smbd_add_connection
David Mulder [Fri, 18 Mar 2022 21:17:39 +0000 (15:17 -0600)]
smbd: Disable smb1 in smbd_add_connection

Signed-off-by: David Mulder <dmulder@suse.com>
Reviewed-by: Jeremy Allison <jra@samba.org>
2 years agosmbd: Move smbXsrv_connection_dbg to smb2_process.c
David Mulder [Fri, 18 Mar 2022 21:13:25 +0000 (15:13 -0600)]
smbd: Move smbXsrv_connection_dbg to smb2_process.c

Signed-off-by: David Mulder <dmulder@suse.com>
Reviewed-by: Jeremy Allison <jra@samba.org>
2 years agosmbd: Move smbXsrv_connection_init_tables to smb2_process.c
David Mulder [Fri, 18 Mar 2022 21:10:01 +0000 (15:10 -0600)]
smbd: Move smbXsrv_connection_init_tables to smb2_process.c

Signed-off-by: David Mulder <dmulder@suse.com>
Reviewed-by: Jeremy Allison <jra@samba.org>
2 years agosmbd: Disable smb1 in smbXsrv_connection_init_tables
David Mulder [Fri, 18 Mar 2022 21:05:27 +0000 (15:05 -0600)]
smbd: Disable smb1 in smbXsrv_connection_init_tables

Signed-off-by: David Mulder <dmulder@suse.com>
Reviewed-by: Jeremy Allison <jra@samba.org>
2 years agosmbd: Move process_smb to smb2_process.c
David Mulder [Fri, 18 Mar 2022 20:53:19 +0000 (14:53 -0600)]
smbd: Move process_smb to smb2_process.c

Signed-off-by: David Mulder <dmulder@suse.com>
Reviewed-by: Jeremy Allison <jra@samba.org>
2 years agosmbd: Move reply_outbuf and construct_reply_common_req to smb2_process.c
David Mulder [Fri, 18 Mar 2022 20:45:09 +0000 (14:45 -0600)]
smbd: Move reply_outbuf and construct_reply_common_req to smb2_process.c

Signed-off-by: David Mulder <dmulder@suse.com>
Reviewed-by: Jeremy Allison <jra@samba.org>
2 years agosmbd: Move push_deferred_open_message_smb to smb2_process.c
David Mulder [Fri, 18 Mar 2022 20:28:08 +0000 (14:28 -0600)]
smbd: Move push_deferred_open_message_smb to smb2_process.c

Signed-off-by: David Mulder <dmulder@suse.com>
Reviewed-by: Jeremy Allison <jra@samba.org>
2 years agosmbd: Separate smb1 code from push_deferred_open_message_smb
David Mulder [Fri, 18 Mar 2022 20:22:27 +0000 (14:22 -0600)]
smbd: Separate smb1 code from push_deferred_open_message_smb

Signed-off-by: David Mulder <dmulder@suse.com>
Reviewed-by: Jeremy Allison <jra@samba.org>
2 years agosmbd: Move get_deferred_open_message_state to smb2_process.c
David Mulder [Fri, 18 Mar 2022 20:15:30 +0000 (14:15 -0600)]
smbd: Move get_deferred_open_message_state to smb2_process.c

Signed-off-by: David Mulder <dmulder@suse.com>
Reviewed-by: Jeremy Allison <jra@samba.org>
2 years agosmbd: Move open_was_deferred to smb2_process.c
David Mulder [Fri, 18 Mar 2022 20:08:12 +0000 (14:08 -0600)]
smbd: Move open_was_deferred to smb2_process.c

Signed-off-by: David Mulder <dmulder@suse.com>
Reviewed-by: Jeremy Allison <jra@samba.org>
2 years agosmbd: Move schedule_deferred_open_message_smb to smb2_process.c
David Mulder [Fri, 18 Mar 2022 19:35:41 +0000 (13:35 -0600)]
smbd: Move schedule_deferred_open_message_smb to smb2_process.c

Signed-off-by: David Mulder <dmulder@suse.com>
Reviewed-by: Jeremy Allison <jra@samba.org>
2 years agosmbd: Move remove_deferred_open_message_smb to smb2_process.c
David Mulder [Fri, 18 Mar 2022 18:28:19 +0000 (12:28 -0600)]
smbd: Move remove_deferred_open_message_smb to smb2_process.c

Signed-off-by: David Mulder <dmulder@suse.com>
Reviewed-by: Jeremy Allison <jra@samba.org>
2 years agosmbd: Move receive_smb_talloc/smb2_receive_talloc to smb2_process.c
David Mulder [Fri, 18 Mar 2022 15:41:02 +0000 (09:41 -0600)]
smbd: Move receive_smb_talloc/smb2_receive_talloc to smb2_process.c

Signed-off-by: David Mulder <dmulder@suse.com>
Reviewed-by: Jeremy Allison <jra@samba.org>
2 years agosmbd: Split receive_smb_talloc into smb1_receive_talloc/smb2_receive_talloc
David Mulder [Fri, 18 Mar 2022 15:22:21 +0000 (09:22 -0600)]
smbd: Split receive_smb_talloc into smb1_receive_talloc/smb2_receive_talloc

Signed-off-by: David Mulder <dmulder@suse.com>
Reviewed-by: Jeremy Allison <jra@samba.org>
2 years agosmbd: Move read_packet_remainder to smb2_process.c
David Mulder [Thu, 17 Mar 2022 21:29:18 +0000 (15:29 -0600)]
smbd: Move read_packet_remainder to smb2_process.c

Signed-off-by: David Mulder <dmulder@suse.com>
Reviewed-by: Jeremy Allison <jra@samba.org>
2 years agosmbd: Move srv_set_message to smb2_process.c
David Mulder [Thu, 17 Mar 2022 21:23:33 +0000 (15:23 -0600)]
smbd: Move srv_set_message to smb2_process.c

Signed-off-by: David Mulder <dmulder@suse.com>
Reviewed-by: Jeremy Allison <jra@samba.org>
2 years agosmbd: Move srv_send_smb/smb2_srv_send to smb2_process.c
David Mulder [Fri, 18 Mar 2022 14:22:31 +0000 (08:22 -0600)]
smbd: Move srv_send_smb/smb2_srv_send to smb2_process.c

Signed-off-by: David Mulder <dmulder@suse.com>
Reviewed-by: Jeremy Allison <jra@samba.org>
2 years agosmbd: Split srv_send_smb into smb1_srv_send/smb2_srv_send
David Mulder [Fri, 18 Mar 2022 14:13:43 +0000 (08:13 -0600)]
smbd: Split srv_send_smb into smb1_srv_send/smb2_srv_send

Signed-off-by: David Mulder <dmulder@suse.com>
Reviewed-by: Jeremy Allison <jra@samba.org>
2 years agosmbd: Split process_smb() into process_smb1() and process_smb2()
David Mulder [Thu, 10 Mar 2022 20:09:06 +0000 (13:09 -0700)]
smbd: Split process_smb() into process_smb1() and process_smb2()

Signed-off-by: David Mulder <dmulder@suse.com>
Reviewed-by: Jeremy Allison <jra@samba.org>
2 years agosmbd: Move signing.c -> smb1_signing.c
David Mulder [Thu, 17 Mar 2022 20:54:01 +0000 (14:54 -0600)]
smbd: Move signing.c -> smb1_signing.c

Signed-off-by: David Mulder <dmulder@suse.com>
Reviewed-by: Jeremy Allison <jra@samba.org>
2 years agosmbd: Disable call to smb1_srv_init_signing without smb1
David Mulder [Thu, 17 Mar 2022 20:29:41 +0000 (14:29 -0600)]
smbd: Disable call to smb1_srv_init_signing without smb1

Signed-off-by: David Mulder <dmulder@suse.com>
Reviewed-by: Jeremy Allison <jra@samba.org>
2 years agosmbd: Move srv_init_signing to smb2_signing.c
David Mulder [Thu, 17 Mar 2022 20:28:10 +0000 (14:28 -0600)]
smbd: Move srv_init_signing to smb2_signing.c

Signed-off-by: David Mulder <dmulder@suse.com>
Reviewed-by: Jeremy Allison <jra@samba.org>
2 years agosmbd: Move smb2_srv_init_signing to smb2_signing.c
David Mulder [Thu, 17 Mar 2022 19:55:25 +0000 (13:55 -0600)]
smbd: Move smb2_srv_init_signing to smb2_signing.c

Signed-off-by: David Mulder <dmulder@suse.com>
Reviewed-by: Jeremy Allison <jra@samba.org>
2 years agosmbd: Move service.c -> smb2_service.c
David Mulder [Thu, 17 Mar 2022 19:35:44 +0000 (13:35 -0600)]
smbd: Move service.c -> smb2_service.c

Signed-off-by: David Mulder <dmulder@suse.com>
Reviewed-by: Jeremy Allison <jra@samba.org>
2 years agosmbd: Move make_connection to smb1_service.c
David Mulder [Thu, 17 Mar 2022 19:32:30 +0000 (13:32 -0600)]
smbd: Move make_connection to smb1_service.c

Signed-off-by: David Mulder <dmulder@suse.com>
Reviewed-by: Jeremy Allison <jra@samba.org>
2 years agosmbd: Disable call to smb1_srv_is_signing_active without smb1
David Mulder [Thu, 17 Mar 2022 19:21:32 +0000 (13:21 -0600)]
smbd: Disable call to smb1_srv_is_signing_active without smb1

Signed-off-by: David Mulder <dmulder@suse.com>
Reviewed-by: Jeremy Allison <jra@samba.org>
2 years agosmbd: Move reply.c -> smb1_reply.c
David Mulder [Thu, 17 Mar 2022 18:59:22 +0000 (12:59 -0600)]
smbd: Move reply.c -> smb1_reply.c

Signed-off-by: David Mulder <dmulder@suse.com>
Reviewed-by: Jeremy Allison <jra@samba.org>
2 years agosmbd: Move smbd_do_unlocking to smb2_reply.c
David Mulder [Thu, 17 Mar 2022 18:29:42 +0000 (12:29 -0600)]
smbd: Move smbd_do_unlocking to smb2_reply.c

Signed-off-by: David Mulder <dmulder@suse.com>
Reviewed-by: Jeremy Allison <jra@samba.org>
2 years agosmbd: Move get_lock_offset to smb2_reply.c
David Mulder [Thu, 17 Mar 2022 18:20:30 +0000 (12:20 -0600)]
smbd: Move get_lock_offset to smb2_reply.c

Signed-off-by: David Mulder <dmulder@suse.com>
Reviewed-by: Jeremy Allison <jra@samba.org>
2 years agosmbd: Move copy_file to smb2_reply.c
David Mulder [Thu, 17 Mar 2022 17:34:46 +0000 (11:34 -0600)]
smbd: Move copy_file to smb2_reply.c

Signed-off-by: David Mulder <dmulder@suse.com>
Reviewed-by: Jeremy Allison <jra@samba.org>
2 years agosmbd: Move rename_internals to smb2_reply.c
David Mulder [Thu, 17 Mar 2022 17:30:25 +0000 (11:30 -0600)]
smbd: Move rename_internals to smb2_reply.c

Signed-off-by: David Mulder <dmulder@suse.com>
Reviewed-by: Jeremy Allison <jra@samba.org>
2 years agosmbd: Move rename_internals_fsp to smb2_reply.c
David Mulder [Thu, 17 Mar 2022 17:25:05 +0000 (11:25 -0600)]
smbd: Move rename_internals_fsp to smb2_reply.c

Signed-off-by: David Mulder <dmulder@suse.com>
Reviewed-by: Jeremy Allison <jra@samba.org>
2 years agosmbd: Move sendfile_short_send to smb2_reply.c
David Mulder [Thu, 17 Mar 2022 17:18:26 +0000 (11:18 -0600)]
smbd: Move sendfile_short_send to smb2_reply.c

Signed-off-by: David Mulder <dmulder@suse.com>
Reviewed-by: Jeremy Allison <jra@samba.org>
2 years agosmbd: Move fake_sendfile to smb2_reply.c
David Mulder [Thu, 17 Mar 2022 17:15:23 +0000 (11:15 -0600)]
smbd: Move fake_sendfile to smb2_reply.c

Signed-off-by: David Mulder <dmulder@suse.com>
Reviewed-by: Jeremy Allison <jra@samba.org>
2 years agosmbd: Move unlink_internals to smb2_reply.c
David Mulder [Thu, 17 Mar 2022 17:10:51 +0000 (11:10 -0600)]
smbd: Move unlink_internals to smb2_reply.c

Signed-off-by: David Mulder <dmulder@suse.com>
Reviewed-by: Jeremy Allison <jra@samba.org>
2 years agosmbd: Move reply_special to smb2_reply.c
David Mulder [Thu, 17 Mar 2022 17:04:28 +0000 (11:04 -0600)]
smbd: Move reply_special to smb2_reply.c

Signed-off-by: David Mulder <dmulder@suse.com>
Reviewed-by: Jeremy Allison <jra@samba.org>
2 years agosmbd: Move check_fsp_ntquota_handle to smb2_reply.c
David Mulder [Thu, 17 Mar 2022 16:57:04 +0000 (10:57 -0600)]
smbd: Move check_fsp_ntquota_handle to smb2_reply.c

Signed-off-by: David Mulder <dmulder@suse.com>
Reviewed-by: Jeremy Allison <jra@samba.org>
2 years agosmbd: move check_fsp to smb2_reply.c
David Mulder [Thu, 17 Mar 2022 16:53:35 +0000 (10:53 -0600)]
smbd: move check_fsp to smb2_reply.c

Signed-off-by: David Mulder <dmulder@suse.com>
Reviewed-by: Jeremy Allison <jra@samba.org>
2 years agosmbd: Move check_fsp_open to smb2_reply.c
David Mulder [Thu, 17 Mar 2022 16:51:59 +0000 (10:51 -0600)]
smbd: Move check_fsp_open to smb2_reply.c

Signed-off-by: David Mulder <dmulder@suse.com>
Reviewed-by: Jeremy Allison <jra@samba.org>
2 years agosmbd: Move srvstr_pull_req_talloc to smb2_reply.c
David Mulder [Thu, 17 Mar 2022 16:45:00 +0000 (10:45 -0600)]
smbd: Move srvstr_pull_req_talloc to smb2_reply.c

Signed-off-by: David Mulder <dmulder@suse.com>
Reviewed-by: Jeremy Allison <jra@samba.org>
2 years agosmbd: Move srvstr_get_path* to smb2_reply.c
David Mulder [Tue, 15 Mar 2022 22:32:34 +0000 (16:32 -0600)]
smbd: Move srvstr_get_path* to smb2_reply.c

Signed-off-by: David Mulder <dmulder@suse.com>
Reviewed-by: Jeremy Allison <jra@samba.org>
2 years agosmbd: Move check_path_syntax* to smb2_reply.c
David Mulder [Tue, 15 Mar 2022 22:29:59 +0000 (16:29 -0600)]
smbd: Move check_path_syntax* to smb2_reply.c

Signed-off-by: David Mulder <dmulder@suse.com>
Reviewed-by: Jeremy Allison <jra@samba.org>
2 years agosmbd: Move pipes.c -> smb2_pipes.c
David Mulder [Tue, 15 Mar 2022 21:13:52 +0000 (15:13 -0600)]
smbd: Move pipes.c -> smb2_pipes.c

Signed-off-by: David Mulder <dmulder@suse.com>
Reviewed-by: Jeremy Allison <jra@samba.org>
2 years agosmbd: Move reply_pipe_read_and_X to smb1_pipes.c
David Mulder [Tue, 15 Mar 2022 21:00:05 +0000 (15:00 -0600)]
smbd: Move reply_pipe_read_and_X to smb1_pipes.c

Signed-off-by: David Mulder <dmulder@suse.com>
Reviewed-by: Jeremy Allison <jra@samba.org>
2 years agosmbd: Move reply_pipe_write_and_X to smb1_pipes.c
David Mulder [Tue, 15 Mar 2022 20:55:38 +0000 (14:55 -0600)]
smbd: Move reply_pipe_write_and_X to smb1_pipes.c

Signed-off-by: David Mulder <dmulder@suse.com>
Reviewed-by: Jeremy Allison <jra@samba.org>
2 years agosmbd: Move reply_open_pipe_and_X to smb1_pipes.c
David Mulder [Tue, 15 Mar 2022 20:50:16 +0000 (14:50 -0600)]
smbd: Move reply_open_pipe_and_X to smb1_pipes.c

Signed-off-by: David Mulder <dmulder@suse.com>
Reviewed-by: Jeremy Allison <jra@samba.org>
2 years agosmbd: Move oplock.c -> smb2_oplock.c
David Mulder [Tue, 15 Mar 2022 20:53:18 +0000 (14:53 -0600)]
smbd: Move oplock.c -> smb2_oplock.c

Signed-off-by: David Mulder <dmulder@suse.com>
Reviewed-by: Jeremy Allison <jra@samba.org>
2 years agosmbd: Disable smb1 oplock calls when smb1 is disabled
David Mulder [Tue, 15 Mar 2022 20:38:03 +0000 (14:38 -0600)]
smbd: Disable smb1 oplock calls when smb1 is disabled

Signed-off-by: David Mulder <dmulder@suse.com>
Reviewed-by: Jeremy Allison <jra@samba.org>
2 years agosmbd: Move send_break_message_smb1 to smb1_oplock.c
David Mulder [Tue, 15 Mar 2022 20:36:06 +0000 (14:36 -0600)]
smbd: Move send_break_message_smb1 to smb1_oplock.c

Signed-off-by: David Mulder <dmulder@suse.com>
Reviewed-by: Jeremy Allison <jra@samba.org>
2 years agosmbd: Move new_break_message_smb1 to smb1_oplock.c
David Mulder [Tue, 15 Mar 2022 20:32:08 +0000 (14:32 -0600)]
smbd: Move new_break_message_smb1 to smb1_oplock.c

Signed-off-by: David Mulder <dmulder@suse.com>
Reviewed-by: Jeremy Allison <jra@samba.org>
2 years agosmbd: Move nttrans.c -> smb1_nttrans.c
David Mulder [Fri, 11 Mar 2022 19:20:52 +0000 (12:20 -0700)]
smbd: Move nttrans.c -> smb1_nttrans.c

nttrans.c now contians only smb1 code

Signed-off-by: David Mulder <dmulder@suse.com>
Reviewed-by: Jeremy Allison <jra@samba.org>
2 years agosmbd: Move smbd_do_query_getinfo_quota to smb2_nttrans.c
David Mulder [Fri, 11 Mar 2022 19:16:49 +0000 (12:16 -0700)]
smbd: Move smbd_do_query_getinfo_quota to smb2_nttrans.c

Signed-off-by: David Mulder <dmulder@suse.com>
Reviewed-by: Jeremy Allison <jra@samba.org>
2 years agosmbd: Move smbd_do_query_security_desc to smb2_nttrans.c
David Mulder [Fri, 11 Mar 2022 19:10:56 +0000 (12:10 -0700)]
smbd: Move smbd_do_query_security_desc to smb2_nttrans.c

Signed-off-by: David Mulder <dmulder@suse.com>
Reviewed-by: Jeremy Allison <jra@samba.org>
2 years agosmbd: Move copy_internals to smb2_nttrans.c
David Mulder [Fri, 11 Mar 2022 19:06:38 +0000 (12:06 -0700)]
smbd: Move copy_internals to smb2_nttrans.c

Signed-off-by: David Mulder <dmulder@suse.com>
Reviewed-by: Jeremy Allison <jra@samba.org>
2 years agosmbd: Move set_sd_blob to smb2_nttrans.c
David Mulder [Fri, 11 Mar 2022 18:21:40 +0000 (11:21 -0700)]
smbd: Move set_sd_blob to smb2_nttrans.c

Signed-off-by: David Mulder <dmulder@suse.com>
Reviewed-by: Jeremy Allison <jra@samba.org>
2 years agosmbd: Move set_sd to smb2_nttrans.c
David Mulder [Fri, 11 Mar 2022 18:16:18 +0000 (11:16 -0700)]
smbd: Move set_sd to smb2_nttrans.c

Signed-off-by: David Mulder <dmulder@suse.com>
Reviewed-by: Jeremy Allison <jra@samba.org>
2 years agosmbd: Move negprot.c -> smb1_negprot.c
David Mulder [Fri, 11 Mar 2022 17:20:48 +0000 (10:20 -0700)]
smbd: Move negprot.c -> smb1_negprot.c

negprot.c only contains smb1 code.

Signed-off-by: David Mulder <dmulder@suse.com>
Reviewed-by: Jeremy Allison <jra@samba.org>
2 years agosmbd: negprot_spnego allow disabling smb1 spnego set
David Mulder [Fri, 11 Mar 2022 17:43:16 +0000 (10:43 -0700)]
smbd: negprot_spnego allow disabling smb1 spnego set

Signed-off-by: David Mulder <dmulder@suse.com>
Reviewed-by: Jeremy Allison <jra@samba.org>
2 years agosmbd: Move negprot_spnego to smb2_negprot.c
David Mulder [Fri, 11 Mar 2022 17:18:04 +0000 (10:18 -0700)]
smbd: Move negprot_spnego to smb2_negprot.c

Signed-off-by: David Mulder <dmulder@suse.com>
Reviewed-by: Jeremy Allison <jra@samba.org>
2 years agosmbd: Move ipc.c -> smb1_ipc.c
David Mulder [Fri, 11 Mar 2022 16:57:57 +0000 (09:57 -0700)]
smbd: Move ipc.c -> smb1_ipc.c

Signed-off-by: David Mulder <dmulder@suse.com>
Reviewed-by: Jeremy Allison <jra@samba.org>
2 years agosmbd: Move nt_status_np_pipe to smb2_ipc.c
David Mulder [Fri, 11 Mar 2022 16:53:04 +0000 (09:53 -0700)]
smbd: Move nt_status_np_pipe to smb2_ipc.c

Signed-off-by: David Mulder <dmulder@suse.com>
Reviewed-by: Jeremy Allison <jra@samba.org>
2 years agosmbd: Move aio.c -> smb2_aio.c
David Mulder [Fri, 11 Mar 2022 16:47:04 +0000 (09:47 -0700)]
smbd: Move aio.c -> smb2_aio.c

aio.c now contians only smb2 code

Signed-off-by: David Mulder <dmulder@suse.com>
Reviewed-by: Jeremy Allison <jra@samba.org>
2 years agosmbd: Move schedule_aio_write_and_X to smb1_aio.c
David Mulder [Fri, 11 Mar 2022 16:21:35 +0000 (09:21 -0700)]
smbd: Move schedule_aio_write_and_X to smb1_aio.c

Signed-off-by: David Mulder <dmulder@suse.com>
Reviewed-by: Jeremy Allison <jra@samba.org>
2 years agosmbd: Move schedule_aio_read_and_X to smb1_aio.c
David Mulder [Fri, 11 Mar 2022 16:17:59 +0000 (09:17 -0700)]
smbd: Move schedule_aio_read_and_X to smb1_aio.c

Signed-off-by: David Mulder <dmulder@suse.com>
Reviewed-by: Jeremy Allison <jra@samba.org>
2 years agosmbd: Allow disabling SMB1 in struct smbXsrv_connection
David Mulder [Thu, 10 Mar 2022 21:22:39 +0000 (14:22 -0700)]
smbd: Allow disabling SMB1 in struct smbXsrv_connection

Signed-off-by: David Mulder <dmulder@suse.com>
Reviewed-by: Jeremy Allison <jra@samba.org>
2 years agosmbd: Disable build for SMB1 only files
David Mulder [Thu, 3 Mar 2022 20:02:04 +0000 (13:02 -0700)]
smbd: Disable build for SMB1 only files

Signed-off-by: David Mulder <dmulder@suse.com>
Reviewed-by: Jeremy Allison <jra@samba.org>
2 years agosmbd: Move lanman.c -> smb1_lanman.c
David Mulder [Fri, 11 Mar 2022 15:50:12 +0000 (08:50 -0700)]
smbd: Move lanman.c -> smb1_lanman.c

lanman.c only contains smb1 code.

Signed-off-by: David Mulder <dmulder@suse.com>
Reviewed-by: Jeremy Allison <jra@samba.org>
2 years agosmbd: Move sesssetup.c -> smb1_sesssetup.c
David Mulder [Fri, 11 Mar 2022 15:46:46 +0000 (08:46 -0700)]
smbd: Move sesssetup.c -> smb1_sesssetup.c

sesssetup.c only contains smb1 code.

Signed-off-by: David Mulder <dmulder@suse.com>
Reviewed-by: Jeremy Allison <jra@samba.org>
2 years agosmbd: Move message.c -> smb1_message.c
David Mulder [Fri, 11 Mar 2022 15:44:02 +0000 (08:44 -0700)]
smbd: Move message.c -> smb1_message.c

message.c only contains smb1 code.

Signed-off-by: David Mulder <dmulder@suse.com>
Reviewed-by: Jeremy Allison <jra@samba.org>
2 years agosmbd: Add WITH_SMB1SERVER enabled for now
David Mulder [Wed, 6 Apr 2022 18:35:15 +0000 (12:35 -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 <dmulder@suse.com>
Reviewed-by: Jeremy Allison <jra@samba.org>
2 years agosmbd: Use dirfsp and atname passed to open_file()
Volker Lendecke [Thu, 7 Apr 2022 09:31:33 +0000 (11:31 +0200)]
smbd: Use dirfsp and atname passed to open_file()

Give non_widelink_open() to use the cheaper path without the full
chdir() logic when called via open_file_ntcreate()/open_file().

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
Autobuild-User(master): Jeremy Allison <jra@samba.org>
Autobuild-Date(master): Thu Apr  7 17:30:29 UTC 2022 on sn-devel-184

2 years agosmbd: Align open_file() argument order with reopen_from_fsp()
Volker Lendecke [Thu, 7 Apr 2022 09:26:59 +0000 (11:26 +0200)]
smbd: Align open_file() argument order with reopen_from_fsp()

dirfsp first, then dirfsp-relative atname, then fsp. smb_fname_atname
will be used soon.

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
2 years agomodules: Use conn->cwd_fsp in fruit_open_rsrc_adouble()
Volker Lendecke [Wed, 23 Feb 2022 09:30:06 +0000 (09:30 +0000)]
modules: Use conn->cwd_fsp in fruit_open_rsrc_adouble()

None of the adouble infrastructure is really prepared for a dirfsp
that is not conn->cwd_fsp, there are quite a few direct references to
it in adouble.c. This needs conversion, but at this point we need to
make fruit_openat() robust against a non-cwd_fsp dirfsp argument.

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
2 years agos3:auth: Fix user_in_list() for UNIX groups
Pavel Filipenský [Fri, 25 Mar 2022 10:11:50 +0000 (11:11 +0100)]
s3:auth: Fix user_in_list() for UNIX groups

BUG: https://bugzilla.samba.org/show_bug.cgi?id=15041

Signed-off-by: Pavel Filipenský <pfilipen@redhat.com>
Reviewed-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Noel Power <npower@samba.org>
Autobuild-User(master): Noel Power <npower@samba.org>
Autobuild-Date(master): Thu Apr  7 09:49:44 UTC 2022 on sn-devel-184

2 years agos3:tests Test "username map" for UNIX groups
Pavel Filipenský [Tue, 5 Apr 2022 12:04:52 +0000 (14:04 +0200)]
s3:tests Test "username map" for UNIX groups

BUG: https://bugzilla.samba.org/show_bug.cgi?id=15041

Signed-off-by: Pavel Filipenský <pfilipen@redhat.com>
Reviewed-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Noel Power <npower@samba.org>
2 years agoselftest: Add to "username.map" mapping for jackthemappergroup
Pavel Filipenský [Tue, 5 Apr 2022 06:31:41 +0000 (08:31 +0200)]
selftest: Add to "username.map" mapping for jackthemappergroup

BUG: https://bugzilla.samba.org/show_bug.cgi?id=15041

Only for environment ad_member_idmap_nss.

* !jacknompapper = \@jackthemappergroup
  jackthemaper from group jackthemappergroup is mapped to jacknompapper

* !root = jacknomappergroup
  since there is no '@' or '+' prefix, it is not an UNIX group mapping

Signed-off-by: Pavel Filipenský <pfilipen@redhat.com>
Reviewed-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Noel Power <npower@samba.org>
2 years agoselftest: Create groups "jackthemappergroup" and "jacknomappergroup"
Pavel Filipenský [Tue, 5 Apr 2022 06:30:23 +0000 (08:30 +0200)]
selftest: Create groups "jackthemappergroup" and "jacknomappergroup"

BUG: https://bugzilla.samba.org/show_bug.cgi?id=15041

Signed-off-by: Pavel Filipenský <pfilipen@redhat.com>
Reviewed-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Noel Power <npower@samba.org>
2 years agoselftest: Create users "jackthemapper" and "jacknomapper"
Pavel Filipenský [Fri, 1 Apr 2022 13:56:30 +0000 (15:56 +0200)]
selftest: Create users "jackthemapper" and "jacknomapper"

BUG: https://bugzilla.samba.org/show_bug.cgi?id=15041

Signed-off-by: Pavel Filipenský <pfilipen@redhat.com>
Reviewed-by: Noel Power <npower@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
2 years agostreams_depot: Simplify stream_dir()
Volker Lendecke [Tue, 5 Apr 2022 13:32:08 +0000 (15:32 +0200)]
streams_depot: Simplify stream_dir()

The only place where we could have entered the mark_valid() code path
is via openat(). In openat(":stream") with O_CREAT fsp->base_fsp() is
fully opened from within create_file_unixpath(). Change
streams_depot_openat() to call the FSETXATTR from mark_file_valid()
directly. This means we don't need the expensive synthetic_pathref()
call from stream_dir() anymore.

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
Autobuild-User(master): Jeremy Allison <jra@samba.org>
Autobuild-Date(master): Wed Apr  6 17:09:59 UTC 2022 on sn-devel-184

2 years agostreams_depot: Only create the subdirectories with O_CREAT
Volker Lendecke [Tue, 5 Apr 2022 14:58:41 +0000 (16:58 +0200)]
streams_depot: Only create the subdirectories with O_CREAT

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
2 years agostreams_depot: Pass base_sbuf to stream_smb_fname()
Volker Lendecke [Tue, 5 Apr 2022 14:08:43 +0000 (16:08 +0200)]
streams_depot: Pass base_sbuf to stream_smb_fname()

In streams_depot_openat() we're sure to have a valid base_fsp with a
valid stat around. We don't need the additional SMB_VFS_NEXT_STAT() in
stream_dir() in this case.

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
2 years agos3: smbget: Fix auth_fn, order of //server/share parameters is mixed in prompt.
Jeremy Allison [Tue, 5 Apr 2022 20:24:19 +0000 (13:24 -0700)]
s3: smbget: Fix auth_fn, order of //server/share parameters is mixed in prompt.

Found by <voetelink@nrg.eu>

BUG: https://bugzilla.samba.org/show_bug.cgi?id=14831

Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
2 years agoWHATSNEW: Document some CTDB changes
Martin Schwenke [Wed, 30 Mar 2022 00:08:45 +0000 (11:08 +1100)]
WHATSNEW: Document some CTDB changes

Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
Autobuild-User(master): Amitay Isaacs <amitay@samba.org>
Autobuild-Date(master): Wed Apr  6 07:32:04 UTC 2022 on sn-devel-184

2 years agoctdb-scripts: Drop unused ctdbd_wrapper
Martin Schwenke [Mon, 31 Jan 2022 21:35:37 +0000 (08:35 +1100)]
ctdb-scripts: Drop unused ctdbd_wrapper

Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
2 years agoctdb-scripts: Drop uses of ctdbd_wrapper
Martin Schwenke [Mon, 31 Jan 2022 21:28:47 +0000 (08:28 +1100)]
ctdb-scripts: Drop uses of ctdbd_wrapper

The only value this now provides is use of a notification script to
log when start/stop are called.  This was used for debugging strange
start/stop failures, which have not been recently seen.  Also, systemd
does a good job of logging start/stop.

Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>