]> git.ipfire.org Git - thirdparty/samba.git/log
thirdparty/samba.git
4 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>
4 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>
4 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>
4 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>
4 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>
4 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>
4 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>
4 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>
4 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>
4 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>
4 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>
4 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>
4 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>
4 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>
4 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>
4 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>
4 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>
4 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>
4 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>
4 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>
4 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>
4 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>
4 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>
4 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>
4 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>
4 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>
4 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>
4 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>
4 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>
4 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>
4 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>
4 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>
4 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>
4 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>
4 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>
4 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>
4 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>
4 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>
4 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>
4 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>
4 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>
4 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>
4 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>
4 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>
4 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>
4 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>
4 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>
4 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>
4 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>
4 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>
4 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>
4 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>
4 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>
4 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>
4 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>
4 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>
4 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>
4 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>
4 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>
4 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>
4 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>
4 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>
4 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>
4 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>
4 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>
4 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>
4 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>
4 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>
4 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

4 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>
4 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>
4 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

4 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>
4 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>
4 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>
4 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>
4 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

4 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>
4 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>
4 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>
4 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

4 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>
4 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>
4 years agoctdb-scripts: Remove failsafe that drops all IPs on failed shutdown
Martin Schwenke [Mon, 31 Jan 2022 10:55:17 +0000 (21:55 +1100)] 
ctdb-scripts: Remove failsafe that drops all IPs on failed shutdown

IPs are dropped in the shutdown event.

If a watchdog is necessary to ensure public IPs aren't on interfaces
when CTDB isn't running, then see ctdb-crash-cleanup.sh.

Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
4 years agoctdb-daemon: Don't release all public IPs during shutdown sequence
Martin Schwenke [Mon, 11 Sep 2017 00:59:42 +0000 (10:59 +1000)] 
ctdb-daemon: Don't release all public IPs during shutdown sequence

This further untangles public IP handling from the main daemon.

Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
4 years agoctdb-scripts: Drop all public IPs in the "shutdown" event
Martin Schwenke [Mon, 11 Sep 2017 00:57:27 +0000 (10:57 +1000)] 
ctdb-scripts: Drop all public IPs in the "shutdown" event

This is functionally the same as ctdb_release_all_ips().

Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
4 years agoctdb-config: Drop CTDB_STARTUP_TIMEOUT
Martin Schwenke [Mon, 31 Jan 2022 08:43:11 +0000 (19:43 +1100)] 
ctdb-config: Drop CTDB_STARTUP_TIMEOUT

This was added to be able to notice startup failures when unknown
tunables were present in the configuration.  Tunables are now set by
the daemon, so this is no longer necessary.

Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
4 years agoctdb-doc: Update documentation for tunables configuration
Martin Schwenke [Tue, 29 Mar 2022 23:49:15 +0000 (10:49 +1100)] 
ctdb-doc: Update documentation for tunables configuration

Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
4 years agoctdb-scripts: No longer load tunables via 00.ctdb.script setup event
Martin Schwenke [Mon, 31 Jan 2022 08:30:30 +0000 (19:30 +1100)] 
ctdb-scripts: No longer load tunables via 00.ctdb.script setup event

Drop related tests.

Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
4 years agoctdb-daemon: Load tunables from ctdb.tunables
Martin Schwenke [Mon, 31 Jan 2022 03:47:11 +0000 (14:47 +1100)] 
ctdb-daemon: Load tunables from ctdb.tunables

Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
4 years agoctdb-daemon: New function ctdb_tunables_load()
Martin Schwenke [Mon, 31 Jan 2022 03:40:19 +0000 (14:40 +1100)] 
ctdb-daemon: New function ctdb_tunables_load()

Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
4 years agoctdb-tests: Add unit tests for tunables code
Martin Schwenke [Mon, 31 Jan 2022 03:36:23 +0000 (14:36 +1100)] 
ctdb-tests: Add unit tests for tunables code

This aims to test ctdb_tunable_load_file() but also exercises
ctdb_tunable_names() and ctdb_tunable_get_value().
ctdb_tunable_set_value() is indirectly exercised via
ctdb_tunable_load_file().

Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
4 years agoctdb-tests: Add function test_case(), tweak unit test header format
Martin Schwenke [Mon, 28 Feb 2022 22:27:50 +0000 (09:27 +1100)] 
ctdb-tests: Add function test_case(), tweak unit test header format

Instead of documenting test cases with a comment, this allows them to
be documented via an argument to a function that is printed when the
test case is run.  This makes it easier locate test case failures when
commands used by test cases look similar,

Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
4 years agoctdb-tests: Strip trailing newlines from expected result output
Martin Schwenke [Tue, 1 Mar 2022 00:58:51 +0000 (11:58 +1100)] 
ctdb-tests: Strip trailing newlines from expected result output

This allows the provided output to be specified a little more
carelessly.  As per the comment, trailing newlines can't be matched
anyway, so this is notionally a bug fix.

Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
4 years agoctdb-tests: Reformat script
Martin Schwenke [Tue, 1 Mar 2022 00:57:13 +0000 (11:57 +1100)] 
ctdb-tests: Reformat script

Samba is reformatting shell scripts using

  shfmt -w -p -i 0 -fn

so update this one before editing.

Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
4 years agoctdb-common: Add function ctdb_tunable_load_file()
Martin Schwenke [Mon, 31 Jan 2022 03:34:58 +0000 (14:34 +1100)] 
ctdb-common: Add function ctdb_tunable_load_file()

Allows direct loading of tunables from a file.

Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
4 years agopackaging: move CTDB service file to top-level
Vinit Agnihotri [Tue, 1 Mar 2022 06:24:06 +0000 (17:24 +1100)] 
packaging: move CTDB service file to top-level

Signed-off-by: Vinit Agnihotri <vagnihotri@ddn.com>
Reviewed-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
4 years agoctdb-packaging: Move RPM spec file to examples directory
Martin Schwenke [Mon, 14 Mar 2022 21:54:30 +0000 (08:54 +1100)] 
ctdb-packaging: Move RPM spec file to examples directory

We used to use this for building test packages for standalone CTDB.
However, our testing has now changed to use binary tarballs.  We
believe we were the only users of this spec file and expect CTDB to
only be installed as part of a top-level Samba build, especially in
RPM form.

Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
4 years agogpo: Improve Certificate Auto Enroll Debug messages
David Mulder [Mon, 4 Apr 2022 16:42:40 +0000 (10:42 -0600)] 
gpo: Improve Certificate Auto Enroll Debug messages

Signed-off-by: David Mulder <dmulder@suse.com>
Reviewed-by: Jeremy Allison <jra@samba.org>
Autobuild-User(master): Jeremy Allison <jra@samba.org>
Autobuild-Date(master): Tue Apr  5 01:44:33 UTC 2022 on sn-devel-184

4 years agogpo: Certificate Auto Enrollment default Kerberos auth
David Mulder [Mon, 4 Apr 2022 16:33:15 +0000 (10:33 -0600)] 
gpo: Certificate Auto Enrollment default Kerberos auth

Certificate Auto Enrollment uses Kerberos to
authenticate to AD. If someone configures their
cepces.conf to use a different default
authentication, then samba-gpupdate fails. Force
Kerberos auth from samba-gpupdate.

Signed-off-by: David Mulder <dmulder@suse.com>
Reviewed-by: Jeremy Allison <jra@samba.org>