nivanova/samba-autobuild/.git
9 years agomessaging3: Remove two procid_str_static calls
Volker Lendecke [Wed, 9 Jul 2014 13:06:45 +0000 (13:06 +0000)]
messaging3: Remove two procid_str_static calls

... and thus implicit talloc_tos() calls

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
9 years agos3:smbd: remove unused client_get_tcp_info()
Stefan Metzmacher [Fri, 23 May 2014 10:40:31 +0000 (12:40 +0200)]
s3:smbd: remove unused client_get_tcp_info()

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Volker Lendecke <vl@samba.org>
Autobuild-User(master): Stefan Metzmacher <metze@samba.org>
Autobuild-Date(master): Thu Jul 24 21:32:17 CEST 2014 on sn-devel-104

9 years agos3:smbd: avoid using client_get_tcp_info()
Stefan Metzmacher [Fri, 23 May 2014 10:37:14 +0000 (12:37 +0200)]
s3:smbd: avoid using client_get_tcp_info()

We already have the required information as stack variable
in the current function. There's no need to call get[peer|sock]name()
twice.

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Volker Lendecke <vl@samba.org>
9 years agotorture: Add FSCTL_QUERY_NETWORK_INTERFACE_INFO torture test case to source4/torture...
Anubhav Rakshit [Wed, 18 Jun 2014 16:34:14 +0000 (22:04 +0530)]
torture: Add FSCTL_QUERY_NETWORK_INTERFACE_INFO torture test case to source4/torture/smb2/ioctl.c

Pair-Programmed-With: Stefan Metzmacher <metze@samba.org>
Signed-off-by: Anubhav Rakshit <anubhav.rakshit@gmail.com>
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Volker Lendecke <vl@samba.org>
9 years agolibrpc: Add NETWORK_INTERFACE_INFO IDL data structure
Anubhav Rakshit [Mon, 16 Jun 2014 10:00:18 +0000 (15:30 +0530)]
librpc: Add NETWORK_INTERFACE_INFO IDL data structure

This is in preparation for adding NETWORK_INTERFACE_INFO Ioctl smbtorture test
case. This data structure is described in MS-SMB2 Sec. 2.2.32.5

Pair-Programmed-With: Stefan Metzmacher <metze@samba.org>
Signed-off-by: Anubhav Rakshit <anubhav.rakshit@gmail.com>
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Volker Lendecke <vl@samba.org>
9 years agotorture4: Use sizeof(char-array) instead of constant
Volker Lendecke [Wed, 23 Jul 2014 11:37:28 +0000 (11:37 +0000)]
torture4: Use sizeof(char-array) instead of constant

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
9 years agos4:torture/smb2: add smb2.session.bind1
Stefan Metzmacher [Tue, 24 Jun 2014 04:40:29 +0000 (06:40 +0200)]
s4:torture/smb2: add smb2.session.bind1

This is a very simple multi-channel test

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Volker Lendecke <vl@samba.org>
9 years agos4:libcli/smb2: add smb2_session_channel()
Stefan Metzmacher [Mon, 23 Jun 2014 22:22:30 +0000 (00:22 +0200)]
s4:libcli/smb2: add smb2_session_channel()

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Volker Lendecke <vl@samba.org>
9 years agos4:libcli/smb2: remove unused 'primary' argument of smb2_session_init()
Stefan Metzmacher [Thu, 10 Jul 2014 06:21:22 +0000 (08:21 +0200)]
s4:libcli/smb2: remove unused 'primary' argument of smb2_session_init()

This also gets rid of a talloc_reference() usage.

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Volker Lendecke <vl@samba.org>
9 years agos3: remove stat_ex.vfs_private completely
Michael Adam [Thu, 17 Jul 2014 15:27:17 +0000 (17:27 +0200)]
s3: remove stat_ex.vfs_private completely

It is not used any more.

Signed-off-by: Michael Adam <obnox@samba.org>
Reviewed-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Christof Schmitt <cs@samba.org>
Autobuild-User(master): Michael Adam <obnox@samba.org>
Autobuild-Date(master): Thu Jul 24 14:23:11 CEST 2014 on sn-devel-104

9 years agos3:vfs:gpfs: remove a block and reduce indentation in gpfs_is_offline()
Michael Adam [Thu, 17 Jul 2014 15:06:32 +0000 (17:06 +0200)]
s3:vfs:gpfs: remove a block and reduce indentation in gpfs_is_offline()

Signed-off-by: Michael Adam <obnox@samba.org>
Reviewed-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Christof Schmitt <cs@samba.org>
9 years agos3:vfs:gpfs: remove all writing uses of stat_ex.vfs_private from vfs_gpfs.
Michael Adam [Thu, 17 Jul 2014 21:35:58 +0000 (23:35 +0200)]
s3:vfs:gpfs: remove all writing uses of stat_ex.vfs_private from vfs_gpfs.

Now that the vfs_private cache is never read in vfs_gpfs, there is
no need any more to write it.

With this change, vfs_gpfs does not use vfs_private any more.

