]> git.ipfire.org Git - thirdparty/samba.git/log
thirdparty/samba.git
5 years agoctdb-test: Fix a typo
Volker Lendecke [Tue, 28 Jan 2020 16:42:13 +0000 (17:42 +0100)] 
ctdb-test: Fix a typo

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
Autobuild-User(master): Andreas Schneider <asn@cryptomilk.org>
Autobuild-Date(master): Thu Jan 30 13:53:22 UTC 2020 on sn-devel-184

5 years agolibsmb: Fix a typo
Volker Lendecke [Thu, 23 Jan 2020 20:23:03 +0000 (21:23 +0100)] 
libsmb: Fix a typo

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
5 years agoauth3: Fix a typo
Volker Lendecke [Mon, 27 Jan 2020 15:43:24 +0000 (16:43 +0100)] 
auth3: Fix a typo

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
5 years agolib: Align integer types
Volker Lendecke [Fri, 24 Jan 2020 10:49:58 +0000 (11:49 +0100)] 
lib: Align integer types

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
5 years agolibcli: Align integer types
Volker Lendecke [Tue, 28 Jan 2020 14:39:29 +0000 (15:39 +0100)] 
libcli: Align integer types

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
5 years agopassdb: Use struct allocation
Volker Lendecke [Mon, 27 Jan 2020 16:00:59 +0000 (17:00 +0100)] 
passdb: Use struct allocation

Give the compiler more info

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
5 years agos4:torture: Convert samba4.base.charset test to smb2
David Mulder [Tue, 10 Dec 2019 19:06:13 +0000 (12:06 -0700)] 
s4:torture: Convert samba4.base.charset test to smb2

The partial surrogate test is known to fail (in
both smb1 and smb2).

Signed-off-by: David Mulder <dmulder@suse.com>
Signed-off-by: Noel Power <noel.power@suse.com>
Reviewed-by: Ralph Böhme <slow@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
Autobuild-User(master): Noel Power <npower@samba.org>
Autobuild-Date(master): Thu Jan 30 12:05:13 UTC 2020 on sn-devel-184

5 years agoselftest: Exit skipped daemons on close(STDIN)
Volker Lendecke [Tue, 28 Jan 2020 13:46:09 +0000 (14:46 +0100)] 
selftest: Exit skipped daemons on close(STDIN)

Without this, teardown_env() will take ages for environments with
skipped daemons

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Autobuild-User(master): Andrew Bartlett <abartlet@samba.org>
Autobuild-Date(master): Wed Jan 29 11:06:53 UTC 2020 on sn-devel-184

5 years agoselftest: Close STDIN_PIPE's write end for skipped daemons
Volker Lendecke [Tue, 28 Jan 2020 13:41:11 +0000 (14:41 +0100)] 
selftest: Close STDIN_PIPE's write end for skipped daemons

Without this, any environment that skips any daemon will not shut down
properly. If a copy of a pipe's write end remains, closing one of them
won't cause the read end to be readable, i.e. the daemons waiting for
that won't exit properly.

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
5 years agolib: asn1.c: Prevent ASN1_ENUMERATED from wrapping.
Jeremy Allison [Thu, 23 Jan 2020 21:59:18 +0000 (13:59 -0800)] 
lib: asn1.c: Prevent ASN1_ENUMERATED from wrapping.

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

Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Douglas Bagnall <dbagnall@samba.org>
Autobuild-User(master): Jeremy Allison <jra@samba.org>
Autobuild-Date(master): Wed Jan 29 01:02:04 UTC 2020 on sn-devel-184

5 years agolib/util: use better linux os detection in gpfs configure
Günther Deschner [Mon, 27 Jan 2020 20:39:20 +0000 (21:39 +0100)] 
lib/util: use better linux os detection in gpfs configure

Guenther

Signed-off-by: Guenther Deschner <gd@samba.org>
Reviewed-by: Christof Schmitt cs@samba.org
Autobuild-User(master): Günther Deschner <gd@samba.org>
Autobuild-Date(master): Tue Jan 28 18:05:34 UTC 2020 on sn-devel-184

5 years agoctdb-tests: Enable job control when keeping stdin open
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

5 years agoctdb-tests: Don't close stdin when starting local daemons
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>
5 years agoctdb-daemon: Shut down if interactive and stdin is closed
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>
5 years agoctdb-daemon: Only stop monitoring if it has been initialised
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>
5 years agolib:util: Log mkdir error on correct debug levels
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

5 years agoselftest: Convert Samba3::provision() to named parameters
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>
5 years agoselftest: Factor out create_file_chmod()
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>
5 years agokrb5-wrap: deal with different krb5_trace_info struct flavors (earlier MIT krb5 releases)
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

