Douglas Bagnall [Sat, 7 Dec 2019 10:22:45 +0000 (23:22 +1300)]
selftest: simplify logic in setup_env
Signed-off-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
Reviewed-by: Gary Lockyer <gary@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Douglas Bagnall [Sun, 2 Feb 2020 07:57:17 +0000 (20:57 +1300)]
selftest: avoid comparison against undefined value
Signed-off-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
Reviewed-by: Gary Lockyer <gary@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Douglas Bagnall [Sat, 7 Dec 2019 10:20:29 +0000 (23:20 +1300)]
selftest/target/samba: do not look for undef environment
Signed-off-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
Reviewed-by: Gary Lockyer <gary@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Douglas Bagnall [Sat, 7 Dec 2019 10:17:26 +0000 (23:17 +1300)]
selftest/target/samba: add missing methods
These methods are being called but have not been provided.
Signed-off-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
Reviewed-by: Gary Lockyer <gary@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Douglas Bagnall [Sat, 7 Dec 2019 10:08:48 +0000 (23:08 +1300)]
selftest/s3: prefer empty string over undef to add nothing to config
To fix a warning.
Signed-off-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
Reviewed-by: Gary Lockyer <gary@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Douglas Bagnall [Sat, 7 Dec 2019 10:05:03 +0000 (23:05 +1300)]
selftest/s3: actually close parent copy of smbd's STDIN
Signed-off-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
Reviewed-by: Gary Lockyer <gary@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Douglas Bagnall [Sat, 7 Dec 2019 09:56:00 +0000 (22:56 +1300)]
selftest/s4: remove illegal function signature
The character ':' has no meaning in function signatures. Perhaps ';' was
intended, which would have marked the later arguments as optional --
which is the default with no signature. All callers always provide all
the arguments anyway.
Signed-off-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
Reviewed-by: Gary Lockyer <gary@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Douglas Bagnall [Sat, 7 Dec 2019 09:48:42 +0000 (22:48 +1300)]
selftest/s4: don't put pcap file in / by default
If the SOCKET_WRAPPER_PCAP_DIR is not defined, let's assume it wasn't
wanted rather than choosing /.
Signed-off-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
Reviewed-by: Gary Lockyer <gary@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Douglas Bagnall [Sat, 7 Dec 2019 09:45:47 +0000 (22:45 +1300)]
selftest/s4: properly initialise an empty hash
The '%ret = {}' construction was bad because '{}' is a hash-ref, which
counts as a single scalar value, but a true hash like '%ret' must be
initialised with an even number of scalar values (usually in pairs, like
'($a => $b, $c => $d)').
I think this meant %ret was initialised as something harmless like
'(<HASH(0x55ce39781278)> => undef)'.
Signed-off-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
Reviewed-by: Gary Lockyer <gary@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Douglas Bagnall [Sat, 7 Dec 2019 09:38:30 +0000 (22:38 +1300)]
selftest: avoid redeclaring perl variables
None of these ones are doing any harm, we just want to silence these
warnings.
Signed-off-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
Reviewed-by: Gary Lockyer <gary@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Douglas Bagnall [Sat, 7 Dec 2019 10:15:00 +0000 (23:15 +1300)]
selftest/target/samba: avoid overwriting $pkinitdir
We were declaring the same variable twice with two different paths,
"$cadir/Users/$pkinitprincipalname" here and
"$ctx->{prefix_abs}/pkinit" about 5 lines down.
Signed-off-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
Reviewed-by: Gary Lockyer <gary@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Douglas Bagnall [Sat, 7 Dec 2019 09:37:00 +0000 (22:37 +1300)]
selftest: enable perl warnings
After this we will see more noise with each test run, and these
warnings will be addressed in following commits.
Signed-off-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
Reviewed-by: Gary Lockyer <gary@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Andrew Bartlett [Sun, 2 Feb 2020 20:51:12 +0000 (09:51 +1300)]
build: Do not check if system perl modules should be bundled
We do not ship any perl modules in third_party at this time, so
this check is pointless and breaks the build for --bundled-libraries=ALL.
As reported by aaptel on https://gitlab.com/samba-team/samba/-/merge_requests/1104#note_281050331
This changes our autobuild script to cover this case in the
samba-static job.
Signed-off-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Gary Lockyer <gary@catalyst.net.nz>
Ralph Wuerthner [Tue, 28 Jan 2020 14:42:03 +0000 (15:42 +0100)]
vfs_gpfs: Remove discard_const_p() from gpfswrap_quotactl() calls
Signed-off-by: Ralph Wuerthner <ralph.wuerthner@de.ibm.com>
Reviewed-by: Christof Schmitt <cs@samba.org>
Reviewed-by: Gary Lockyer <gary@catalyst.net.nz>
Autobuild-User(master): Christof Schmitt <cs@samba.org>
Autobuild-Date(master): Mon Feb 3 21:53:05 UTC 2020 on sn-devel-184
Ralph Wuerthner [Tue, 28 Jan 2020 14:40:46 +0000 (15:40 +0100)]
vfs_gpfs: Remove discard_const_p() from gpfs_putacl() calls
Signed-off-by: Ralph Wuerthner <ralph.wuerthner@de.ibm.com>
Reviewed-by: Christof Schmitt <cs@samba.org>
Reviewed-by: Gary Lockyer <gary@catalyst.net.nz>
Ralph Wuerthner [Tue, 28 Jan 2020 14:33:47 +0000 (15:33 +0100)]
vfs_gpfs: Remove discard_const_p() from gpfswrap_quotactl() calls
Signed-off-by: Ralph Wuerthner <ralph.wuerthner@de.ibm.com>
Reviewed-by: Christof Schmitt <cs@samba.org>
Reviewed-by: Gary Lockyer <gary@catalyst.net.nz>
Ralph Wuerthner [Tue, 28 Jan 2020 13:50:19 +0000 (14:50 +0100)]
gpfswrap: Make pathname "const char *" in gpfswrap_quotactl()
Update wrapper function to match the definition in gpfs.h.
Signed-off-by: Ralph Wuerthner <ralph.wuerthner@de.ibm.com>
Reviewed-by: Christof Schmitt <cs@samba.org>
Reviewed-by: Gary Lockyer <gary@catalyst.net.nz>
Ralph Wuerthner [Tue, 28 Jan 2020 13:46:43 +0000 (14:46 +0100)]
gpfswrap: Make pathname "const char *" in gpfswrap_get_winattrs_path()
Update wrapper function to match the definition in gpfs.h.
Signed-off-by: Ralph Wuerthner <ralph.wuerthner@de.ibm.com>
Reviewed-by: Christof Schmitt <cs@samba.org>
Reviewed-by: Gary Lockyer <gary@catalyst.net.nz>
Ralph Wuerthner [Tue, 28 Jan 2020 13:44:24 +0000 (14:44 +0100)]
gpfswrap: Make pathname "const char *" in gpfswrap_set_winattrs_path()
Update wrapper function to match the definition in gpfs.h.
Signed-off-by: Ralph Wuerthner <ralph.wuerthner@de.ibm.com>
Reviewed-by: Christof Schmitt <cs@samba.org>
Reviewed-by: Gary Lockyer <gary@catalyst.net.nz>
Ralph Wuerthner [Tue, 28 Jan 2020 13:42:01 +0000 (14:42 +0100)]
gpfswrap: Make pathname "const char *" in gpfswrap_get_realfilename_path()
Update wrapper function to match the definition in gpfs.h.
Signed-off-by: Ralph Wuerthner <ralph.wuerthner@de.ibm.com>
Reviewed-by: Christof Schmitt <cs@samba.org>
Reviewed-by: Gary Lockyer <gary@catalyst.net.nz>
Ralph Wuerthner [Tue, 28 Jan 2020 13:39:51 +0000 (14:39 +0100)]
gpfswrap: Make pathname "const char *" in gpfswrap_putacl()
Update wrapper function to match the definition in gpfs.h.
Signed-off-by: Ralph Wuerthner <ralph.wuerthner@de.ibm.com>
Reviewed-by: Christof Schmitt <cs@samba.org>
Reviewed-by: Gary Lockyer <gary@catalyst.net.nz>
Ralph Wuerthner [Tue, 28 Jan 2020 13:34:55 +0000 (14:34 +0100)]
gpfswrap: Make pathname "const char *" in gpfswrap_getacl()
Update wrapper function to match the definition in gpfs.h.
Signed-off-by: Ralph Wuerthner <ralph.wuerthner@de.ibm.com>
Reviewed-by: Christof Schmitt <cs@samba.org>
Reviewed-by: Gary Lockyer <gary@catalyst.net.nz>
Ralph Wuerthner [Fri, 31 Jan 2020 08:51:27 +0000 (09:51 +0100)]
gpfswrap: Remove unused wrapper gpfswrap_getfilesetid()
Signed-off-by: Ralph Wuerthner <ralph.wuerthner@de.ibm.com>
Reviewed-by: Christof Schmitt <cs@samba.org>
Reviewed-by: Gary Lockyer <gary@catalyst.net.nz>
Karolin Seeger [Tue, 28 Jan 2020 10:48:53 +0000 (11:48 +0100)]
script/release.sh: Don't use quotations any longer.
Signed-off-by: Karolin Seeger <kseeger@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
Autobuild-User(master): Karolin Seeger <kseeger@samba.org>
Autobuild-Date(master): Mon Feb 3 12:45:39 UTC 2020 on sn-devel-184
Douglas Bagnall [Sun, 2 Feb 2020 03:05:38 +0000 (16:05 +1300)]
pidl/wscript: configure should insist on Parse::Yapp::Driver
following
83ffe6752d589180eac96d7b8e7d1a54e3476bfd, you get a build
error if you lack a system perl Parse::Yapp. Let's make it a configure
failure instead.
Signed-off-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Autobuild-User(master): Andrew Bartlett <abartlet@samba.org>
Autobuild-Date(master): Sun Feb 2 10:09:11 UTC 2020 on sn-devel-184
Jeremy Allison [Tue, 28 Jan 2020 22:59:46 +0000 (14:59 -0800)]
s3: VFS: Implement create_dfs_pathat() in catia.
Now we use this instead of symlinks to create
DFS links, it's needed in cap.
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): Thu Jan 30 18:21:47 UTC 2020 on sn-devel-184
Jeremy Allison [Tue, 28 Jan 2020 22:42:49 +0000 (14:42 -0800)]
s3: VFS: Implement create_dfs_pathat() in catia.
Now we use this instead of symlinks to create
DFS links, it's needed in catia.
Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
Andreas Schneider [Thu, 30 Jan 2020 15:18:25 +0000 (16:18 +0100)]
s4:torture: Skip the deltest20 as user root
The test is meant to be run as a user and not root.
BUG: https://bugzilla.samba.org/show_bug.cgi?id=14257
Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
Autobuild-User(master): Andreas Schneider <asn@cryptomilk.org>
Autobuild-Date(master): Thu Jan 30 16:54:33 UTC 2020 on sn-devel-184
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
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>
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>
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>
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>
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>
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
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
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>
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
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
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>