ctdb-daemon: Use false instead of 0 for boolean arguments

Signed-off-by: Amitay Isaacs <amitay@gmail.com>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
ctdb-daemon: Simplify code a bit

Signed-off-by: Amitay Isaacs <amitay@gmail.com>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
ctdb-daemon: Allow flag TDB_MUTEX_LOCKING to pass into db_attach

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
ctdb-daemon: Enable robust mutexes only if TDB_MUTEX_LOCKING is defined

Runtime check for robust mutexes is performed just before opening local tdb.

Signed-off-by: Amitay Isaacs <amitay@gmail.com>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
ctdb-daemon: Support per-node robust mutex feature

To enable TDB mutex support, set tunable TDBMutexEnabled=1.

When databases are attached for the first time, attach flags must include
TDB_MUTEX_LOCKING and TDBMutexEnabled must set to enable mutex support.

However, when CTDB attaches databases internally for recovery, it will
enable mutex support if TDBMutexEnabled is set.

Signed-off-by: Amitay Isaacs <amitay@gmail.com>
Reviewed-by: Stefan Metzmacher <metze@samba.org>

Autobuild-User(master): Amitay Isaacs <amitay@samba.org>
Autobuild-Date(master): Wed Jul  9 06:45:17 CEST 2014 on sn-devel-104
s4:dsdb/schema_load: make error message more verbose

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
s4:dsdb/kcc: use SHOW_RECYCLED instead of SHOW_DELETED in when deleting tombstone/deleted objects

SHOW_RECYCLED implies SHOW_DELETED.

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

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
s4:dsdb/extended_dn_in: don't force DSDB_SEARCH_SHOW_RECYCLED

We should take the controls the caller provided when we search
for existing objects.

A search with a basedn of '<GUID=....>' should result in LDB_ERR_NO_SUCH_OBJECT
is the object has isDeleted=TRUE.

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

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
s4:dsdb/repl_meta_data: make sure objectGUID can't be deleted

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

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
dsdb: Set syntax of userParameters to binary string, not unicode string

This means we continue to store the values as given on SAMR, assuming
that the SAMR buffer is little endian.  The syntax for this specific
object is forced to be a binary blob, so that it is not converted on
DRSUAPI.

This commit does not fix existing databases, nor pdb_samba_dsdb (used
by classicupgrade).

Andrew Bartlett

Bug: https://bugzilla.samba.org/show_bug.cgi?id=8077
Change-Id: I10bb6aaecc381194e3c0ce6b9163f961acbdcee1
Pair-Programmed-With: Stefan Metzmacher <metze@samba.org>
Signed-off-by: Andrew Bartlett <abartlet@samba.org>
Signed-off-by: Stefan Metzmacher <metze@samba.org>
dsdb: Always store and return the userParameters as a array of LE 16-bit values

This is not allowed to be odd length, as otherwise we can not send it over the SAMR transport correctly.

Allocating one byte less memory than required causes malloc() heap corruption
and then a crash or lockup of the SAMR server.

Andrew Bartlett

Bug: https://bugzilla.samba.org/show_bug.cgi?id=10130
Change-Id: I5c0c531c1d660141e07f884a4789ebe11c1716f6
Pair-Programmed-With: Stefan Metzmacher <metze@samba.org>
Signed-off-by: Andrew Bartlett <abartlet@samba.org>
Signed-off-by: Stefan Metzmacher <metze@samba.org>
dbcheck: Add check and test for various invalid userParameters values

Bug: https://bugzilla.samba.org/show_bug.cgi?id=8077
Change-Id: I6f2f4169856ce78c62e3a7e74b48520cca9cb9ae
Signed-off-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
s4:dsdb/samldb: don't allow 'userParameters' to be modified over LDAP for now

For now it's safer to reject setting 'userParameters' via LDAP,
as we'll not provide the same behavior as a Windows Server.

If someone requires that feature please report this in the following
bug reports!

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

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>

Autobuild-User(master): Stefan Metzmacher <metze@samba.org>
Autobuild-Date(master): Wed Jul  9 11:07:51 CEST 2014 on sn-devel-104
libwbclient: Call correct function for wbcPingDc2 test

Signed-off-by: Christof Schmitt <cs@samba.org>
Reviewed-by: Volker Lendecke <vl@samba.org>

Autobuild-User(master): Christof Schmitt <cs@samba.org>
Autobuild-Date(master): Wed Jul  9 18:36:08 CEST 2014 on sn-devel-104
s3: libwbclient: Don't break out of loop too soon - find all parameters.

Fix bug #10692: wbcCredentialCache fails if challenge_blob is not first

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

Signed-off-by: Jeremy Allison <jra@samba.org>
s3:smbd: make dptr_ReadDirName() static.

Signed-off-by: Michael Adam <obnox@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
s3:vfs:gpfs: remove extra empty lines.

Signed-off-by: Michael Adam <obnox@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>

Autobuild-User(master): Jeremy Allison <jra@samba.org>
Autobuild-Date(master): Thu Jul 10 02:50:44 CEST 2014 on sn-devel-104