Uri Simchoni [Wed, 27 Jan 2016 06:12:20 +0000 (08:12 +0200)]
quotas: small cleanup
Remove an internal function from proto.h
Signed-off-by: Uri Simchoni <uri@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
Volker Lendecke [Fri, 12 Aug 2016 11:18:19 +0000 (13:18 +0200)]
ctdb: Fix the O3 developer build on RHEL7
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): Sat Aug 13 00:55:02 CEST 2016 on sn-devel-144
Volker Lendecke [Tue, 9 Aug 2016 09:38:43 +0000 (11:38 +0200)]
vfs_gpfs: Load nfs4 acl params at tcon time
This reduces user-space CPU for metadata intensive workloads, lp_parm_* is
expensive doing lots of strwicmp.
Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
Autobuild-User(master): Ralph Böhme <slow@samba.org>
Autobuild-Date(master): Fri Aug 12 21:03:36 CEST 2016 on sn-devel-144
Volker Lendecke [Tue, 9 Aug 2016 09:31:12 +0000 (11:31 +0200)]
nfs4acls: Allow nfs4 acl params to be set by callers
Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
Volker Lendecke [Tue, 9 Aug 2016 09:28:30 +0000 (11:28 +0200)]
nfs4acls: Make smbacl4_vfs_params public
vfs_gpfs & others will be able to embed this structure in their special config.
We could have gone with an anonymous struct and a talloc'ed object, but for my
taste this is specialized and hidden enough that it's not worth the
indirection.
Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
Volker Lendecke [Tue, 9 Aug 2016 09:07:38 +0000 (11:07 +0200)]
nfs4acls: Add "smbacl4_vfs_params" parameter to smb_set_nt_acl_nfs4
Pure placeholder right now, this will allow vfs modules to load the params in
advance
Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
Volker Lendecke [Tue, 9 Aug 2016 09:07:38 +0000 (11:07 +0200)]
nfs4acls: Add "smbacl4_vfs_params" parameter to smb_get_nt_acl_nfs4
Pure placeholder right now, this will allow vfs modules to load the params in
advance
Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
Volker Lendecke [Tue, 9 Aug 2016 09:07:38 +0000 (11:07 +0200)]
nfs4acls: Add "smbacl4_vfs_params" parameter to smb_fget_nt_acl_nfs4
Pure placeholder right now, this will allow vfs modules to load the params
in advance. nfs4 acl parameters should not change while a tcon is live,
and lp_parm_get_* show up in profiles. Loading the parameters once at
tcon time will remove this.
Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
Volker Lendecke [Tue, 9 Aug 2016 07:10:19 +0000 (09:10 +0200)]
nfs4acls: Add some const
Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
Volker Lendecke [Tue, 9 Aug 2016 07:07:13 +0000 (09:07 +0200)]
nfs4acls: Remove a typedef
Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
Douglas Bagnall [Thu, 11 Aug 2016 23:50:07 +0000 (11:50 +1200)]
KCC: Fix misnamed variable in DSA object
Found by Garming. Unlikely to affect anyone.
BUG: https://bugzilla.samba.org/show_bug.cgi?id=12143
Pair-programmed-with: Garming Sam <garming@catalyst.net.nz>
Signed-off-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
Signed-off-by: Garming Sam <garming@catalyst.net.nz>
Autobuild-User(master): Douglas Bagnall <dbagnall@samba.org>
Autobuild-Date(master): Fri Aug 12 08:20:31 CEST 2016 on sn-devel-144
Volker Lendecke [Sun, 31 Jul 2016 05:42:21 +0000 (07:42 +0200)]
lib: Use replace.h properly in pthreadpool
Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
Autobuild-User(master): Jeremy Allison <jra@samba.org>
Autobuild-Date(master): Fri Aug 12 04:26:09 CEST 2016 on sn-devel-144
Amitay Isaacs [Tue, 2 Aug 2016 09:06:10 +0000 (19:06 +1000)]
ctdb-pmda: Use 1s timeout for fetching statistics
BUG: https://bugzilla.samba.org/show_bug.cgi?id=12138
Signed-off-by: Amitay Isaacs <amitay@gmail.com>
Reviewed-by: Jeremy Allison <jra@samba.org>
Volker Lendecke [Thu, 11 Aug 2016 13:46:49 +0000 (15:46 +0200)]
ldb: Fix some signed/unsigned hickups
Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
Autobuild-User(master): Jeremy Allison <jra@samba.org>
Autobuild-Date(master): Thu Aug 11 23:49:38 CEST 2016 on sn-devel-144
Jeremy Allison [Wed, 10 Aug 2016 21:42:07 +0000 (14:42 -0700)]
s3: oplock: Fix race condition when closing an oplocked file.
We must send the 'oplock released' message whilst the lock
is held in the close path. Otherwise the messaged smbd can
race with the share mode delete.
BUG: https://bugzilla.samba.org/show_bug.cgi?id=12139
Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Volker Lendecke <vl@samba.org>
Jeremy Allison [Wed, 10 Aug 2016 21:39:52 +0000 (14:39 -0700)]
smbd: oplock: Factor out internals of remove_oplock() into new remove_oplock_under_lock().
Allows this to be called elsewhere.
BUG: https://bugzilla.samba.org/show_bug.cgi?id=12139
Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Volker Lendecke <vl@samba.org>
Jeremy Allison [Wed, 10 Aug 2016 21:35:42 +0000 (14:35 -0700)]
smbd: oplock: Fixup debug messages inside remove_oplock().
BUG: https://bugzilla.samba.org/show_bug.cgi?id=12139
Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Volker Lendecke <vl@samba.org>
Stefan Metzmacher [Wed, 10 Aug 2016 10:44:26 +0000 (12:44 +0200)]
script/autobuild.py: include the branch name in the output
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Michael Adam <obnox@samba.org>
Autobuild-User(master): Michael Adam <obnox@samba.org>
Autobuild-Date(master): Thu Aug 11 08:38:47 CEST 2016 on sn-devel-144
Stefan Metzmacher [Sat, 6 Aug 2016 08:33:49 +0000 (10:33 +0200)]
selftest/flapping: add some samba3.blackbox.smbclient_s3 tests
BUG: https://bugzilla.samba.org/show_bug.cgi?id=12108
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
Autobuild-User(master): Jeremy Allison <jra@samba.org>
Autobuild-Date(master): Thu Aug 11 04:42:30 CEST 2016 on sn-devel-144
Stefan Metzmacher [Fri, 5 Aug 2016 20:06:41 +0000 (22:06 +0200)]
Revert "s4: tests: Skip drs tests."
This reverts commit
08d03f79de49826dc5dff3bc09193f1404e5f549.
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
Andrew Bartlett [Tue, 2 Aug 2016 03:45:18 +0000 (15:45 +1200)]
selftest: Move repl_schema test to a distinct OID prefix
We also take the chance to make it clearer that the number
being passed in should be unique.
BUG: https://bugzilla.samba.org/show_bug.cgi?id=12128
Signed-off-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
Andrew Bartlett [Tue, 2 Aug 2016 02:28:12 +0000 (14:28 +1200)]
s4:dsdb/repl_meta_data: Add more info on which DN we failed to find an attid on
BUG: https://bugzilla.samba.org/show_bug.cgi?id=12128
Signed-off-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
Stefan Metzmacher [Mon, 8 Aug 2016 07:10:48 +0000 (09:10 +0200)]
s4:dsdb/repl: let dsdb_replicated_objects_convert() change remote to local attid for linked attributes
We already do that for objects in dsdb_convert_object_ex().
We need to be consistent and do the same for linked attributes.
BUG: https://bugzilla.samba.org/show_bug.cgi?id=12128
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
Stefan Metzmacher [Mon, 8 Aug 2016 10:11:53 +0000 (12:11 +0200)]
s4:dsdb/repl: set working_schema->resolving_in_progress during schema creation
BUG: https://bugzilla.samba.org/show_bug.cgi?id=12128
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
Stefan Metzmacher [Mon, 8 Aug 2016 07:10:13 +0000 (09:10 +0200)]
s4:dsdb/schema: move messages for unknown attids to higher debug levels during resolving
BUG: https://bugzilla.samba.org/show_bug.cgi?id=12128
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
Stefan Metzmacher [Mon, 8 Aug 2016 07:10:13 +0000 (09:10 +0200)]
s4:dsdb/schema: split out a dsdb_attribute_drsuapi_remote_to_local() function
BUG: https://bugzilla.samba.org/show_bug.cgi?id=12128
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
Stefan Metzmacher [Mon, 8 Aug 2016 09:22:13 +0000 (11:22 +0200)]
s4:dsdb/schema: don't update the in memory schema->prefixmap without reloading the schema!
BUG: https://bugzilla.samba.org/show_bug.cgi?id=12128
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
Stefan Metzmacher [Mon, 8 Aug 2016 09:11:20 +0000 (11:11 +0200)]
s4:dsdb/schema: avoid an implicit prefix map creation in lookup functions
dsdb_create_prefix_mapping() should be the only place that calls
dsdb_schema_pfm_make_attid().
BUG: https://bugzilla.samba.org/show_bug.cgi?id=12128
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
Stefan Metzmacher [Mon, 8 Aug 2016 11:02:21 +0000 (13:02 +0200)]
s4:dsdb/objectclass_attrs: call dsdb_attribute_from_ldb() without a prefixmap
We may not have a prefix mapping for the new attribute definition,
it will be added later.
BUG: https://bugzilla.samba.org/show_bug.cgi?id=12128
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
Stefan Metzmacher [Mon, 8 Aug 2016 09:07:18 +0000 (11:07 +0200)]
s4:dsdb/repl: make sure the working_schema prefix map is populated with the remote prefix map
We should create the working_schema prefix map before we try to
resolve the schema. This allows getting the same mapping (if there's not already
a conflict) and allows us to remove the implicit prefix mapping creation
in the prefix mapping lookup functions.
BUG: https://bugzilla.samba.org/show_bug.cgi?id=12128
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
Stefan Metzmacher [Mon, 8 Aug 2016 09:00:02 +0000 (11:00 +0200)]
s4:dsdb/schema: make dsdb_schema_pfm_add_entry() public and more useful
We allow a hint for the id from the remote prefix map.
BUG: https://bugzilla.samba.org/show_bug.cgi?id=12128
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
Andrew Bartlett [Thu, 4 Aug 2016 03:25:52 +0000 (15:25 +1200)]
s4:dsdb/schema: Remove unused old schema from memory
This avoids confusion when reading the talloc dump from a ldb context that has
been the target of replication, as the dsdb_schema_copy_shallow() memory was
still around, if unused.
BUG: https://bugzilla.samba.org/show_bug.cgi?id=12115
Signed-off-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
Andrew Bartlett [Thu, 4 Aug 2016 03:20:27 +0000 (15:20 +1200)]
s4:dsdb/repl: Improve memory handling in replicated schema code
This attempts to make it clear what memory is short term and what memory is long term
BUG: https://bugzilla.samba.org/show_bug.cgi?id=12115
Signed-off-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
Stefan Metzmacher [Thu, 4 Aug 2016 09:00:34 +0000 (11:00 +0200)]
s4:dsdb/schema: don't treat an older remote schema as SCHEMA_MISMATCH
It's perfectly valid to replicate from a partner with an older schema
version, otherwise schema changes would block any other replication
until every dc in the forest has the schema changes.
The avoids an endless loop trying to get schema in sync with the partner.
BUG: https://bugzilla.samba.org/show_bug.cgi?id=12115
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
Stefan Metzmacher [Thu, 4 Aug 2016 08:03:14 +0000 (10:03 +0200)]
s4:dsdb/schema: store struct dsdb_schema_info instead of a hexstring
This will simplify the schema checking in future.
BUG: https://bugzilla.samba.org/show_bug.cgi?id=12115
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
Stefan Metzmacher [Fri, 5 Aug 2016 09:05:37 +0000 (11:05 +0200)]
s4:dsdb/repl: avoid recursion after fetching schema changes.
BUG: https://bugzilla.samba.org/show_bug.cgi?id=12115
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
Stefan Metzmacher [Thu, 4 Aug 2016 21:04:32 +0000 (23:04 +0200)]
s4:dsdb/schema: don't change schema->schema_info on originating schema changes.
The next reload will take care of it.
BUG: https://bugzilla.samba.org/show_bug.cgi?id=12114
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
Anoop C S [Wed, 10 Aug 2016 14:23:09 +0000 (19:53 +0530)]
Fix a typo in smb.conf man page
Signed-off-by: Anoop C S <anoopcs@redhat.com>
Reviewed-by: Michael Adam <obnox@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
Autobuild-User(master): Ralph Böhme <slow@samba.org>
Autobuild-Date(master): Wed Aug 10 20:11:54 CEST 2016 on sn-devel-144
Uri Simchoni [Wed, 10 Aug 2016 02:00:23 +0000 (05:00 +0300)]
selftest: add a test for new "inherit owner" option
Add a test for the "unix only" option of "inherit owner"
smb.conf parameter.
Signed-off-by: Uri Simchoni <uri@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
Autobuild-User(master): Uri Simchoni <uri@samba.org>
Autobuild-Date(master): Wed Aug 10 11:25:52 CEST 2016 on sn-devel-144
Uri Simchoni [Tue, 2 Aug 2016 06:37:00 +0000 (09:37 +0300)]
smbd: add an option to inherit only the UNIX owner
This can be used to emulate folder quotas, as explained in the
modified manpage.
Signed-off-by: Uri Simchoni <uri@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
Uri Simchoni [Wed, 10 Aug 2016 01:58:45 +0000 (04:58 +0300)]
selftest: add a test for "inherit owner" parameter
Signed-off-by: Uri Simchoni <uri@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
Jeremy Allison [Tue, 9 Aug 2016 18:57:20 +0000 (11:57 -0700)]
libgpo: Correctly use the 'server' parameter after parsing it out of the GPO path.
BUG: https://bugzilla.samba.org/show_bug.cgi?id=12135
Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Uri Simchoni <uri@samba.org>
Jeremy Allison [Mon, 8 Aug 2016 23:53:21 +0000 (16:53 -0700)]
s3: libsmb: Protect cli_connect_nb_send() from being passed a NULL hostname and dest_ss.
BUG: https://bugzilla.samba.org/show_bug.cgi?id=12135
Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Uri Simchoni <uri@samba.org>
Amitay Isaacs [Tue, 2 Aug 2016 08:22:13 +0000 (18:22 +1000)]
ctdb-ib: Fix DEBUG log messages
https://bugzilla.samba.org/show_bug.cgi?id=12137
Signed-off-by: Amitay Isaacs <amitay@gmail.com>
Reviewed-by: Uri Simchoni <uri@samba.org>
Amitay Isaacs [Tue, 2 Aug 2016 09:04:17 +0000 (19:04 +1000)]
ctdb-recovery-helper: Fix format-nonliteral warning
... and printf format errors.
BUG: https://bugzilla.samba.org/show_bug.cgi?id=12137
Signed-off-by: Amitay Isaacs <amitay@gmail.com>
Reviewed-by: Uri Simchoni <uri@samba.org>
Amitay Isaacs [Tue, 2 Aug 2016 09:00:54 +0000 (19:00 +1000)]
ctdb-daemon: Fix format-nonliteral warning
BUG: https://bugzilla.samba.org/show_bug.cgi?id=12137
Signed-off-by: Amitay Isaacs <amitay@gmail.com>
Reviewed-by: Uri Simchoni <uri@samba.org>
Amitay Isaacs [Tue, 2 Aug 2016 08:58:51 +0000 (18:58 +1000)]
ctdb-daemon: Fix format-nonliteral warning
BUG: https://bugzilla.samba.org/show_bug.cgi?id=12137
Signed-off-by: Amitay Isaacs <amitay@gmail.com>
Reviewed-by: Uri Simchoni <uri@samba.org>
Amitay Isaacs [Tue, 2 Aug 2016 08:54:31 +0000 (18:54 +1000)]
ctdb-daemon: Fix format-nonliteral warning
BUG: https://bugzilla.samba.org/show_bug.cgi?id=12137
Signed-off-by: Amitay Isaacs <amitay@gmail.com>
Reviewed-by: Uri Simchoni <uri@samba.org>
Amitay Isaacs [Tue, 2 Aug 2016 08:31:14 +0000 (18:31 +1000)]
ctdb-common: Fix format-nonliteral warning
BUG: https://bugzilla.samba.org/show_bug.cgi?id=12137
Signed-off-by: Amitay Isaacs <amitay@gmail.com>
Reviewed-by: Uri Simchoni <uri@samba.org>
Amitay Isaacs [Mon, 1 Aug 2016 04:23:23 +0000 (14:23 +1000)]
ctdb-tests: Log errors if the test fails
Signed-off-by: Amitay Isaacs <amitay@gmail.com>
Reviewed-by: Martin Schwenke <martin@meltin.net>
Autobuild-User(master): Martin Schwenke <martins@samba.org>
Autobuild-Date(master): Wed Aug 10 08:17:13 CEST 2016 on sn-devel-144
Amitay Isaacs [Mon, 8 Aug 2016 04:13:30 +0000 (14:13 +1000)]
resolv_wrapper: Update config variable name to match the code
Signed-off-by: Amitay Isaacs <amitay@gmail.com>
Reviewed-by: Andreas Schneider <asn@samba.org>
Autobuild-User(master): Andreas Schneider <asn@cryptomilk.org>
Autobuild-Date(master): Tue Aug 9 18:20:00 CEST 2016 on sn-devel-144
Amitay Isaacs [Mon, 8 Aug 2016 04:09:10 +0000 (14:09 +1000)]
nss_wrapper: Add missing check for printf format validation
Signed-off-by: Amitay Isaacs <amitay@gmail.com>
Reviewed-by: Andreas Schneider <asn@samba.org>
Amitay Isaacs [Sun, 7 Aug 2016 07:56:51 +0000 (17:56 +1000)]
dbwrap: Fix structure initialization
Bug: https://bugzilla.samba.org/show_bug.cgi?id=12134
Signed-off-by: Amitay Isaacs <amitay@gmail.com>
Reviewed-by: Volker Lendecke <vl@samba.org>
Autobuild-User(master): Volker Lendecke <vl@samba.org>
Autobuild-Date(master): Tue Aug 9 15:15:43 CEST 2016 on sn-devel-144
Uri Simchoni [Tue, 5 Jul 2016 03:07:04 +0000 (06:07 +0300)]
selftest: tests for kerberos encryption types
This test uses tshark and cwrap's packet capturing capability
to observe the Kerberos handshakes and ensure the correct
encryption types are being used.
Signed-off-by: Uri Simchoni <uri@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
Autobuild-User(master): Jeremy Allison <jra@samba.org>
Autobuild-Date(master): Tue Aug 9 07:43:52 CEST 2016 on sn-devel-144
Uri Simchoni [Mon, 4 Jul 2016 06:50:33 +0000 (09:50 +0300)]
heimdal: honor conf enctypes when obtaining a service ticket
This patch removes part of what's categorized in the code as
"hideous glue", which causes Heimdal to ignore krb5.conf
encryption types, and instead use either the application-
supplied values or the default compile-time values.
Signed-off-by: Uri Simchoni <uri@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
Uri Simchoni [Mon, 30 May 2016 18:21:41 +0000 (21:21 +0300)]
libads: use "kerberos encryption types" parameter
When creating the custom krb.conf file, list etypes
according to kerberos encryption types
Also use proper directives for heimdal (heimdal recognizes
the MIT etype directives, but does not act upon them)
Signed-off-by: Uri Simchoni <uri@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
Uri Simchoni [Sun, 8 May 2016 12:45:44 +0000 (15:45 +0300)]
s3-param: add kerberos encryption types parameter
Signed-off-by: Uri Simchoni <uri@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
Ralph Boehme [Mon, 8 Aug 2016 14:58:51 +0000 (16:58 +0200)]
dbwrap_ctdb: treat empty records in ltdb as non-existing
When fetching records from remote ctdb nodes via ctdbd_parse() or in
db_ctdb_traverse(), we already check for tombstone records and skip
them. This was originally also done for the ltdb checks.
See also bug: https://bugzilla.samba.org/show_bug.cgi?id=10008
(commit
1cae59ce112ccb51b45357a52b902f80fce1eef1).
Commit
925625b52886d40b50fc631bad8bdc81970f7598 reverted part of the
patch of bug 10008 due to a deadlock it introduced.
This patch re-introduces the consistent treatment of empty records in
the ltdb but avoids the deadlock by correctly signalling
NT_STATUS_NOT_FOUND if an empty record is found authoritatively in
the ltdb and not calling ctdb in this case.
BUG: https://bugzilla.samba.org/show_bug.cgi?id=12005
Pair-Programmed-With: Michael Adam <obnox@samba.org>
Signed-off-by: Ralph Boehme <slow@samba.org>
Signed-off-by: Michael Adam <obnox@samba.org>
Autobuild-User(master): Michael Adam <obnox@samba.org>
Autobuild-Date(master): Tue Aug 9 04:38:44 CEST 2016 on sn-devel-144
Ralph Boehme [Sat, 23 Jul 2016 09:08:13 +0000 (11:08 +0200)]
s4/torture: add a test for ctdb-tombstrone-record deadlock
This tests for a possible deadlock between smbd and ctdb dealing with
ctdb tombstone records.
Commit
925625b52886d40b50fc631bad8bdc81970f7598 explains the deadlock in
more details and contains the fix. It's a fix for a regression
introduced by the patch for bug 10008 (
1cae59ce112c).
If you ever want to use this test against that specific commit:
$ git checkout
925625b52886d40b50fc631bad8bdc81970f7598
$ git cherry-pick THIS_COMMIT
This should not deadlock on a ctdb cluster.
$ git revert
925625b52886d40b50fc631bad8bdc81970f7598
This will deadlock.
Bug: https://bugzilla.samba.org/show_bug.cgi?id=12005
Pair-Programmed-With: Michael Adam <obnox@samba.org>
Signed-off-by: Ralph Boehme <slow@samba.org>
Signed-off-by: Michael Adam <obnox@samba.org>
Ira Cooper [Tue, 26 Jul 2016 15:44:47 +0000 (11:44 -0400)]
buildscripts: Fix the regression with --without-acl-support.
This will disable the vfs_glusterfs and vfs_cephfs modules if
you provide --without-acl-support.
In addition it makes compiling in POSIXACL_XATTR conditional
on vfs_glusterfs or vfs_cephfs being built in.
Signed-off-by: Ira Cooper <ira@samba.org>
Reviewed-by: Steve French <sfrench@samba.org>
Tested-by: Steve French <sfrench@samba.org>
Autobuild-User(master): Ira Cooper <ira@samba.org>
Autobuild-Date(master): Mon Aug 8 21:27:46 CEST 2016 on sn-devel-144
Ira Cooper [Tue, 26 Jul 2016 15:22:43 +0000 (11:22 -0400)]
source3/wscript: Add support for disabling vfs_cephfs
--enable-cephfs and --disable-cephfs both work now.
--enable-cephfs is the default to match previous
versions of Samba.
Signed-off-by: Ira Cooper <ira@samba.org>
Reviewed-by: Steve French <sfrench@samba.org>
Tested-by: Steve French <sfrench@samba.org>
Stefan Metzmacher [Mon, 8 Aug 2016 10:53:26 +0000 (12:53 +0200)]
samba-tool/ldapcmp: ignore differences of whenChanged
This is implicitly replicated, but may diverge on updates of non-replicated
attributes.
BUG: https://bugzilla.samba.org/show_bug.cgi?id=12129
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
Autobuild-User(master): Ralph Böhme <slow@samba.org>
Autobuild-Date(master): Mon Aug 8 17:34:24 CEST 2016 on sn-devel-144
Ralph Boehme [Wed, 20 Jul 2016 10:36:24 +0000 (12:36 +0200)]
smbd: ignore ctdb tombstone records in fetch_share_mode_unlocked_parser()
dbwrap_parse_record() can return ctdb tombstone records from the lctdb,
ignore them.
Bug: https://bugzilla.samba.org/show_bug.cgi?id=12005
Signed-off-by: Ralph Boehme <slow@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
Martin Schwenke [Tue, 2 Aug 2016 20:51:57 +0000 (06:51 +1000)]
ctdb-packaging: Stop RPM from renaming working config to ctdb.rpmsave
The change to ctdbd.conf and removal of /etc/sysconfig/ctdb as a
configuration file makes RPM rename the latter with a .rpmsave suffix.
This means that a working configuration is moved aside on upgrade and
manual intervention is needed.
Avoid this by convincing RPM that the existing /etc/sysconfig/ctdb is
still a configuration file.
BUG: https://bugzilla.samba.org/show_bug.cgi?id=12125
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): Mon Aug 8 11:30:58 CEST 2016 on sn-devel-144
Martin Schwenke [Thu, 28 Jul 2016 02:02:25 +0000 (12:02 +1000)]
ctdb-daemon: Clean up SET_DB_PRIORITY/GET_DB_PRIORITY deprecation
The current message is broken:
Control SET_DB_PRIORITY is not implemented any more, use instead
BUG: https://bugzilla.samba.org/show_bug.cgi?id=12126
Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
Martin Schwenke [Fri, 5 Aug 2016 06:50:58 +0000 (16:50 +1000)]
ctdb-daemon: Fix CID
1125627 Resource leak (RESOURCE_LEAK)
Also fixes CID
1125628.
BUG: https://bugzilla.samba.org/show_bug.cgi?id=12110
Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
Martin Schwenke [Fri, 5 Aug 2016 06:39:50 +0000 (16:39 +1000)]
ctdb-common: Fix CID
1125585 Dereference after null check (FORWARD_NULL)
BUG: https://bugzilla.samba.org/show_bug.cgi?id=12110
Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
Martin Schwenke [Fri, 5 Aug 2016 06:38:45 +0000 (16:38 +1000)]
ctdb-common: Fix CID
1125583 Dereference after null check (FORWARD_NULL)
This also fixes CID
1125584.
BUG: https://bugzilla.samba.org/show_bug.cgi?id=12110
Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
Martin Schwenke [Fri, 5 Aug 2016 06:37:00 +0000 (16:37 +1000)]
ctdb-common: Fix CID
1125581 Dereference after null check (FORWARD_NULL)
This also fixes CID
1125582.
BUG: https://bugzilla.samba.org/show_bug.cgi?id=12110
Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
Martin Schwenke [Thu, 4 Aug 2016 05:58:50 +0000 (15:58 +1000)]
ctdb-tests: Fix CID
1361816 Buffer not null terminated (BUFFER_SIZE_WARNING)
BUG: https://bugzilla.samba.org/show_bug.cgi?id=12110
Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
Martin Schwenke [Thu, 4 Aug 2016 05:50:12 +0000 (15:50 +1000)]
ctdb-common: Fix CID
1363227 Resource leak (RESOURCE_LEAK)
Occurs on an invalid line that isn't the first. Isn't really a leak
because it is allocated off mem_ctx, which should be freed by the
caller.
BUG: https://bugzilla.samba.org/show_bug.cgi?id=12110
Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
Martin Schwenke [Fri, 5 Aug 2016 04:17:01 +0000 (14:17 +1000)]
ctdb-mutex: Avoid corner case where helper is already reparented to init
BUG: https://bugzilla.samba.org/show_bug.cgi?id=12113
Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
Amitay Isaacs [Fri, 5 Aug 2016 02:40:40 +0000 (12:40 +1000)]
ctdb-tools: Use INVALID_GENERATION macro instead of value
Signed-off-by: Amitay Isaacs <amitay@gmail.com>
Reviewed-by: Martin Schwenke <martin@meltin.net>
Martin Schwenke [Tue, 24 Mar 2015 10:04:25 +0000 (21:04 +1100)]
ctdb-doc: Document that "ctdb tickle" can now read from stdin
BUG: https://bugzilla.samba.org/show_bug.cgi?id=12123
Although this has been queued for a while, with changes to add stdin
support to the original ctdb tool, this came for free with the
replacement tool.
addtickle and deltickle also now have this feature. However, they're
internal commands and we're not adding new documentation for
internal/debug commands.
Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
Martin Schwenke [Thu, 4 Aug 2016 05:16:09 +0000 (15:16 +1000)]
ctdb-tools: "ctdb tickle" command should run without daemon
BUG: https://bugzilla.samba.org/show_bug.cgi?id=12123
Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
Amitay Isaacs [Fri, 5 Aug 2016 03:13:08 +0000 (13:13 +1000)]
ctdb-tools: Cancel transaction on error or if commit fails
BUG: https://bugzilla.samba.org/show_bug.cgi?id=12122
Signed-off-by: Amitay Isaacs <amitay@gmail.com>
Reviewed-by: Martin Schwenke <martin@meltin.net>
Amitay Isaacs [Fri, 5 Aug 2016 03:10:28 +0000 (13:10 +1000)]
ctdb-client: transaction_cancel must free transaction handle
BUG: https://bugzilla.samba.org/show_bug.cgi?id=12122
Signed-off-by: Amitay Isaacs <amitay@gmail.com>
Reviewed-by: Martin Schwenke <martin@meltin.net>
Amitay Isaacs [Fri, 5 Aug 2016 03:56:40 +0000 (13:56 +1000)]
ctdb-tools: Free temporary memory context before exiting
BUG: https://bugzilla.samba.org/show_bug.cgi?id=12121
Signed-off-by: Amitay Isaacs <amitay@gmail.com>
Reviewed-by: Martin Schwenke <martin@meltin.net>
Amitay Isaacs [Fri, 5 Aug 2016 03:25:25 +0000 (13:25 +1000)]
ctdb-tools: Close tdb database on error
BUG: https://bugzilla.samba.org/show_bug.cgi?id=12121
Signed-off-by: Amitay Isaacs <amitay@gmail.com>
Reviewed-by: Martin Schwenke <martin@meltin.net>
Amitay Isaacs [Fri, 5 Aug 2016 02:46:18 +0000 (12:46 +1000)]
ctdb-tools: Free connection list after processing it
BUG: https://bugzilla.samba.org/show_bug.cgi?id=12121
Signed-off-by: Amitay Isaacs <amitay@gmail.com>
Reviewed-by: Martin Schwenke <martin@meltin.net>
Martin Schwenke [Fri, 5 Aug 2016 01:27:14 +0000 (11:27 +1000)]
ctdb-tools: Add early return for empty connection list
BUG: https://bugzilla.samba.org/show_bug.cgi?id=12121
If the connection list is empty then process_clist_send() still
creates a request. However, since no subrequests are created for
controls sent, tevent_req_poll() waits forever for an event.
Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
Amitay Isaacs [Fri, 5 Aug 2016 02:43:11 +0000 (12:43 +1000)]
ctdb-tools: Free tickle list before exiting
BUG: https://bugzilla.samba.org/show_bug.cgi?id=12121
Signed-off-by: Amitay Isaacs <amitay@gmail.com>
Reviewed-by: Martin Schwenke <martin@meltin.net>
Amitay Isaacs [Fri, 5 Aug 2016 02:34:13 +0000 (12:34 +1000)]
ctdb-tools: Free record if it does not contain valid data
BUG: https://bugzilla.samba.org/show_bug.cgi?id=12121
Signed-off-by: Amitay Isaacs <amitay@gmail.com>
Reviewed-by: Martin Schwenke <martin@meltin.net>
Amitay Isaacs [Thu, 4 Aug 2016 05:58:34 +0000 (15:58 +1000)]
ctdb-tools: Fix CID
1364706 - resource leak
BUG: https://bugzilla.samba.org/show_bug.cgi?id=12121
Signed-off-by: Amitay Isaacs <amitay@gmail.com>
Reviewed-by: Martin Schwenke <martin@meltin.net>
Amitay Isaacs [Thu, 4 Aug 2016 05:56:23 +0000 (15:56 +1000)]
ctdb-tools: Fix CID
1364705 - resource leak
BUG: https://bugzilla.samba.org/show_bug.cgi?id=12121
Signed-off-by: Amitay Isaacs <amitay@gmail.com>
Reviewed-by: Martin Schwenke <martin@meltin.net>
Amitay Isaacs [Thu, 4 Aug 2016 05:51:39 +0000 (15:51 +1000)]
ctdb-tools: Fix CID
1364704 - resource leak
BUG: https://bugzilla.samba.org/show_bug.cgi?id=12121
Signed-off-by: Amitay Isaacs <amitay@gmail.com>
Reviewed-by: Martin Schwenke <martin@meltin.net>
Amitay Isaacs [Thu, 4 Aug 2016 05:50:38 +0000 (15:50 +1000)]
ctdb-tools: Fix CID
1364703 - resource leak
BUG: https://bugzilla.samba.org/show_bug.cgi?id=12121
Signed-off-by: Amitay Isaacs <amitay@gmail.com>
Reviewed-by: Martin Schwenke <martin@meltin.net>
Amitay Isaacs [Thu, 4 Aug 2016 05:46:33 +0000 (15:46 +1000)]
ctdb-tools: Fix CID
1364702 - resource leak
BUG: https://bugzilla.samba.org/show_bug.cgi?id=12121
Signed-off-by: Amitay Isaacs <amitay@gmail.com>
Reviewed-by: Martin Schwenke <martin@meltin.net>
Amitay Isaacs [Thu, 4 Aug 2016 05:41:57 +0000 (15:41 +1000)]
ctdb-tools: Fix CID
1364701 - resource leak
BUG: https://bugzilla.samba.org/show_bug.cgi?id=12121
Signed-off-by: Amitay Isaacs <amitay@gmail.com>
Reviewed-by: Martin Schwenke <martin@meltin.net>
Amitay Isaacs [Thu, 4 Aug 2016 05:37:33 +0000 (15:37 +1000)]
ctdb-tools: Fix CID
1364699 - dereference after null check
BUG: https://bugzilla.samba.org/show_bug.cgi?id=12121
Signed-off-by: Amitay Isaacs <amitay@gmail.com>
Reviewed-by: Martin Schwenke <martin@meltin.net>
Amitay Isaacs [Thu, 28 Jul 2016 06:21:44 +0000 (16:21 +1000)]
ctdb-tests: Add explicit wait to the fork_helper()
BUG: https://bugzilla.samba.org/show_bug.cgi?id=12109
To create a client process that waits after connect(), instead of trying
to do a blocking write(), go to sleep. The parent can then kill the client
process, once testing is done.
Signed-off-by: Amitay Isaacs <amitay@gmail.com>
Reviewed-by: Martin Schwenke <martin@meltin.net>
Martin Schwenke [Tue, 2 Aug 2016 04:52:14 +0000 (14:52 +1000)]
ctdb-tests: Clean up and rename simple transaction_loop recovery test
* Rename to clarify purpose of test
* Simplify test info to avoid unnecessary bit-rot
* Restart after test since test does heavy database manipulation
BUG: https://bugzilla.samba.org/show_bug.cgi?id=12109
Pair-programmed-with: Amitay Isaacs <amitay@gmail.com>
Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
Martin Schwenke [Tue, 2 Aug 2016 04:50:31 +0000 (14:50 +1000)]
ctdb-tests: Clean up and rename simple transaction_loop test
* Rename to clarify purpose of test
* Simplify test info to avoid unnecessary bit-rot
BUG: https://bugzilla.samba.org/show_bug.cgi?id=12109
Pair-programmed-with: Amitay Isaacs <amitay@gmail.com>
Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
Martin Schwenke [Tue, 2 Aug 2016 05:00:54 +0000 (15:00 +1000)]
ctdb-tests: Implement --interactive/-i option in transaction_loop
Also add PNNs to output.
BUG: https://bugzilla.samba.org/show_bug.cgi?id=12109
Pair-programmed-with: Amitay Isaacs <amitay@gmail.com>
Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
Martin Schwenke [Tue, 2 Aug 2016 04:42:45 +0000 (14:42 +1000)]
ctdb-tests: Clean up and rename simple fetch_ring test
* Rename to clarify purpose of test
* Simplify test info to avoid unnecessary bit-rot
* Have fetch_ring print PNN for clearer output and update patterns in
test script to suit
* Simplify sanity checking pattern due to less data because of
--interactive/-i option
BUG: https://bugzilla.samba.org/show_bug.cgi?id=12109
Pair-programmed-with: Amitay Isaacs <amitay@gmail.com>
Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
Martin Schwenke [Tue, 2 Aug 2016 04:36:45 +0000 (14:36 +1000)]
ctdb-tests: Implement --interactive/-i option in fetch ring
BUG: https://bugzilla.samba.org/show_bug.cgi?id=12109
Pair-programmed-with: Amitay Isaacs <amitay@gmail.com>
Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
Martin Schwenke [Tue, 2 Aug 2016 04:47:39 +0000 (14:47 +1000)]
ctdb-tests: Clean up and rename simple message_ring test
* Rename to clarify purpose of test
* Simplify test info to avoid unnecessary bit-rot
* Have message_ring print PNN for clearer output and update patterns
in test script to suit.
* Drop quantitative percentage check since this is hard to predict
when under extreme load. To compensate, tighten up expectations for
the total number of messages in each direction: at least 10 messages
are required over 10 seconds.
BUG: https://bugzilla.samba.org/show_bug.cgi?id=12109
Pair-programmed-with: Amitay Isaacs <amitay@gmail.com>
Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
Martin Schwenke [Tue, 2 Aug 2016 04:19:18 +0000 (14:19 +1000)]
ctdb-tests: Implement --interactive/-i option in message_ring
BUG: https://bugzilla.samba.org/show_bug.cgi?id=12109
Pair-programmed-with: Amitay Isaacs <amitay@gmail.com>
Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
Martin Schwenke [Tue, 2 Aug 2016 04:16:35 +0000 (14:16 +1000)]
ctdb-tests: Add --interactive/-i option to test options parsing code
BUG: https://bugzilla.samba.org/show_bug.cgi?id=12109
Pair-programmed-with: Amitay Isaacs <amitay@gmail.com>
Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
Jeremy Allison [Thu, 4 Aug 2016 18:09:21 +0000 (11:09 -0700)]
s4: repl: Ensure all error paths in dreplsrv_op_pull_source_get_changes_trigger() are protected with tevent returns.
Otherwise dreplsrv_op_pull_source_get_changes_trigger() could infinitely recurse.
Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Michael Adam <obnox@samba.org>
Autobuild-User(master): Jeremy Allison <jra@samba.org>
Autobuild-Date(master): Sat Aug 6 01:24:05 CEST 2016 on sn-devel-144