Signed-off-by: Michael Adam <obnox@samba.org>
Reviewed-by: Christof Schmitt <cs@samba.org>
9 years agos3:vfs:gpfs: Remove all reading uses of stat_ex.vfs_private from vfs_gfs.
Michael Adam [Thu, 17 Jul 2014 15:22:09 +0000 (17:22 +0200)]
s3:vfs:gpfs: Remove all reading uses of stat_ex.vfs_private from vfs_gfs.

This was used as a cache for offline-info in the stat buffer.
But as the implementation of gpfs_is_offline() showed, this cache
does not always carry valid information when the stat itself is valid
(since at least one call goes to fstatat() directly, circumventing
 the vfs).

So the correct thing is to always call SMB_VFS_IS_OFFLINE()
when checking whether a file is offline. For the pread and pwrite
calls, we need to call IS_OFFLINE before the actual read
and check afterwards if the file was offline before (as a basis
whether to send notifications).

Signed-off-by: Michael Adam <obnox@samba.org>
Reviewed-by: Christof Schmitt <cs@samba.org>
9 years agoRevert "s3:vfs:gpfs: log when winAttr-garbage is detected (by heuristics) in is_offline"
Michael Adam [Thu, 10 Jul 2014 11:30:51 +0000 (13:30 +0200)]
Revert "s3:vfs:gpfs: log when winAttr-garbage is detected (by heuristics) in is_offline"

This reverts commit 8f44883db94314c007c197927a9dd0809076754d.

The next commits will be removing all access to stat_ex.vfs_private from
vfs_gpfs. This revert of the last addition is a preparation.

Signed-off-by: Michael Adam <obnox@samba.org>
Reviewed-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Christof Schmitt <cs@samba.org>
9 years agoselftest: check for fs specific options of the share dir only after creating it
Michael Adam [Mon, 21 Jul 2014 22:31:16 +0000 (00:31 +0200)]
selftest: check for fs specific options of the share dir only after creating it

Signed-off-by: Michael Adam <obnox@samba.org>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
Autobuild-User(master): Amitay Isaacs <amitay@samba.org>
Autobuild-Date(master): Wed Jul 23 17:37:34 CEST 2014 on sn-devel-104

9 years agoctdb:vacuum: stop vacuuming when the first delete_list traverse fails.
Michael Adam [Wed, 23 Jul 2014 11:34:03 +0000 (13:34 +0200)]
ctdb:vacuum: stop vacuuming when the first delete_list traverse fails.

This indirect caller of delete_marshall_traverse was missed
in fa4a81c86b6073b2563b090aa657d8e8b63c1276
which lets failure of the second travers fail the vacuum run.

Signed-off-by: Michael Adam <obnox@samba.org>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
9 years agoctdb-vacuum: Use existing function ctdb_marshall_finish
Amitay Isaacs [Tue, 6 May 2014 08:52:54 +0000 (18:52 +1000)]
ctdb-vacuum: Use existing function ctdb_marshall_finish

Signed-off-by: Amitay Isaacs <amitay@gmail.com>
Reviewed-by: Volker Lendecke <vl@samba.org>
Autobuild-User(master): Amitay Isaacs <amitay@samba.org>
Autobuild-Date(master): Wed Jul 23 09:44:00 CEST 2014 on sn-devel-104

9 years agoctdb-vacuum: Use ctdb_marshall_add to add a record to marshall buffer
Amitay Isaacs [Tue, 6 May 2014 08:39:25 +0000 (18:39 +1000)]
ctdb-vacuum: Use ctdb_marshall_add to add a record to marshall buffer

This avoids duplicate code and extra talloc in ctdb_marshall_record.

Signed-off-by: Amitay Isaacs <amitay@gmail.com>
Reviewed-by: Volker Lendecke <vl@samba.org>
9 years agoctdb-util: Refactor record marshalling routines to avoid extra talloc
Amitay Isaacs [Tue, 6 May 2014 08:26:41 +0000 (18:26 +1000)]
ctdb-util: Refactor record marshalling routines to avoid extra talloc

Signed-off-by: Amitay Isaacs <amitay@gmail.com>
Reviewed-by: Volker Lendecke <vl@samba.org>
9 years agoctdb-util: Refactor ctdb_marshall_record
Amitay Isaacs [Tue, 22 Jul 2014 11:23:03 +0000 (11:23 +0000)]
ctdb-util: Refactor ctdb_marshall_record

Create new routines ctdb_marshall_record_size and ctdb_marshall_record_copy

Signed-off-by: Amitay Isaacs <amitay@gmail.com>
Reviewed-by: Volker Lendecke <vl@samba.org>
9 years agoctdb-util: Fix nonempty line endings
Amitay Isaacs [Tue, 22 Jul 2014 11:22:25 +0000 (11:22 +0000)]
ctdb-util: Fix nonempty line endings

Signed-off-by: Amitay Isaacs <amitay@gmail.com>
Reviewed-by: Volker Lendecke <vl@samba.org>
9 years agoctdb-vacuum: If talloc_realloc fails, terminate traverse
Amitay Isaacs [Thu, 10 Jul 2014 08:38:13 +0000 (18:38 +1000)]
ctdb-vacuum: If talloc_realloc fails, terminate traverse