5 years agonsswitch:tests: Add test to check correct group lookup with samlogon cache
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

5 years agoselftest: Make 'Samba Users' the primary group of joe
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>
5 years agoselftest: Add a group 'Samba Users'
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>
5 years agoselftest: Add user joe
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>
5 years agonsswitch: Fix username in wbinfo -K output
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>
5 years agotdb: Align integer types
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

5 years agodbwrap: Do direct struct initalization in db_ctdb_store_db_seqnum()
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>
5 years agolibrpc: Use PRIu32 printf specifiers
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>
5 years agosmbclient: Fix a typo
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>
5 years agolibrpc: Use the MAX() macro where appropriate
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>
5 years agolibrpc: Fix a gcc warning
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>
5 years agosmbd: Call string_term_tdb_data() once instead of 6 times
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>
5 years agos3: lib: nmblib. Clean up and harden nmb packet processing.
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

5 years agovfs_gpfs: Preserve errno across unbecome_root call
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>
5 years agosmbd: Remove unused define
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>
5 years agosmbd: Remove unused function linux_set_lease_capability
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>
5 years agovfs_gpfs: Cleanup lease mapping function
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>
5 years agovfs_gpfs: Change lease helper function to only provide mapping
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>
5 years agovfs_gpfs: Remove function call from "if" statement
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>
5 years agovfs_gpfs: Reformat function definition of vfs_gpfs_setlease
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>
5 years agovfs_gpfs: Remove call to linux_set_lease_capability
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>
5 years agoscript/release.sh: make it possible to run from a git worktree
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>
5 years agoWHATSNEW: Start release notes for Samba 4.13.0pre1.
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

5 years agoVERSION: Bump version up to 4.13.0pre1...
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>
5 years agoVERSION: Disable GIT_SNAPSHOT for the 4.12.0rc1 release... samba-4.12.0rc1
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>
5 years agoWHATSNEW: Add release note for Samba 4.12.0rc1.
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>
5 years agosamba-tool group addmembers: avoid python traceback on member add failure
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>
5 years agoselftest: add test for samba-tool groupmember --member-base-dn option
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>
5 years agoselftest: add tests for samba-tool group addmembers --object-types option
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>
5 years agoselftest: add test for new samba-tool group addmembers --member-dn option
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>
5 years agosamba-tool group addmembers: add --member-base-dn option for group member search
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>
5 years agosamba-tool group {add,remove}members: allow to use --member-dn in combination with...
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>
5 years agosamba-tool group removemembers: adapt functionality to addmembers command
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>
5 years agosamba-tool group addmembers: add --member-dn option
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>
5 years agosamba-tool group addmembers: add new option --object-types
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>
5 years agopython/samdb: validation of group member types for group member filter
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>
5 years agopython/samdb: add type "all" to search for all common types of group members
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>
5 years agopython/samdb: adapt search filter for group object type
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>
5 years agopython/samdb: adapt search filter for user object type
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>
5 years agopython/samdb: add 'computer' to the default group member types for group member filters
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>
5 years agopython/samdb: fetch specific error if there are more than one search results
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>
5 years agopython/samdb: add more object types for adding/remove group members
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>
5 years agopython/samdb: add option to specify types of group members
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>
5 years agosamba-tool tests: add test-case for 'ou list --base-dn'
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>
5 years agosamba-tool: add -b/--base-dn option to OUs list command
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>
5 years agosamba-tool tests: add test-case for 'user list --base-dn'
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>
5 years agosamba-tool: add -b/--base-dn option to users list command
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>
5 years agosamba-tool tests: add test-case for 'contact list --base-dn'
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>
5 years agosamba-tool: add -b/--base-dn option to contacts list command
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>
5 years agosamba-tool tests: add test-case for 'computer list --base-dn'
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>
5 years agosamba-tool: add -b/--base-dn option to computer list command
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>
5 years agosamba-tool tests: add test-case for 'group list --base-dn'
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>
5 years agosamba-tool: add -b/--base-dn option to groups list command
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>
5 years agosamba-tool tests: add test-case for 'user getgrouops --full-dn'
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>
5 years agosamba-tool: add --full-dn option for user getgroups command
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>
5 years agosamba-tool tests: add test-case for 'group listmembers --full-dn'
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>
5 years agosamba-tool: add --full-dn option to group listmembers command
Jule Anger [Thu, 22 Aug 2019 13:39:37 +0000 (15:39 +0200)] 
samba-tool: add --full-dn option to group listmembers command

With this option the command lists the groupmembers distinguished names
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>
5 years agosamba-tool tests: add test case for 'user list --full-dn'
Jule Anger [Wed, 28 Aug 2019 08:40:39 +0000 (10:40 +0200)] 
samba-tool tests: add test case for 'user list --full-dn'

