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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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
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>
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>
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
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>
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>
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>
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>
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
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>
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>
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>
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
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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
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>
Andreas Schneider [Mon, 4 Apr 2022 09:25:31 +0000 (11:25 +0200)]
third_party:waf: Do not recurse in aesni-intel if GnuTLS provides the cipher
Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
Autobuild-User(master): Jeremy Allison <jra@samba.org>
Autobuild-Date(master): Mon Apr 4 19:31:28 UTC 2022 on sn-devel-184
Andreas Schneider [Mon, 4 Apr 2022 09:24:04 +0000 (11:24 +0200)]
waf: Check for GnuTLS earlier
As GnuTLS is an essential part we need to check for it early so we can react on
GnuTLS features in other wscripts.
Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
Andreas Schneider [Mon, 4 Apr 2022 10:30:55 +0000 (12:30 +0200)]
waf: Import Logs in wscript_configure_system_gnutls
We do not use Options, but we do use Logs.warn()
Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
Volker Lendecke [Fri, 18 Feb 2022 16:36:08 +0000 (17:36 +0100)]
lib: Stay ASCII-compatible for toupper_m/tolower_m
This is an alternative patch for MR2339: It seems that Windows AD in
turkish locale is ASCII-compatible with 'i'. Björn tells me that the
turkish locale is the only one where upper/lower casing letters in the
ASCII range is not compatible to ASCII.
Simplify our code by not calling the locale-specific standard
toupper/tolower for the ASCII range but rely on our tables.
Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Alexander Bokovoy <ab@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
Autobuild-User(master): Volker Lendecke <vl@samba.org>
Autobuild-Date(master): Mon Apr 4 11:45:24 UTC 2022 on sn-devel-184
Andreas Schneider [Fri, 1 Apr 2022 07:13:40 +0000 (09:13 +0200)]
script: Fix check_symbols() with gcov build
Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Autobuild-User(master): Andreas Schneider <asn@cryptomilk.org>
Autobuild-Date(master): Mon Apr 4 07:59:51 UTC 2022 on sn-devel-184
Volker Lendecke [Thu, 31 Mar 2022 16:12:32 +0000 (18:12 +0200)]
vfs: Simplify streams_depot_openat()
We don't need an explicit stat(), VALID_STAT on the existing base_fsp
is sufficient.
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): Fri Apr 1 21:18:37 UTC 2022 on sn-devel-184
Volker Lendecke [Thu, 31 Mar 2022 19:21:30 +0000 (21:21 +0200)]
smbd: Don't loose base_fsp statinfo in non_widelink_open
smb_fname_rel came from SMB_VFS_PARENT_PATHNAME() without a reference
to the underlying base_fsp. We want to pass the existing stat-info to
the VFS objects, so when creating the relative base fsp_name we should
copy the stat-info from the base fsp we were handed, not the fake one
that we just made up in SMB_VFS_PARENT_PATHNAME()
Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
Volker Lendecke [Thu, 31 Mar 2022 15:49:06 +0000 (17:49 +0200)]
vfs: streams_xattr uses fsetxattr by now, remove an assert
Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
Volker Lendecke [Thu, 31 Mar 2022 15:40:35 +0000 (17:40 +0200)]
vfs: Ensure we have a base fsp openat() for named streams
Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
Volker Lendecke [Tue, 22 Feb 2022 12:15:02 +0000 (13:15 +0100)]
torture: Create a base_fsp for a named stream in vfstest
This will enable a simplification in the stream-handling openat vfs
routines.
Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
Volker Lendecke [Tue, 22 Feb 2022 11:38:27 +0000 (12:38 +0100)]
torture: Introduce error labels for vfstest's cmd_open()
Next patch will have another error exit
Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
Andreas Schneider [Wed, 16 Mar 2022 14:32:11 +0000 (15:32 +0100)]
Move LSP stuff to buildtools/devel_env.sh
Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Autobuild-User(master): Andreas Schneider <asn@cryptomilk.org>
Autobuild-Date(master): Fri Apr 1 11:20:35 UTC 2022 on sn-devel-184
Andreas Schneider [Wed, 16 Mar 2022 14:42:39 +0000 (15:42 +0100)]
Add missing final newline to end of sh file
find $(pwd) -type f -name "*.sh" | xargs sed -i -e '$a\'
Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Andreas Schneider [Wed, 16 Mar 2022 14:40:28 +0000 (15:40 +0100)]
Add missing final newline to end of c file
find $(pwd) -type f -name "*.c" | xargs sed -i -e '$a\'
Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Ralph Boehme [Tue, 29 Mar 2022 15:29:18 +0000 (17:29 +0200)]
smbd: consolidate nested if expressions
Signed-off-by: Ralph Boehme <slow@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
Autobuild-User(master): Jeremy Allison <jra@samba.org>
Autobuild-Date(master): Thu Mar 31 23:58:54 UTC 2022 on sn-devel-184
Ralph Boehme [Mon, 28 Mar 2022 09:48:37 +0000 (11:48 +0200)]
smbd: remove itime and file_id logic and code
This bases File-Ids on the inode numbers again. The whole stuff was
added because at that time Apple clients
1. would be upset by inode number reusage and
2. had a client side bug in their fallback implemetentation that
assigns File-Ids on the client side in case the server provides
File-Ids of 0.
After discussion with folks at Apple it should be safe these days to
rely on the Mac to generate its own File-Ids and let Samba return 0
File-Ids.
Signed-off-by: Ralph Boehme <slow@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
Ralph Boehme [Wed, 30 Mar 2022 12:27:26 +0000 (14:27 +0200)]
vfs: bump VFS version to 47
The VFS version bump to 47 was missed when adding SMB_VFS_FSTATAT(). While at
it, fix the version history.
Signed-off-by: Ralph Boehme <slow@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
Ralph Boehme [Mon, 28 Mar 2022 10:38:58 +0000 (12:38 +0200)]
CI: consolidate SMB2-FILEID and SMB2-FILEID-UNIQUE torture test suites
We don't need seperate test suites here, all tests are related to
File-Ids.
Signed-off-by: Ralph Boehme <slow@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
Ralph Boehme [Tue, 29 Mar 2022 15:38:15 +0000 (17:38 +0200)]
vfs_fruit: change default for "fruit:zero_file_id" option to yes
After discussion with folks at Apple it should be safe these days to rely on the
Mac to generate its own File-Ids and let Samba return 0 File-Ids.
Signed-off-by: Ralph Boehme <slow@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
Ralph Boehme [Thu, 24 Mar 2022 15:25:22 +0000 (16:25 +0100)]
vfs_shadow_copy2: implement readdir()
RN: shadow_copy2 fails listing snapshotted dirs with shadow:fixinodes
BUG: https://bugzilla.samba.org/show_bug.cgi?id=15035
Signed-off-by: Ralph Boehme <slow@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
Autobuild-User(master): Jeremy Allison <jra@samba.org>
Autobuild-Date(master): Thu Mar 31 18:47:42 UTC 2022 on sn-devel-184
Ralph Boehme [Thu, 24 Mar 2022 16:31:00 +0000 (17:31 +0100)]
CI: add a test listing a snapshotted directory
BUG: https://bugzilla.samba.org/show_bug.cgi?id=15035
Signed-off-by: Ralph Boehme <slow@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
Ralph Boehme [Mon, 28 Mar 2022 18:05:26 +0000 (20:05 +0200)]
CI: avoid smb2.twrp being run by plansmbtorture4testsuite() directly
This should only be run by a blackbox test.
BUG: https://bugzilla.samba.org/show_bug.cgi?id=15035
Signed-off-by: Ralph Boehme <slow@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
Jeremy Allison [Tue, 29 Mar 2022 01:39:55 +0000 (18:39 -0700)]
s3: smbd: Preserve the fsp->fsp_name->st buf across a MSG_SMB_FILE_RENAME message.
BUG: https://bugzilla.samba.org/show_bug.cgi?id=15038
Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
Autobuild-User(master): Ralph Böhme <slow@samba.org>
Autobuild-Date(master): Wed Mar 30 15:07:09 UTC 2022 on sn-devel-184
Jeremy Allison [Tue, 29 Mar 2022 01:42:18 +0000 (18:42 -0700)]
s3: smbd: Preserve the fsp->fsp_name->st bufs across rename_open_files()
BUG: https://bugzilla.samba.org/show_bug.cgi?id=15038
Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
Jeremy Allison [Tue, 29 Mar 2022 01:25:54 +0000 (18:25 -0700)]
s4: torture: Add test_smb2_close_full_information() test to smb2.rename.
Creates a file, opens it again on two different connections
and then renames it. When we close and ask for SMB2_CLOSE_FLAGS_FULL_INFORMATION
we expect this to succeed and return valid data on the handles that did not do
the rename request.
This currently succeeds by accident on master, so we are not
adding a knownfail.d/ file here. When we back-port this test
to 4.16.next, 4.15.next we will add a knownfail.d file.
The rename request zeros out the fsp->fsp_name->st field on the handles
that are open but are not being renamed, marking them as INVALID_STAT.
This should not happen on any open handle. Fix to follow will
preserve the field on rename in both the local connection and
different connection case.
Master gets away with this as in this branch, openat_pathref_fsp(),
which we use in the setup_close_full_information() call to fetch
the SMB2_CLOSE_FLAGS_FULL_INFORMATION data doesn't require an
existing VALID_STAT struct in order to open the file. This
hides the fact the rename zeroed out fsp->fsp_name->st.
4.16.x and 4.15.x don't have this fix, so expose the bug.
Regardless, even in master we should not zero out any
fsp->fsp_name->st values on rename.
BUG: https://bugzilla.samba.org/show_bug.cgi?id=15038
Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
Jeremy Allison [Tue, 29 Mar 2022 01:24:27 +0000 (18:24 -0700)]
s4: torture: Add CHECK_CREATED macro to smb2/rename.c. Not yet used.
BUG: https://bugzilla.samba.org/show_bug.cgi?id=15038
Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
Jeremy Allison [Tue, 29 Mar 2022 01:23:05 +0000 (18:23 -0700)]
s4: torture: Add CHECK_VAL macro to smb2/rename.c. Not yet used.
BUG: https://bugzilla.samba.org/show_bug.cgi?id=15038
Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
Jeremy Allison [Tue, 29 Mar 2022 01:09:20 +0000 (18:09 -0700)]
s3: tests.py: Only run smb2.rename against fileserver.
No need to run this against nt4_dc or ad_dc.
BUG: https://bugzilla.samba.org/show_bug.cgi?id=15038
Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>