Signed-off-by: Amitay Isaacs <amitay@gmail.com>
Reviewed-by: Volker Lendecke <vl@samba.org>
9 years agoctdb-vacuum: Fix talloc hierarchy in delete_marshall_traverse
Amitay Isaacs [Tue, 22 Jul 2014 11:19:13 +0000 (11:19 +0000)]
ctdb-vacuum: Fix talloc hierarchy in delete_marshall_traverse

Signed-off-by: Amitay Isaacs <amitay@gmail.com>
Reviewed-by: Volker Lendecke <vl@samba.org>
9 years agosmbd: Fix a typo
Volker Lendecke [Tue, 15 Jul 2014 14:49:25 +0000 (14:49 +0000)]
smbd: Fix a typo

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
Autobuild-User(master): Stefan Metzmacher <metze@samba.org>
Autobuild-Date(master): Tue Jul 22 17:57:56 CEST 2014 on sn-devel-104

9 years agosmbd: ?True:False is pretty pointless :-)
Volker Lendecke [Mon, 14 Jul 2014 15:22:01 +0000 (15:22 +0000)]
smbd: ?True:False is pretty pointless :-)

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
9 years agosmbd: Add missing {}
Volker Lendecke [Mon, 14 Jul 2014 15:20:57 +0000 (15:20 +0000)]
smbd: Add missing {}

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
9 years agosmbd: Remove superfluous ()
Volker Lendecke [Mon, 14 Jul 2014 15:19:53 +0000 (15:19 +0000)]
smbd: Remove superfluous ()

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
9 years agosmbd: Fix a typo
Volker Lendecke [Mon, 14 Jul 2014 15:10:53 +0000 (15:10 +0000)]
smbd: Fix a typo

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
9 years agosmbd: Simplify brl_locktest
Volker Lendecke [Fri, 11 Jul 2014 13:35:45 +0000 (15:35 +0200)]
smbd: Simplify brl_locktest

Pass "struct lock_struct" as a parameter. This had to be destructured
before the call and re-constructed inside brl_locktest.

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
9 years agosmbd: Restructure brl_conflict_other
Volker Lendecke [Fri, 11 Jul 2014 11:27:39 +0000 (13:27 +0200)]
smbd: Restructure brl_conflict_other

It took me really long to grasp what's going on in this routine. I hope
its logic is easier to understand now

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
9 years agosmbd: Fix indentation, {} and line length in brl_conflict_other
Volker Lendecke [Fri, 11 Jul 2014 11:21:20 +0000 (13:21 +0200)]
smbd: Fix indentation, {} and line length in brl_conflict_other

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
9 years agosmbd: Rename lck2->rw_probe in brl_conflict_other
Volker Lendecke [Fri, 11 Jul 2014 11:20:10 +0000 (13:20 +0200)]
smbd: Rename lck2->rw_probe in brl_conflict_other

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
9 years agosmbd: Rename lck1->lock in brl_conflict_other
Volker Lendecke [Fri, 11 Jul 2014 11:19:36 +0000 (13:19 +0200)]
smbd: Rename lck1->lock in brl_conflict_other

lck1 and lck2 are treated differently. They should carry more descriptive
names.

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
9 years agosmbd: Use a struct initializer brl_lock
Volker Lendecke [Fri, 11 Jul 2014 10:41:54 +0000 (12:41 +0200)]
smbd: Use a struct initializer brl_lock

Avoids a #ifdef DEVELOPER and saves a few bytes .text

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
9 years agosmbd: Simplify strict_lock_default with early returns
Volker Lendecke [Thu, 10 Jul 2014 20:23:37 +0000 (22:23 +0200)]
smbd: Simplify strict_lock_default with early returns

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
9 years agosmbd: Use %ju/uintmax_t in source3/locking
Volker Lendecke [Fri, 11 Jul 2014 10:52:06 +0000 (12:52 +0200)]
smbd: Use %ju/uintmax_t in source3/locking

Avoid going through (double) and %.0f

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
9 years agosmbd: "err" is no longer set in get_lock_offset
Volker Lendecke [Tue, 15 Jul 2014 09:52:07 +0000 (09:52 +0000)]
smbd: "err" is no longer set in get_lock_offset

This was only referenced in the !HAVE_LONGLONG section

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
9 years agosmbd: Add comments
Volker Lendecke [Tue, 15 Jul 2014 10:55:21 +0000 (10:55 +0000)]
smbd: Add comments

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
9 years agosmbd/nmbd: Remove HAVE_LONGLONG
Volker Lendecke [Tue, 15 Jul 2014 09:48:16 +0000 (09:48 +0000)]
smbd/nmbd: Remove HAVE_LONGLONG

We always have 64-bit variables available by now

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
9 years agosmbd: Simplify unpack_nt_owners
Volker Lendecke [Thu, 10 Jul 2014 10:36:02 +0000 (10:36 +0000)]
smbd: Simplify unpack_nt_owners

The separate variables are not really required

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
9 years agolib: Fix a valgrind error
Volker Lendecke [Wed, 9 Jul 2014 13:51:06 +0000 (13:51 +0000)]
lib: Fix a valgrind error