Check if the --full-dn option 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>
5 years agosamba-tool: add --full-dn option to user list command
Jule Anger [Thu, 22 Aug 2019 07:30:21 +0000 (09:30 +0200)] 
samba-tool: add --full-dn option to user list command

With this option the command lists the users distringuished names
instead of the sAMAccountNames.

Signed-off-by: Jule Anger <ja@sernet.de>
Reviewed-by: Björn Baumbach <bb@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
5 years agosamba-tool tests: add test case for 'computer list --full-dn'
Jule Anger [Tue, 27 Aug 2019 11:05:03 +0000 (13:05 +0200)] 
samba-tool tests: add test case for 'computer list --full-dn'

Check if the --full-dn option 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>
5 years agosamba-tool: add --full-dn option to computer list command
Jule Anger [Thu, 22 Aug 2019 07:12:31 +0000 (09:12 +0200)] 
samba-tool: add --full-dn option to computer list command

With this option the command lists the computers distringuished names
instead of the sAMAccountNames.

Signed-off-by: Jule Anger <ja@sernet.de>
Reviewed-by: Björn Baumbach <bb@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
5 years agosamba-tool tests: Add test-case for 'group list --full-dn'
Jule Anger [Tue, 27 Aug 2019 09:49:12 +0000 (11:49 +0200)] 
samba-tool tests: Add test-case for 'group list --full-dn'

Check if the --full-dn option 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>
5 years agosamba-tool: add --full-dn option to group list command
Björn Baumbach [Mon, 12 Aug 2019 18:43:48 +0000 (20:43 +0200)] 
samba-tool: add --full-dn option to group list command

With this option the command lists the groups distringuished names
instead of the sAMAccountNames.

Signed-off-by: Björn Baumbach <bb@sernet.de>
Reviewed-by: Ralph Boehme <slow@samba.org>
5 years agoRevert "vfs_glusterfs: Return fake fd from pipe() during open"
David Disseldorp [Tue, 21 Jan 2020 10:32:50 +0000 (11:32 +0100)] 
Revert "vfs_glusterfs: Return fake fd from pipe() during open"

This reverts commit c9adf47ac5a5aa0dd12572c34b08cc51f15b2e97.
The fake fd is no longer necessary, as vfs_glusterfs now provides a
fcntl_fn hook.

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

Signed-off-by: David Disseldorp <ddiss@samba.org>
Reviewed-by: Guenther Deschner <gd@samba.org>
5 years agovfs_glusterfs: add .fcntl_fn hook
David Disseldorp [Tue, 21 Jan 2020 00:14:38 +0000 (01:14 +0100)] 
vfs_glusterfs: add .fcntl_fn hook

This hook is currently called via vfs_set_blocking(), so can safely be
ignored.

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

Signed-off-by: David Disseldorp <ddiss@samba.org>
Reviewed-by: Guenther Deschner <gd@samba.org>
5 years agovfs_ceph: add .fcntl_fn hook
David Disseldorp [Tue, 21 Jan 2020 00:12:42 +0000 (01:12 +0100)] 
vfs_ceph: add .fcntl_fn hook

This hook is currently called via vfs_set_blocking(), so can safely be
ignored.

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

Signed-off-by: David Disseldorp <ddiss@samba.org>
Reviewed-by: Guenther Deschner <gd@samba.org>
5 years agotestenv: No "mktemp" for in_screen
Volker Lendecke [Mon, 20 Jan 2020 20:28:18 +0000 (21:28 +0100)] 
testenv: No "mktemp" for in_screen

We don't use this

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
5 years agotestenv: Simplify "in_screen"
Volker Lendecke [Tue, 16 Oct 2018 13:08:25 +0000 (15:08 +0200)] 
testenv: Simplify "in_screen"

We don't need "seq", bash can do that itself, and we assume bash here

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
5 years agotestenv: Properly kill daemons
Volker Lendecke [Mon, 20 Jan 2020 20:22:39 +0000 (21:22 +0100)] 
testenv: Properly kill daemons

Without this, all the daemons were kept around

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
5 years agotestenv: Be more careful deleting environment tmpfiles
Volker Lendecke [Mon, 20 Jan 2020 20:19:40 +0000 (21:19 +0100)] 
testenv: Be more careful deleting environment tmpfiles

If there is more than one server we will have for example nt4_dc.smbd,
nt4_dc.nmbd and nt4_dc.winbind as daemon environments, together with
the commandline environment "nt4_dc" coming last. Before this patch we
would have deleted all previous tmpfiles in the commandline environment.

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
5 years agoWHATSNEW: Add CTDB changes for 4.12
Martin Schwenke [Fri, 20 Dec 2019 07:16:13 +0000 (18:16 +1100)] 
WHATSNEW: Add CTDB changes for 4.12

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): Tue Jan 21 13:05:00 UTC 2020 on sn-devel-184

