Stefan Metzmacher [Fri, 4 Oct 2019 12:30:17 +0000 (14:30 +0200)]
smb2_server: let smbd_server_connection_terminate_ex() call smbXsrv_connection_disconnect_transport()
If the connection is broken mark it as invalid and close
the socket.
Stefan Metzmacher [Fri, 4 Oct 2019 12:26:20 +0000 (14:26 +0200)]
BEFORE in exit_server... s3:smbd: split out smbXsrv_connection_disconnect_transport()
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Stefan Metzmacher [Fri, 4 Oct 2019 09:15:58 +0000 (11:15 +0200)]
smbXsrv_session_add_channel check smbXsrv_session_find_channel
Stefan Metzmacher [Fri, 4 Oct 2019 09:15:27 +0000 (11:15 +0200)]
smbXsrv_connection->connect_time
Stefan Metzmacher [Fri, 4 Oct 2019 08:28:24 +0000 (10:28 +0200)]
debug channels
Stefan Metzmacher [Fri, 4 Oct 2019 08:02:56 +0000 (10:02 +0200)]
session channel creation_time smbXsrv_session_add_channel pass 'now'
Stefan Metzmacher [Fri, 4 Oct 2019 08:00:06 +0000 (10:00 +0200)]
TODO: nt_time_string hires
Stefan Metzmacher [Fri, 4 Oct 2019 07:29:33 +0000 (09:29 +0200)]
DEBUG smbXsrv_session_find_channel
Stefan Metzmacher [Fri, 4 Oct 2019 05:55:26 +0000 (07:55 +0200)]
DEBUG NT_STATUS_REQUEST_NOT_ACCEPTED HERE
Michael Adam [Tue, 23 Sep 2014 02:10:02 +0000 (04:10 +0200)]
TMP: smbd. more debug multichannel
Stefan Metzmacher [Fri, 4 Oct 2019 15:10:01 +0000 (17:10 +0200)]
defer_open talloc_zero() and TALLOC_FREE(lck);
root ub1704-167 [Fri, 4 Oct 2019 16:53:23 +0000 (09:53 -0700)]
remove defer_open_state and directly use deferred_open_record
Stefan Metzmacher [Mon, 3 Sep 2018 13:28:21 +0000 (15:28 +0200)]
s3:smb2_tcon: pass down in_flags to smbd_smb2_tree_connect_send()
SMB 3.1.1 converted the reserved field to a flags field.
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Stefan Metzmacher [Thu, 23 Aug 2018 07:21:41 +0000 (09:21 +0200)]
s3:libsmb: pass dest_ss to cli_cm_open()
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Stefan Metzmacher [Thu, 23 Aug 2018 07:20:49 +0000 (09:20 +0200)]
s3:libsmb: pass dest_ss to cli_cm_connect() down to cli_connect_nb()
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Stefan Metzmacher [Wed, 2 Oct 2019 14:56:30 +0000 (07:56 -0700)]
async_connect_send TEVENT_FD_READ
Stefan Metzmacher [Fri, 27 Sep 2019 03:38:30 +0000 (20:38 -0700)]
.... source3/lib/util_sock.c async_connect without retry
Steven Noonan [Tue, 24 Sep 2019 05:53:40 +0000 (22:53 -0700)]
interface: allow overriding speed/cap/if_index for named interfaces
Signed-off-by: Steven Noonan <steven@uplinklabs.net>
Stefan Metzmacher [Fri, 27 Sep 2019 04:10:03 +0000 (21:10 -0700)]
fix query_iface_rxqueue_count_from_name
Steven Noonan [Thu, 26 Sep 2019 08:53:32 +0000 (01:53 -0700)]
interfaces: teach how to identify interfaces with RSS support
Signed-off-by: Steven Noonan <steven@uplinklabs.net>
Stefan Metzmacher [Sat, 22 Sep 2012 19:52:13 +0000 (21:52 +0200)]
Revert "HACK debug replay/channel_sequence"
This reverts commit
46ce191a9bf9321251ea601a9b3ba7b48c5d5ccb.
Stefan Metzmacher [Thu, 26 Jul 2012 06:23:33 +0000 (08:23 +0200)]
Revert "HACK disconnect after 2 writes"
This reverts commit
eaa7023f865be73483a99ff203d1dbfb3e180ef9.
Stefan Metzmacher [Thu, 26 Jul 2012 06:23:10 +0000 (08:23 +0200)]
HACK disconnect after 2 writes
Stefan Metzmacher [Thu, 26 Jul 2012 06:22:01 +0000 (08:22 +0200)]
HACK debug replay/channel_sequence
Stefan Metzmacher [Wed, 2 Oct 2019 13:53:09 +0000 (15:53 +0200)]
Revert "HACK FSCTL_LMR_REQ_RESILIENCY..."
This reverts commit
1c3fb11f555be90143e9c357e28c8e98debe3ea9.
Stefan Metzmacher [Fri, 5 Sep 2014 22:11:03 +0000 (00:11 +0200)]
HACK FSCTL_LMR_REQ_RESILIENCY...
Stefan Metzmacher [Wed, 24 Oct 2012 13:55:20 +0000 (15:55 +0200)]
s3:smb2_lock: implement lock_sequence replay detection
While windows enables it only for resilient and persistent handles a SMB server
SHOULD (according to MS-SMB2 section 3.3.5.14 ) activate processing of lock
sequence numbers for EITHER
- protocol dialect 2.1 and resilient handles OR
- protocol dialect 3.x.
Pair-Programmed-With: Michael Adam <obnox@samba.org>
Pair-Programmed-With: Guenther Deschner <gd@samba.org>
Signed-off-by: Michael Adam <obnox@samba.org>
Signed-off-by: Guenther Deschner <gd@samba.org>
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Stefan Metzmacher [Wed, 24 Oct 2012 12:53:05 +0000 (14:53 +0200)]
s3:smb2_lock: pass in_lock_sequence to smbd_smb2_lock_send()
Take the value from the client if the dialect is SMB2_10 or higher,
otherwise default to 0.
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Guenther Deschner <gd@samba.org>
Reviewed-by: Michael Adam <obnox@samba.org>
Stefan Metzmacher [Wed, 24 Oct 2012 13:17:56 +0000 (15:17 +0200)]
s3:smbXsrv_open: initialize smbXsrv_open_global->lock_sequence_array with 0xFF
This does not match the current documentation, but is very likely the
right thing to do.
If we would match the documentation and initialize with 0x00,
we would return STATUS_SUCCESS without doing any locks.
If the client also follows the documentation and starts
with a lock_sequence of 0 for the first operation.
Pair-Programmed-With: Michael Adam <obnox@samba.org>
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Signed-off-by: Michael Adam <obnox@samba.org>
Reviewed-by: Guenther Deschner <gd@samba.org>
Stefan Metzmacher [Wed, 24 Oct 2012 13:06:54 +0000 (15:06 +0200)]
s3:smbXsrv.idl: add lock_sequence_array to smbXsrv_open_global0
This is needed for lock replay detection.
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Guenther Deschner <gd@samba.org>
Reviewed-by: Michael Adam <obnox@samba.org>
Stefan Metzmacher [Wed, 2 Oct 2019 13:30:53 +0000 (15:30 +0200)]
s4:torture/smb2: add smb2.lock.replay_smb3_specification test
This implements a test that checks for the specified behaviour.
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Stefan Metzmacher [Wed, 2 Oct 2019 12:51:26 +0000 (14:51 +0200)]
s4:torture/smb2: make smb2.lock.replay_broken_windows more obvious
This test check the SMB 2.1.0 behaviour of lock sequence checking,
which is only turned on for resilient handles.
Even Windows Server 2019 only implements lock sequence checking only
for resilient and persistent handles as a server.
While its client side uses lock sequence checking if it negotiated
multichannel with the server.
Hopefully this will be fixed in future Windows versions.
Make it clear that this test is supposed to pass against the legacy
Windows servers which violate the specification:
[MS-SMB2] 3.3.5.14 Receiving an SMB2 LOCK Request
...
If the LockSequence value in the SMB2 LOCK Request (section 2.2.26) is not zero,
and either one of the following conditions is TRUE, the server SHOULD verify
whether the lock/unlock request with that LockSequence value has been
successfully processed before:
* Connection.Dialect is "2.1" and Open.IsResilient is TRUE.
* Connection.Dialect belongs to the SMB 3.x dialect family.<318>
...
<318> Section 3.3.5.14: Windows 8, Windows Server 2012, Windows 8.1, and Windows Server 2012
R2 do not verify the LockSequence value in the SMB2 LOCK Request (section 2.2.26) when both
Open.IsResilient and Open.IsPersistent are FALSE.
Note <318> also applies to Windows Server 2016 and 2019.
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Michael Adam [Thu, 20 Sep 2018 10:45:17 +0000 (12:45 +0200)]
s4:torture/smb2: fix and improve the smb2.lock.replay test
The test was wrong in that it used an invalid
lock sequence bucket (65) where it actually wanted
to use a valid on (64), and hence the test results
(which were adapted to the real responses) were not
quite logical.
This patch fixes this and also improves some of
the comments so that the flow of the patch becomes
a little more obvious.
Pair-Programmed-With: Günther Deschner <gd@samba.org>
Signed-off-by: Michael Adam <obnox@samba.org>
Signed-off-by: Günther Deschner <gd@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
Stefan Metzmacher [Tue, 14 Jan 2020 10:38:07 +0000 (11:38 +0100)]
Revert "wafsamba: add -Werror=cast-function-type -Wcast-function-type"
This reverts commit
967bc6ff3fcdca4874c9be6e2793d176b0264488.
Stefan Metzmacher [Wed, 4 Dec 2019 10:59:19 +0000 (11:59 +0100)]
wafsamba: add -Werror=cast-function-type -Wcast-function-type
This produces the following warnings/errors and found the bug
fixed in the previous commit:
librpc/gen_ndr/ndr_misc.c:851:15: error: cast between incompatible function types
from ‘enum ndr_err_code (*)(struct ndr_push *, int, enum netr_SchannelType)’ to
‘enum ndr_err_code (*)(struct ndr_push *, int, const void *)’ [-Werror=cast-function-type]
.ndr_push = (ndr_push_flags_fn_t) ndr_push_netr_SchannelType,
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Stefan Metzmacher [Wed, 5 Jun 2019 15:01:49 +0000 (17:01 +0200)]
TODO:TEST! s3:modules: add vfs_io_uring module
The module makes use of the new io_uring infrastructure
(intruduced in linux 5.1), see https://lwn.net/Articles/778411/ and
http://git.kernel.dk/cgit/liburing/
TODO: this module compiles, but was not runtime tested yet.
Martin Schwenke [Mon, 13 Jan 2020 23:58:15 +0000 (10:58 +1100)]
ctdb-tests: Enable job control when keeping stdin open
POSIX says:
If job control is disabled (see set, -m), the standard input for an
asynchronous list, before any explicit redirections are performed,
shall be considered to be assigned to a file that has the same
properties as /dev/null. This shall not happen if job control is
enabled. In all cases, explicit redirection of standard input shall
override this activity.
ctdbd is backgrounded at startup, so the above causes stdin to be
redirected from /dev/null. Enable job control to work around this.
Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
Autobuild-User(master): Martin Schwenke <martins@samba.org>
Autobuild-Date(master): Tue Jan 28 11:24:35 UTC 2020 on sn-devel-184
Martin Schwenke [Mon, 13 Jan 2020 10:04:24 +0000 (21:04 +1100)]
ctdb-tests: Don't close stdin when starting local daemons
Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
Martin Schwenke [Mon, 13 Jan 2020 10:04:54 +0000 (21:04 +1100)]
ctdb-daemon: Shut down if interactive and stdin is closed
This allows a test environment to simply close its end of a pipe to
cleanly shutdown ctdbd. Like in smbd, this is only done if stdin is a
pipe or a socket.
Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
Martin Schwenke [Mon, 13 Jan 2020 10:13:32 +0000 (21:13 +1100)]
ctdb-daemon: Only stop monitoring if it has been initialised
This avoids a crash if ctdb_shutdown_sequence() is called before
monitoring is initialised.
Switch to using TALLOC_FREE() while touching this function.
Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
Andreas Schneider [Mon, 27 Jan 2020 13:58:10 +0000 (14:58 +0100)]
lib:util: Log mkdir error on correct debug levels
For smbd we want an error and for smbclient we only want it in NOTICE
debug level.
The default log level of smbclient is log level 1 so we need notice to
not spam the user.
BUG: https://bugzilla.samba.org/show_bug.cgi?id=14253
Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Guenther Deschner <gd@samba.org>
Autobuild-User(master): Günther Deschner <gd@samba.org>
Autobuild-Date(master): Mon Jan 27 15:55:24 UTC 2020 on sn-devel-184
Volker Lendecke [Fri, 24 Jan 2020 09:45:52 +0000 (10:45 +0100)]
selftest: Convert Samba3::provision() to named parameters
9 positional parameters is a bit too much for easy overview
Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Guenther Deschner <gd@samba.org>
Volker Lendecke [Thu, 23 Jan 2020 15:07:59 +0000 (16:07 +0100)]
selftest: Factor out create_file_chmod()
24 lines less perl :-)
Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Guenther Deschner <gd@samba.org>
Günther Deschner [Thu, 23 Jan 2020 14:31:27 +0000 (15:31 +0100)]
krb5-wrap: deal with different krb5_trace_info struct flavors (earlier MIT krb5 releases)
BUG: https://bugzilla.samba.org/show_bug.cgi?id=14252
Guenther
Signed-off-by: Guenther Deschner <gd@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
Autobuild-User(master): Andreas Schneider <asn@cryptomilk.org>
Autobuild-Date(master): Fri Jan 24 20:38:53 UTC 2020 on sn-devel-184
Andreas Schneider [Wed, 15 Jan 2020 15:29:24 +0000 (16:29 +0100)]
nsswitch:tests: Add test to check correct group lookup with samlogon cache
TEST FOR: https://bugzilla.samba.org/show_bug.cgi?id=14124
Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Günther Deschner <gd@samba.org>
Autobuild-User(master): Andreas Schneider <asn@cryptomilk.org>
Autobuild-Date(master): Fri Jan 24 17:18:38 UTC 2020 on sn-devel-184
Andreas Schneider [Wed, 15 Jan 2020 13:41:37 +0000 (14:41 +0100)]
selftest: Make 'Samba Users' the primary group of joe
Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Günther Deschner <gd@samba.org>
Andreas Schneider [Wed, 15 Jan 2020 13:41:13 +0000 (14:41 +0100)]
selftest: Add a group 'Samba Users'
Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Günther Deschner <gd@samba.org>
Andreas Schneider [Wed, 15 Jan 2020 13:39:56 +0000 (14:39 +0100)]
selftest: Add user joe
Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Günther Deschner <gd@samba.org>
Andreas Schneider [Wed, 15 Jan 2020 14:30:24 +0000 (15:30 +0100)]
nsswitch: Fix username in wbinfo -K output
We should not print the password if specified via the command line.
Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Günther Deschner <gd@samba.org>
Volker Lendecke [Wed, 22 Jan 2020 10:47:55 +0000 (11:47 +0100)]
tdb: Align integer types
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 Jan 23 20:41:46 UTC 2020 on sn-devel-184
Volker Lendecke [Mon, 20 Jan 2020 13:06:11 +0000 (14:06 +0100)]
dbwrap: Do direct struct initalization in db_ctdb_store_db_seqnum()
Save a few lines
Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
Volker Lendecke [Wed, 22 Jan 2020 09:21:17 +0000 (10:21 +0100)]
librpc: Use PRIu32 printf specifiers
Both values printed are uint32_t's
Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
Volker Lendecke [Wed, 15 Jan 2020 12:11:20 +0000 (13:11 +0100)]
smbclient: Fix a typo
Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
Volker Lendecke [Tue, 21 Jan 2020 12:20:07 +0000 (13:20 +0100)]
librpc: Use the MAX() macro where appropriate
Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
Volker Lendecke [Tue, 21 Jan 2020 12:17:13 +0000 (13:17 +0100)]
librpc: Fix a gcc warning
gcc does not like const before static
Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
Volker Lendecke [Wed, 22 Jan 2020 15:14:01 +0000 (16:14 +0100)]
smbd: Call string_term_tdb_data() once instead of 6 times
Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
Jeremy Allison [Fri, 17 Jan 2020 21:49:48 +0000 (13:49 -0800)]
s3: lib: nmblib. Clean up and harden nmb packet processing.
BUG: https://bugzilla.samba.org/show_bug.cgi?id=14239
OSS-FUZZ: https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=20156
OSS-FUZZ: https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=20157
Credit to oss-fuzz.
No security implications.
Signed-off-by: Jeremy Allison <jra@samba.org>
Pair programmed with: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
Reviewed-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
Autobuild-User(master): Jeremy Allison <jra@samba.org>
Autobuild-Date(master): Tue Jan 21 23:33:41 UTC 2020 on sn-devel-184
Christof Schmitt [Thu, 16 Jan 2020 21:15:15 +0000 (14:15 -0700)]
vfs_gpfs: Preserve errno across unbecome_root call
Signed-off-by: Christof Schmitt <cs@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
Christof Schmitt [Thu, 16 Jan 2020 20:50:03 +0000 (13:50 -0700)]
smbd: Remove unused define
CAP_LEASE is not used in the file oplock_linux.c, so remove it there.
Signed-off-by: Christof Schmitt <cs@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
Christof Schmitt [Thu, 16 Jan 2020 20:45:54 +0000 (13:45 -0700)]
smbd: Remove unused function linux_set_lease_capability
This function is no longer used. In case this capability would be
required, set_effective_capability(LEASE_CAPABILITY) could also be
called directly.
Signed-off-by: Christof Schmitt <cs@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
Christof Schmitt [Thu, 16 Jan 2020 19:18:46 +0000 (12:18 -0700)]
vfs_gpfs: Cleanup lease mapping function
Shorten the function a bit by directly returning the mapped value.
Signed-off-by: Christof Schmitt <cs@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
Christof Schmitt [Thu, 16 Jan 2020 19:17:46 +0000 (12:17 -0700)]
vfs_gpfs: Change lease helper function to only provide mapping
The set_gpfs_lease function first maps the lease argument to the GPFS
version and then issues the API call. Change this to only do the mapping
in the helper function.
Signed-off-by: Christof Schmitt <cs@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
Christof Schmitt [Thu, 16 Jan 2020 19:15:29 +0000 (12:15 -0700)]
vfs_gpfs: Remove function call from "if" statement
Follow the current coding guidelines to first issue the function call
and then check the return code.
Signed-off-by: Christof Schmitt <cs@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
Christof Schmitt [Thu, 16 Jan 2020 19:13:46 +0000 (12:13 -0700)]
vfs_gpfs: Reformat function definition of vfs_gpfs_setlease
Remove trailing whitespace and put each argument on a seperate line.
Signed-off-by: Christof Schmitt <cs@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
Christof Schmitt [Thu, 16 Jan 2020 19:12:53 +0000 (12:12 -0700)]
vfs_gpfs: Remove call to linux_set_lease_capability
The API call is already done as root user (become_root), so that the
lease contains the root user. The lease capability is already implied by
the root user, so the explicit call to linux_set_lease_capability is not
required.
Signed-off-by: Christof Schmitt <cs@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
Stefan Metzmacher [Tue, 21 Jan 2020 18:25:00 +0000 (19:25 +0100)]
script/release.sh: make it possible to run from a git worktree
.git is a regular file in that case.
Also check that script/release.sh is present as a relative path
to ensure we're called from the expected location.
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Stefan Metzmacher [Tue, 21 Jan 2020 13:51:34 +0000 (14:51 +0100)]
WHATSNEW: Start release notes for Samba 4.13.0pre1.
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Autobuild-User(master): Stefan Metzmacher <metze@samba.org>
Autobuild-Date(master): Tue Jan 21 16:04:29 UTC 2020 on sn-devel-184
Stefan Metzmacher [Tue, 21 Jan 2020 13:23:45 +0000 (14:23 +0100)]
VERSION: Bump version up to 4.13.0pre1...
and re-enable GIT_SNAPSHOT.
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Stefan Metzmacher [Tue, 21 Jan 2020 13:21:50 +0000 (14:21 +0100)]
VERSION: Disable GIT_SNAPSHOT for the 4.12.0rc1 release...
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Stefan Metzmacher [Tue, 21 Jan 2020 13:20:22 +0000 (14:20 +0100)]
WHATSNEW: Add release note for Samba 4.12.0rc1.
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Björn Baumbach [Tue, 21 Jan 2020 12:56:29 +0000 (13:56 +0100)]
samba-tool group addmembers: avoid python traceback on member add failure
Signed-off-by: Björn Baumbach <bb@sernet.de>
Reviewed-by: Ralph Boehme <slow@samba.org>
Björn Baumbach [Mon, 30 Dec 2019 15:14:52 +0000 (16:14 +0100)]
selftest: add test for samba-tool groupmember --member-base-dn option
Signed-off-by: Björn Baumbach <bb@sernet.de>
Reviewed-by: Ralph Boehme <slow@samba.org>
Björn Baumbach [Wed, 18 Dec 2019 14:09:16 +0000 (15:09 +0100)]
selftest: add tests for samba-tool group addmembers --object-types option
Signed-off-by: Björn Baumbach <bb@sernet.de>
Reviewed-by: Ralph Boehme <slow@samba.org>
Björn Baumbach [Wed, 18 Dec 2019 09:43:22 +0000 (10:43 +0100)]
selftest: add test for new samba-tool group addmembers --member-dn option
Signed-off-by: Björn Baumbach <bb@sernet.de>
Reviewed-by: Ralph Boehme <slow@samba.org>
Björn Baumbach [Mon, 30 Dec 2019 13:54:32 +0000 (14:54 +0100)]
samba-tool group addmembers: add --member-base-dn option for group member search
Signed-off-by: Björn Baumbach <bb@sernet.de>
Reviewed-by: Ralph Boehme <slow@samba.org>
Björn Baumbach [Wed, 18 Dec 2019 12:35:16 +0000 (13:35 +0100)]
samba-tool group {add,remove}members: allow to use --member-dn in combination with listofmembers
Signed-off-by: Björn Baumbach <bb@sernet.de>
Reviewed-by: Ralph Boehme <slow@samba.org>
Björn Baumbach [Tue, 17 Dec 2019 15:27:32 +0000 (16:27 +0100)]
samba-tool group removemembers: adapt functionality to addmembers command
Adds --member-dn and --object-types options.
Signed-off-by: Björn Baumbach <bb@sernet.de>
Reviewed-by: Ralph Boehme <slow@samba.org>
Björn Baumbach [Tue, 17 Dec 2019 15:26:23 +0000 (16:26 +0100)]
samba-tool group addmembers: add --member-dn option
The --member-dn option allows to specify an object by it's DN.
This is required to select a specific object if there are more than one
with the same name. Multiple contacts can exist with the same name in
different OUs.
Signed-off-by: Björn Baumbach <bb@sernet.de>
Reviewed-by: Ralph Boehme <slow@samba.org>
Björn Baumbach [Fri, 9 Aug 2019 15:07:07 +0000 (17:07 +0200)]
samba-tool group addmembers: add new option --object-types
With this option the admin can specify the object types of the group
members which will be added to the group. The search filter for the objects
will be created according to the types.
Signed-off-by: Björn Baumbach <bb@sernet.de>
Reviewed-by: Ralph Boehme <slow@samba.org>
Björn Baumbach [Mon, 30 Dec 2019 12:57:26 +0000 (13:57 +0100)]
python/samdb: validation of group member types for group member filter
Signed-off-by: Björn Baumbach <bb@sernet.de>
Reviewed-by: Ralph Boehme <slow@samba.org>
Björn Baumbach [Mon, 30 Dec 2019 12:57:11 +0000 (13:57 +0100)]
python/samdb: add type "all" to search for all common types of group members
Signed-off-by: Björn Baumbach <bb@sernet.de>
Reviewed-by: Ralph Boehme <slow@samba.org>
Björn Baumbach [Fri, 9 Aug 2019 14:45:51 +0000 (16:45 +0200)]
python/samdb: adapt search filter for group object type
Use a group search filter which is similar to the filter which is used
by the basic MS Windows group membership management.
The filter excludes the group type GROUP_TYPE_BUILTIN_LOCAL_GROUP.
Signed-off-by: Björn Baumbach <bb@sernet.de>
Reviewed-by: Ralph Boehme <slow@samba.org>
Björn Baumbach [Mon, 30 Dec 2019 15:27:59 +0000 (16:27 +0100)]
python/samdb: adapt search filter for user object type
Use a user search filter which is similar to the filter which is used
by the basic MS Windows group membership management.
The filter filters for objects with the sAMAccountType ATYPE_NORMAL_ACCOUNT.
Signed-off-by: Björn Baumbach <bb@sernet.de>
Reviewed-by: Ralph Boehme <slow@samba.org>
Björn Baumbach [Mon, 30 Dec 2019 15:24:23 +0000 (16:24 +0100)]
python/samdb: add 'computer' to the default group member types for group member filters
Add the 'computer' type to the default member types, so that the next
commit does not change the default behavior.
Signed-off-by: Björn Baumbach <bb@sernet.de>
Reviewed-by: Ralph Boehme <slow@samba.org>
Björn Baumbach [Wed, 18 Dec 2019 16:15:13 +0000 (17:15 +0100)]
python/samdb: fetch specific error if there are more than one search results
There can be more than one contact with the same name.
Signed-off-by: Björn Baumbach <bb@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
Björn Baumbach [Fri, 9 Aug 2019 14:26:58 +0000 (16:26 +0200)]
python/samdb: add more object types for adding/remove group members
The filters are based on the MS Windows filter, which are used by the
basic group member management dialog.
Signed-off-by: Björn Baumbach <bb@sernet.de>
Reviewed-by: Ralph Boehme <slow@samba.org>
Björn Baumbach [Fri, 9 Aug 2019 14:19:52 +0000 (16:19 +0200)]
python/samdb: add option to specify types of group members
The option can be used to specify the type of the object which have to
be added to (or removed) from a group. The search filter for the objects
will be created according to the types.
Signed-off-by: Björn Baumbach <bb@sernet.de>
Reviewed-by: Ralph Boehme <slow@samba.org>
Jule Anger [Tue, 27 Aug 2019 10:21:29 +0000 (12:21 +0200)]
samba-tool tests: add test-case for 'ou list --base-dn'
Check if the ou list --base-dn / -b command uses a specific base dn.
Signed-off-by: Jule Anger <ja@sernet.de>
Reviewed-by: Björn Baumbach <bb@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
Jule Anger [Mon, 26 Aug 2019 08:25:18 +0000 (10:25 +0200)]
samba-tool: add -b/--base-dn option to OUs list command
With this option it's e.g. possible to list the OUs which are
located under a different specific place in the AD.
Signed-off-by: Jule Anger <ja@sernet.de>
Reviewed-by: Björn Baumbach <bb@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
Jule Anger [Wed, 28 Aug 2019 09:06:13 +0000 (11:06 +0200)]
samba-tool tests: add test-case for 'user list --base-dn'
Check if the user list --base-dn / -b command uses a specific base dn.
Signed-off-by: Jule Anger <ja@sernet.de>
Reviewed-by: Björn Baumbach <bb@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
Jule Anger [Mon, 26 Aug 2019 07:47:41 +0000 (09:47 +0200)]
samba-tool: add -b/--base-dn option to users list command
With this option it's e.g. possible to list the users of a
specify OU or users which are located under a different specific
place in the AD.
Signed-off-by: Jule Anger <ja@sernet.de>
Reviewed-by: Björn Baumbach <bb@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
Jule Anger [Tue, 27 Aug 2019 10:23:08 +0000 (12:23 +0200)]
samba-tool tests: add test-case for 'contact list --base-dn'
Check if the contact list --base-dn / -b command uses a specific base dn.
Signed-off-by: Jule Anger <ja@sernet.de>
Reviewed-by: Björn Baumbach <bb@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
Jule Anger [Mon, 26 Aug 2019 07:33:24 +0000 (09:33 +0200)]
samba-tool: add -b/--base-dn option to contacts list command
With this option it's e.g. possible to list the contacts of a
specify OU or contacts which are located under a different specific
place in the AD.
Signed-off-by: Jule Anger <ja@sernet.de>
Reviewed-by: Björn Baumbach <bb@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
Jule Anger [Tue, 27 Aug 2019 11:08:34 +0000 (13:08 +0200)]
samba-tool tests: add test-case for 'computer list --base-dn'
Check if the computer list --base-dn / -b command uses a specific base dn.
Signed-off-by: Jule Anger <ja@sernet.de>
Reviewed-by: Björn Baumbach <bb@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
Jule Anger [Mon, 26 Aug 2019 06:46:24 +0000 (08:46 +0200)]
samba-tool: add -b/--base-dn option to computer list command
With this option it's e.g. possible to list the computers of a
specify OU or computers which are located under a different specific
place in the AD.
Signed-off-by: Jule Anger <ja@sernet.de>
Reviewed-by: Björn Baumbach <bb@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
Jule Anger [Tue, 27 Aug 2019 10:00:15 +0000 (12:00 +0200)]
samba-tool tests: add test-case for 'group list --base-dn'
Check if the group list --base-dn / -b command uses a specific base dn.
Signed-off-by: Jule Anger <ja@sernet.de>
Reviewed-by: Björn Baumbach <bb@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
Jule Anger [Mon, 12 Aug 2019 18:46:47 +0000 (20:46 +0200)]
samba-tool: add -b/--base-dn option to groups list command
With this option it's e.g. possible to list the groups of a
specify OU or groups which are located under a different specific
place in the AD.
Signed-off-by: Jule Anger <ja@sernet.de>
Pair-programmed-with: Björn Baumbach <bb@samba.org>
Reviewed-by: Björn Baumbach <bb@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
Björn Baumbach [Tue, 21 Jan 2020 11:53:15 +0000 (12:53 +0100)]
samba-tool tests: add test-case for 'user getgrouops --full-dn'
Signed-off-by: Björn Baumbach <bb@sernet.de>
Reviewed-by: Ralph Boehme <slow@samba.org>
Björn Baumbach [Tue, 21 Jan 2020 10:39:30 +0000 (11:39 +0100)]
samba-tool: add --full-dn option for user getgroups command
Signed-off-by: Björn Baumbach <bb@sernet.de>
Reviewed-by: Ralph Boehme <slow@samba.org>
Jule Anger [Tue, 27 Aug 2019 10:19:29 +0000 (12:19 +0200)]
samba-tool tests: add test-case for 'group listmembers --full-dn'
Check if the group listmembers --full-dn command displays DN instead of the sAMAccountName.
Signed-off-by: Jule Anger <ja@sernet.de>
Reviewed-by: Björn Baumbach <bb@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>