See the comment inside

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
9 years agomessaging4: Fix a just-introduced error memleak
Volker Lendecke [Tue, 22 Jul 2014 10:34:08 +0000 (10:34 +0000)]
messaging4: Fix a just-introduced error memleak

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
Autobuild-User(master): Volker Lendecke <vl@samba.org>
Autobuild-Date(master): Tue Jul 22 15:31:38 CEST 2014 on sn-devel-104

9 years agoctdb: Fix verbose_memory_names
Volker Lendecke [Mon, 21 Jul 2014 09:48:45 +0000 (09:48 +0000)]
ctdb: Fix verbose_memory_names

If we have already partly written a packet, "data" and thus "pkt->data"
does not point to the start of the packet anymore. Assign "hdr" while
it still points at the start of the header.

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
Autobuild-User(master): Amitay Isaacs <amitay@samba.org>
Autobuild-Date(master): Tue Jul 22 06:09:50 CEST 2014 on sn-devel-104

9 years agoctdb: Avoid a talloc in ctdb_queue_send
Volker Lendecke [Mon, 21 Jul 2014 09:42:54 +0000 (09:42 +0000)]
ctdb: Avoid a talloc in ctdb_queue_send

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
9 years agosys_poll_intr: fix timeout arithmetic
Daniel Kobras [Mon, 21 Jul 2014 08:47:53 +0000 (10:47 +0200)]
sys_poll_intr: fix timeout arithmetic

Callers of sys_poll_intr() assume timeout to be in milliseconds like
poll(2) expects, but implementation used nanosecond units. Also make
sure timeout doesn't become infinite by mistake during time arithmetic.

Signed-off-by: Daniel Kobras <d.kobras@science-computing.de>
Reviewed-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
Autobuild-User(master): Jeremy Allison <jra@samba.org>
Autobuild-Date(master): Tue Jul 22 00:12:24 CEST 2014 on sn-devel-104

9 years agomessaging4: Change irpc_servers_by_name to NTSTATUS
Volker Lendecke [Thu, 17 Jul 2014 15:05:30 +0000 (15:05 +0000)]
messaging4: Change irpc_servers_by_name to NTSTATUS

For me, counted arrays are easier to deal with than NULL-terminated
ones. Here we also had a "server_id_is_disconnection" convention, which
was not really obvious.

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
Autobuild-User(master): Volker Lendecke <vl@samba.org>
Autobuild-Date(master): Mon Jul 21 20:28:53 CEST 2014 on sn-devel-104

9 years agomessaging4: Fix a memleak in an error path
Volker Lendecke [Thu, 17 Jul 2014 14:54:32 +0000 (14:54 +0000)]
messaging4: Fix a memleak in an error path

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
9 years agomessaging4: Remove unnecessary locking
Volker Lendecke [Thu, 17 Jul 2014 14:50:33 +0000 (14:50 +0000)]
messaging4: Remove unnecessary locking

We don't do any modifying operations on the database, so locking is not
needed here

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
9 years agomessaging4: Remove an unused NTSTATUS var
Volker Lendecke [Thu, 17 Jul 2014 14:11:35 +0000 (14:11 +0000)]
messaging4: Remove an unused NTSTATUS var

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
9 years agomessaging4: Move str_list_add
Volker Lendecke [Thu, 17 Jul 2014 14:09:14 +0000 (14:09 +0000)]
messaging4: Move str_list_add

If this fails, we'd have to revert the tdb_append. str_list_remove is
simpler :-)

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
9 years agomessaging4: Add NULL check to irpc_add_name
Volker Lendecke [Thu, 17 Jul 2014 14:08:58 +0000 (14:08 +0000)]
messaging4: Add NULL check to irpc_add_name

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
9 years agomessaging4: Use tdb_append in irpc_add_name
Volker Lendecke [Thu, 17 Jul 2014 14:07:45 +0000 (14:07 +0000)]
messaging4: Use tdb_append in irpc_add_name

This makes the custom locking code unnecessary here

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
9 years agoctdb-recoverd: Gently abort recovery when election is underway
Martin Schwenke [Mon, 2 Jun 2014 09:09:38 +0000 (19:09 +1000)]
ctdb-recoverd: Gently abort recovery when election is underway

Sometimes the recovery daemon fails to get the recovery lock on one
node so that node is banned.  This seems to always happen during an
election.  The recovery is triggered because other nodes are found to
have recovery mode enabled.  They have recovery mode enabled because
an election has been forced.

The recovery daemon's main_loop() only does an initial check for an
election.  After that, a node can force an election and, in the
process, set itself to be the current winner.  In this situation,
verify_recmode() will always return MONITOR_RECOVERY_NEEDED so
do_recovery() is called.  If the previous recovery master hasn't
admitted defeat and released the recovery lock, then do_recovery()
will rightly fail.  However, it would be better if it failed a little
more gracefully, since this case is not that unusual.

Instead of trying to take the recovery lock, return early with an
error if there is an election in progress.  Note that the race is
still there but it is now much narrower.

There are probably more subtle ways of avoiding this issue, including
something like this in main_loop():