5 years agoctdb-mutex: Change default re-check time for fcntl helper to 5s
Martin Schwenke [Fri, 10 Jan 2020 03:25:39 +0000 (14:25 +1100)] 
ctdb-mutex: Change default re-check time for fcntl helper to 5s

Testing against a commonly used cluster filesystem has shown no
performance impact, as expected.

Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
5 years agoctdb-tests: Add some tests to check recovery from recovery lock issues
Martin Schwenke [Fri, 10 Jan 2020 04:45:48 +0000 (15:45 +1100)] 
ctdb-tests: Add some tests to check recovery from recovery lock issues

Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
5 years agoctdb-tests: Put recovery lock for local daemons into a subdirectory
Martin Schwenke [Fri, 10 Jan 2020 03:04:14 +0000 (14:04 +1100)] 
ctdb-tests: Put recovery lock for local daemons into a subdirectory

This makes it more like the way it works with a cluster filesystem.
It also allows the subdirectory to be manipulated in tests.

Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
5 years agoctdb-tests: Add local_daemons.sh option for recovery lock recheck interval
Martin Schwenke [Fri, 17 Jan 2020 04:30:01 +0000 (15:30 +1100)] 
ctdb-tests: Add local_daemons.sh option for recovery lock recheck interval

Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
5 years agoCVE-2019-19344 kcc dns scavenging: Fix use after free in dns_tombstone_records_zone
Gary Lockyer [Mon, 16 Dec 2019 00:57:47 +0000 (13:57 +1300)] 
CVE-2019-19344 kcc dns scavenging: Fix use after free in dns_tombstone_records_zone

ldb_msg_add_empty reallocates the underlying element array, leaving
old_el pointing to freed memory.

This patch takes two defensive copies of the ldb message, and performs
the updates on them rather than the ldb messages in the result.

Bug: https://bugzilla.samba.org/show_bug.cgi?id=14050

Signed-off-by: Gary Lockyer <gary@catalyst.net.nz>
Autobuild-User(master): Karolin Seeger <kseeger@samba.org>
Autobuild-Date(master): Tue Jan 21 11:38:38 UTC 2020 on sn-devel-184

5 years agoCVE-2019-14907 lib/util: Do not print the failed to convert string into the logs
Andrew Bartlett [Fri, 29 Nov 2019 07:58:47 +0000 (20:58 +1300)] 
CVE-2019-14907 lib/util: Do not print the failed to convert string into the logs

The string may be in another charset, or may be sensitive and
certainly may not be terminated.  It is not safe to just print.

Found by Robert Święcki using a fuzzer he wrote for smbd.

BUG: https://bugzilla.samba.org/show_bug.cgi?id=14208
Signed-off-by: Andrew Bartlett <abartlet@samba.org>
5 years agorepl_meta_data: Only reset replMetaData entry for name if we made a conflict name...
Andrew Bartlett [Fri, 6 Dec 2019 05:26:11 +0000 (18:26 +1300)] 
repl_meta_data: Only reset replMetaData entry for name if we made a conflict name here

We previously set it for any rename

Signed-off-by: Andrew Bartlett <abartlet@samba.org>
5 years agorepl_meta_data: Do not set *rename = true unless there has been a conflict on the...
Andrew Bartlett [Fri, 6 Dec 2019 05:15:16 +0000 (18:15 +1300)] 
repl_meta_data: Do not set *rename = true unless there has been a conflict on the incoming DN

The normal case of a partner-sent rename is not a cause for updating the replPropertyMetaData

Signed-off-by: Andrew Bartlett <abartlet@samba.org>
5 years agorepl_meta_data: Add comment explaining what is being renamed after the conflict is...
Andrew Bartlett [Fri, 6 Dec 2019 04:55:13 +0000 (17:55 +1300)] 
repl_meta_data: Add comment explaining what is being renamed after the conflict is resolved

Signed-off-by: Andrew Bartlett <abartlet@samba.org>
5 years agoCVE-2019-14902 dsdb: Change basis of descriptor module deferred processing to be...
Andrew Bartlett [Thu, 12 Dec 2019 01:44:57 +0000 (14:44 +1300)] 
CVE-2019-14902 dsdb: Change basis of descriptor module deferred processing to be GUIDs

We can not process on the basis of a DN, as the DN may have changed in a rename,
not only that this module can see, but also from repl_meta_data below.

Therefore remove all the complex tree-based change processing, leaving only
a tree-based sort of the possible objects to be changed, and a single
stopped_dn variable containing the DN to stop processing below (after
a no-op change).

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

Signed-off-by: Andrew Bartlett <abartlet@samba.org>