- if (pnn != rec->recmaster) {
+ if (pnn != rec->recmaster || rec->election_timeout) {
  return;
  }

However, this check is done earlier so it leaves the race window open
a little wider.

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): Mon Jul 21 06:57:07 CEST 2014 on sn-devel-104

9 years agos4:torture/rpc: add rpc.netlogon.ServerReqChallengeGlobal
Stefan Metzmacher [Thu, 17 Jul 2014 14:05:12 +0000 (16:05 +0200)]
s4:torture/rpc: add rpc.netlogon.ServerReqChallengeGlobal

This demonstrates that the challenge table should be global.

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

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
Autobuild-User(master): Stefan Metzmacher <metze@samba.org>
Autobuild-Date(master): Sat Jul 19 12:51:39 CEST 2014 on sn-devel-104

9 years agos4:rpc_server/netlogon: keep a global challenge table
Stefan Metzmacher [Thu, 17 Jul 2014 12:20:58 +0000 (14:20 +0200)]
s4:rpc_server/netlogon: keep a global challenge table

Some clients call netr_ServerReqChallenge() and netr_ServerAuthenticate3()
on different connections. This works against Windows DCs as they
have a global challenge table.

A VMware provisioning task for Windows VMs seemy to rely on this behavior.

As a fallback we're storing the challenge in a global memcache with a fixed
size. This should allow these strange clients to work against a
Samba AD DC.

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

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
9 years agolib/util: move memcache.[ch] to the toplevel 'samba-util' library
Stefan Metzmacher [Thu, 17 Jul 2014 10:58:34 +0000 (12:58 +0200)]
lib/util: move memcache.[ch] to the toplevel 'samba-util' library

This is generic enough that it could be used in all code.

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Volker Lendecke <vl@samba.org>
Autobuild-User(master): Stefan Metzmacher <metze@samba.org>
Autobuild-Date(master): Fri Jul 18 15:43:33 CEST 2014 on sn-devel-104

9 years agos3:lib/memcache: only include the required header files
Stefan Metzmacher [Thu, 17 Jul 2014 10:49:48 +0000 (12:49 +0200)]
s3:lib/memcache: only include the required header files

We don't need the full "includes.h".

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Volker Lendecke <vl@samba.org>
9 years agos3:lib/memcache: make use of talloc for memcache_elements
Stefan Metzmacher [Thu, 17 Jul 2014 10:48:51 +0000 (12:48 +0200)]
s3:lib/memcache: make use of talloc for memcache_elements

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Volker Lendecke <vl@samba.org>
9 years agos3:lib/memcache: use uint8_t instead of uint8
Stefan Metzmacher [Thu, 17 Jul 2014 10:41:20 +0000 (12:41 +0200)]
s3:lib/memcache: use uint8_t instead of uint8

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Volker Lendecke <vl@samba.org>
9 years agoldb-samba: fix a memory leak in ldif_canonicalise_objectCategory()
Stefan Metzmacher [Wed, 16 Jul 2014 14:17:56 +0000 (16:17 +0200)]
ldb-samba: fix a memory leak in ldif_canonicalise_objectCategory()

Searches for '(objectCategory=Person)' will leak a ldb_dn structure
on the ldb_context. These searches are typically used by Zarafa.

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

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Volker Lendecke <vl@samba.org>
Autobuild-User(master): Stefan Metzmacher <metze@samba.org>
Autobuild-Date(master): Thu Jul 17 00:51:57 CEST 2014 on sn-devel-104

9 years agolib/zlib: Remove undeeded files that trigger GPL issues.
Ira Cooper [Wed, 16 Jul 2014 11:38:45 +0000 (07:38 -0400)]
lib/zlib: Remove undeeded files that trigger GPL issues.

These files have been removed in upstream versions of zlib
due to the fact that binaries tend to become GPL violations.

Signed-off-by: Ira Cooper <ira@samba.org>
Reviewed-by: Volker Lendecke <vl@samba.org>
Autobuild-User(master): Ira Cooper <ira@samba.org>
Autobuild-Date(master): Wed Jul 16 19:14:56 CEST 2014 on sn-devel-104

9 years agosamlogon_cache: avoid overwriting info3->base.full_name.string.
Andreas Schneider [Thu, 3 Jul 2014 14:17:46 +0000 (16:17 +0200)]
samlogon_cache: avoid overwriting info3->base.full_name.string.

This field servers as a source for the gecos field. We should not overwrite it
when a info3 struct from a samlogon network level gets saved in which case this
field is always NULL.

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

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): Tue Jul 15 18:25:28 CEST 2014 on sn-devel-104

9 years agosamlogon_cache: use a talloc_stackframe inside netsamlogon_cache_store.
Günther Deschner [Wed, 9 Jul 2014 11:36:06 +0000 (13:36 +0200)]
samlogon_cache: use a talloc_stackframe inside netsamlogon_cache_store.

Guenther

Signed-off-by: Günther Deschner <gd@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
9 years agos3-winbindd: prefer "displayName" over "name" in ads user queries for the fullname.
Günther Deschner [Mon, 14 Jul 2014 16:22:26 +0000 (18:22 +0200)]
s3-winbindd: prefer "displayName" over "name" in ads user queries for the fullname.

This makes use more consistent with security=domain as well where the gecos
field is also filled using the displayName field.

Guenther

Signed-off-by: Guenther Deschner <gd@samba.org>
Pair-Programmed-With: Andreas Schneider <asn@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
9 years agos3-winbind: Don't set the gecos field to NULL.
Andreas Schneider [Thu, 3 Jul 2014 14:19:42 +0000 (16:19 +0200)]
s3-winbind: Don't set the gecos field to NULL.

The value is loaded from the cache anyway. So it will be set to NULL if
it is not available.

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

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Guenther Deschner <gd@samba.org>
9 years agos3-winbindd: use wcache_query_user_fullname after inspecting samlogon cache.
Günther Deschner [Mon, 7 Jul 2014 15:16:32 +0000 (17:16 +0200)]
s3-winbindd: use wcache_query_user_fullname after inspecting samlogon cache.

The reason for this followup query is that very often the samlogon cache only
contains a info3 netlogon user structure that has been retrieved during a
netlogon samlogon authentication using "network" logon level. With that logon
level only a few info3 fields are filled in; the user's fullname is never filled
in that case. This is problematic when the cache is used to fill in the user's
gecos field (for NSS queries). When we have retrieved the user's fullname during
other queries, reuse it from the other caches.

Thanks to Matt Rogers <mrogers@redhat.com>.

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

Guenther

Pair-Programmed-With: Andreas Schneider <asn@samba.org>
Signed-off-by: Guenther Deschner <gd@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
9 years agos3-winbindd: add wcache_query_user_fullname().
Günther Deschner [Mon, 7 Jul 2014 15:14:37 +0000 (17:14 +0200)]
s3-winbindd: add wcache_query_user_fullname().

This helper function is used to query the full name of a cached user object (for
further gecos processing).

Thanks to Matt Rogers <mrogers@redhat.com>.

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

Guenther

Pair-Programmed-With: Andreas Schneider <asn@samba.org>
Signed-off-by: Günther Deschner <gd@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
9 years agos3-winbindd: call interactive samlogon via rpccli_netlogon_password_logon.
Günther Deschner [Tue, 15 Jul 2014 06:29:55 +0000 (08:29 +0200)]
s3-winbindd: call interactive samlogon via rpccli_netlogon_password_logon.

Guenther

Signed-off-by: Guenther Deschner <gd@samba.org>
Pair-Programmed-With: Andreas Schneider <asn@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
9 years agos3-rpc_client: return info3 in rpccli_netlogon_password_logon().
Günther Deschner [Tue, 15 Jul 2014 06:28:42 +0000 (08:28 +0200)]
s3-rpc_client: return info3 in rpccli_netlogon_password_logon().

Guenther

Signed-off-by: Günther Deschner <gd@samba.org>
Pair-Programmed-With: Andreas Schneider <asn@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
9 years agontlm_auth: added require-membership tests
Garming Sam [Wed, 11 Jun 2014 05:07:44 +0000 (17:07 +1200)]
ntlm_auth: added require-membership tests

(updated by abartlet to fix knownfail changes due to AD DC winbindd
use in master)
Change-Id: Iec41fbfc0f501888fd16323bf78da61aa549b4de
Signed-off-by: Garming Sam <garming@catalyst.net.nz> Reviewed-by:
Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Kamen Mazdrashki <kamenim@samba.org>
Autobuild-User(master): Kamen Mazdrashki <kamenim@samba.org>
Autobuild-Date(master): Tue Jul 15 15:59:49 CEST 2014 on sn-devel-104

9 years agotorture: test_ntlm_auth.py now has a require-membership-of argument
Garming Sam [Fri, 4 Jul 2014 00:50:37 +0000 (12:50 +1200)]
torture: test_ntlm_auth.py now has a require-membership-of argument

Change-Id: I90c2172af792a082fbf49ee0ab7d6eedf5471440
Signed-off-by: Garming Sam <garming@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Kamen Mazdrashki <kamenim@samba.org>
9 years agoAs David Woodhouse points out, this breaks backwards compatibility.
Jeremy Allison [Mon, 14 Jul 2014 17:22:52 +0000 (10:22 -0700)]
As David Woodhouse points out, this breaks backwards compatibility.

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

Revert "libwbclient: reject unknown named blobs in wbcCredentialCache()"

This reverts commit 740d12d1e77d356ff22c3725dce8d5019c86a7a5.

Autobuild-User(master): Jeremy Allison <jra@samba.org>
Autobuild-Date(master): Mon Jul 14 21:54:08 CEST 2014 on sn-devel-104

9 years agoctdb-ltdb: Use tdb_null instead of zeroing TDB_DATA variable
Amitay Isaacs [Mon, 14 Jul 2014 06:30:18 +0000 (16:30 +1000)]
ctdb-ltdb: Use tdb_null instead of zeroing TDB_DATA variable

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): Mon Jul 14 16:01:31 CEST 2014 on sn-devel-104

9 years agos3:smbd: initialize stat_ex buffer in smbd_dirptr_get_entry()
Michael Adam [Thu, 3 Jul 2014 08:00:13 +0000 (10:00 +0200)]
s3:smbd: initialize stat_ex buffer in smbd_dirptr_get_entry()

This prevents random garbage in the vfs_private member.
Usually it should not be a problem to leave initialization
of the vfs_private to the vfs module who wants to use it,
but further down in the directory listing code, in
vfswrap_readdir, there is in optimization introduced
with 2a65e8befef004fd18d17853a1b72155752346c8, to call
fstatat if possible to already fill stat info in the
readdir call.

The problem is that this calls fstatat directly,
not going through VFS, but still making the stat buffer
valid, leaving vfs_private with random garbage.
Hence a vfs module using vfs_private, like vfs_gpfs
does for offline info (and winAttrs in general)
does not have a chance to tell whether the vfs_private
is valid if the stat buffer is marked valid.
This is a reason for the "flapping offline flag" problem
of the vfs_gpfs module.

Initializing the vfs_private to 0 here will for the
vfs_gpfs module result in files being marked online
always in a directory listing. So this is not a real fix
but it does at least make the problem less random.

A real general fix might be to implement SMB_VFS_FSTATAT()
and use it here.

Signed-off-by: Michael Adam <obnox@samba.org>
Reviewed-by: Christof Schmitt <cs@samba.org>
Autobuild-User(master): Christof Schmitt <cs@samba.org>
Autobuild-Date(master): Sun Jul 13 11:26:58 CEST 2014 on sn-devel-104

9 years agos3:vfs:gpfs: log when winAttr-garbage is detected (by heuristics) in is_offline
Michael Adam [Wed, 9 Jul 2014 21:56:34 +0000 (23:56 +0200)]
s3:vfs:gpfs: log when winAttr-garbage is detected (by heuristics) in is_offline

In is_offline(), check whether the winAttrs are filled with bits
outside 0xFFFF and log it prominently: Since GPFS only
fills 0xFFFF, this could be due to an uninitialized buffer
(or another vfs module filling vfs_private? ...).

Signed-off-by: Michael Adam <obnox@samba.org>
Reviewed-by: Christof Schmitt <cs@samba.org>
9 years agos3:vfs:gpfs: fix flapping offline: always get winAttrs from gpfs for is_offline
Michael Adam [Thu, 3 Jul 2014 08:10:11 +0000 (10:10 +0200)]
s3:vfs:gpfs: fix flapping offline: always get winAttrs from gpfs for is_offline

There is a problem of flapping offline due to uninitialized
stat buffers. Due to a optimization in vfswrap_readdir which
directly calling fastatat (i.e. not through vfs), marking the
stat buffer valid, there is nothing this module can do about
it and hence can not currently not rely on the vaildity of
the stat buffer.

By always calling out to GPFS even when the stat buffer is
flagged valid, we can always return correct offline information,
thereby sacrificing the readdir optimization.

Pair-Programmed-With: Volker Lendecke <vl@samba.org>

Signed-off-by: Michael Adam <obnox@samba.org>
Reviewed-by: Christof Schmitt <cs@samba.org>
9 years agos3:vfs:gpfs: store the winAttrs in the struct_ex when we got them in vfs_gpfs_fstat()
Michael Adam [Thu, 3 Jul 2014 08:07:37 +0000 (10:07 +0200)]
s3:vfs:gpfs: store the winAttrs in the struct_ex when we got them in vfs_gpfs_fstat()

This may (e.g.) have lead to some occurrences of flapping offline bits.

Signed-off-by: Michael Adam <obnox@samba.org>
Reviewed-by: Christof Schmitt <cs@samba.org>
9 years agos3:smb2_read: let smb2_sendfile_send_data() behave like send_file_readX()
Stefan Metzmacher [Thu, 10 Jul 2014 19:08:06 +0000 (21:08 +0200)]
s3:smb2_read: let smb2_sendfile_send_data() behave like send_file_readX()

We now pass the header to SMB_VFS_SENDFILE(), so we have to handle that also
in the fallback code.

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

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): Fri Jul 11 22:57:17 CEST 2014 on sn-devel-104

9 years agos3:winbindd: remove unused get[pw|gr]ent_initialized from winbindd_cli_state
Stefan Metzmacher [Mon, 7 Jul 2014 13:12:37 +0000 (15:12 +0200)]
s3:winbindd: remove unused get[pw|gr]ent_initialized from winbindd_cli_state

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Michael Adam <obnox@samba.org>
Autobuild-User(master): Stefan Metzmacher <metze@samba.org>
Autobuild-Date(master): Fri Jul 11 18:46:09 CEST 2014 on sn-devel-104

9 years agoselftest: teardown the environments also on getting SIGPIPE
Stefan Metzmacher [Thu, 10 Jul 2014 12:28:56 +0000 (14:28 +0200)]
selftest: teardown the environments also on getting SIGPIPE

make test uses

selftest.pl | subuntu-filter.py ...

FAIL_IMMEDIATELY=1 lets subuntu-filter.py exit,
which generates SIGPIPE in selftest.pl.

We should handle this just like any other signal
and teardown all environments.

This should make the teardown process more reliable/verbose.

Pair-Programmed-With: Michael Adam <obnox@samba.org>
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Signed-off-by: Michael Adam <obnox@samba.org>
9 years agos3:smb2_negprot: change "smb max {read,write,trans}" to 8MiB (as default)
Stefan Metzmacher [Thu, 12 Jun 2014 23:55:21 +0000 (01:55 +0200)]
s3:smb2_negprot: change "smb max {read,write,trans}" to 8MiB (as default)

This matches Windows 2012R2.

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Volker Lendecke <vl@samba.org>
Autobuild-User(master): Stefan Metzmacher <metze@samba.org>
Autobuild-Date(master): Fri Jul 11 04:59:29 CEST 2014 on sn-devel-104

9 years agos3:smb2_negprot: allow "smb max {read,write,trans}" up to 8MiB
Stefan Metzmacher [Thu, 12 Jun 2014 23:55:21 +0000 (01:55 +0200)]
s3:smb2_negprot: allow "smb max {read,write,trans}" up to 8MiB

This matches Windows 2012R2.

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Volker Lendecke <vl@samba.org>
9 years agolibwbclient: reject unknown named blobs in wbcCredentialCache()
Stefan Metzmacher [Thu, 10 Jul 2014 03:28:36 +0000 (05:28 +0200)]
libwbclient: reject unknown named blobs in wbcCredentialCache()

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

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 Jul 10 22:30:45 CEST 2014 on sn-devel-104

9 years agolibwbclient: allow only one initial_blob/challenge_blob in wbcCredentialCache()
Stefan Metzmacher [Thu, 10 Jul 2014 03:28:36 +0000 (05:28 +0200)]
libwbclient: allow only one initial_blob/challenge_blob in wbcCredentialCache()

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

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
9 years agos3:vfs:gpfs: remove extra empty lines.
Michael Adam [Thu, 3 Jul 2014 07:58:30 +0000 (09:58 +0200)]
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

9 years agos3:smbd: make dptr_ReadDirName() static.
Michael Adam [Thu, 3 Jul 2014 07:57:02 +0000 (09:57 +0200)]
s3:smbd: make dptr_ReadDirName() static.

Signed-off-by: Michael Adam <obnox@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
9 years agos3: libwbclient: Don't break out of loop too soon - find all parameters.
Jeremy Allison [Tue, 8 Jul 2014 23:36:30 +0000 (16:36 -0700)]
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>
9 years agolibwbclient: Call correct function for wbcPingDc2 test
Christof Schmitt [Tue, 8 Jul 2014 19:03:37 +0000 (12:03 -0700)]
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

9 years agos4:dsdb/samldb: don't allow 'userParameters' to be modified over LDAP for now
Stefan Metzmacher [Tue, 8 Jul 2014 14:19:09 +0000 (16:19 +0200)]
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

9 years agodbcheck: Add check and test for various invalid userParameters values
Andrew Bartlett [Tue, 17 Jun 2014 04:00:57 +0000 (16:00 +1200)]
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>
9 years agodsdb: Always store and return the userParameters as a array of LE 16-bit values
Andrew Bartlett [Tue, 17 Jun 2014 04:03:22 +0000 (16:03 +1200)]
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>
9 years agodsdb: Set syntax of userParameters to binary string, not unicode string
Andrew Bartlett [Tue, 24 Sep 2013 17:12:24 +0000 (10:12 -0700)]
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>
9 years agos4:dsdb/repl_meta_data: make sure objectGUID can't be deleted
Stefan Metzmacher [Mon, 7 Jul 2014 21:51:31 +0000 (23:51 +0200)]
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>
9 years agos4:dsdb/extended_dn_in: don't force DSDB_SEARCH_SHOW_RECYCLED
Stefan Metzmacher [Mon, 7 Jul 2014 10:00:14 +0000 (12:00 +0200)]
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>
9 years agos4:dsdb/kcc: use SHOW_RECYCLED instead of SHOW_DELETED in when deleting tombstone...
Stefan Metzmacher [Mon, 7 Jul 2014 20:53:19 +0000 (22:53 +0200)]
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>
9 years agos4:dsdb/schema_load: make error message more verbose
Stefan Metzmacher [Thu, 3 Jul 2014 14:00:48 +0000 (16:00 +0200)]
s4:dsdb/schema_load: make error message more verbose

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
9 years agoctdb-daemon: Support per-node robust mutex feature
Amitay Isaacs [Sun, 10 Nov 2013 13:32:31 +0000 (00:32 +1100)]
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

9 years agoctdb-daemon: Enable robust mutexes only if TDB_MUTEX_LOCKING is defined
Amitay Isaacs [Mon, 30 Jun 2014 05:09:32 +0000 (15:09 +1000)]
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>
9 years agoctdb-daemon: Allow flag TDB_MUTEX_LOCKING to pass into db_attach
Volker Lendecke [Wed, 20 Feb 2013 14:09:36 +0000 (15:09 +0100)]
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>
9 years agoctdb-daemon: Simplify code a bit
Amitay Isaacs [Tue, 24 Jun 2014 02:04:25 +0000 (12:04 +1000)]
ctdb-daemon: Simplify code a bit

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