Amitay Isaacs [Mon, 28 Jul 2014 08:08:55 +0000 (18:08 +1000)]
tests: dnsserver: Remove duplicate empty test function
This test function is defined further in the file.
Signed-off-by: Amitay Isaacs <amitay@gmail.com>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
Autobuild-User(master): Stefan Metzmacher <metze@samba.org>
Autobuild-Date(master): Wed Jul 30 07:00:57 CEST 2014 on sn-devel-104
Jeremy Allison [Fri, 25 Jul 2014 19:46:46 +0000 (12:46 -0700)]
s3: winbindd: On new client connect, prune idle or hung connections older than "winbind request timeout"
Bug 3204 winbindd: Exceeding 200 client connections, no idle connection found
https://bugzilla.samba.org/show_bug.cgi?id=3204
Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Ira Cooper <ira@samba.org>
Autobuild-User(master): Jeremy Allison <jra@samba.org>
Autobuild-Date(master): Tue Jul 29 23:31:14 CEST 2014 on sn-devel-104
Jeremy Allison [Fri, 25 Jul 2014 19:44:53 +0000 (12:44 -0700)]
s3: winbindd: Add new parameter "winbind request timeout" set to 60 seconds with man page.
"This parameter specifies the number of seconds the winbindd
daemon will wait before disconnecting either a client connection
with no outstanding requests (idle) or a client connection with a
request that has remained outstanding (hung) for longer than this
number of seconds."
Bug 3204 winbindd: Exceeding 200 client connections, no idle connection found
https://bugzilla.samba.org/show_bug.cgi?id=3204
Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Ira Cooper <ira@samba.org>
Amitay Isaacs [Mon, 28 Jul 2014 08:09:37 +0000 (18:09 +1000)]
tests: dnsserver: Add a update test with name set to '.'
Signed-off-by: Amitay Isaacs <amitay@gmail.com>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
Autobuild-User(master): Stefan Metzmacher <metze@samba.org>
Autobuild-Date(master): Tue Jul 29 19:33:19 CEST 2014 on sn-devel-104
Amitay Isaacs [Mon, 28 Jul 2014 03:07:58 +0000 (13:07 +1000)]
s4-rpc: dnsserver: Allow . to be specified for @ record
Windows allow both . and @ to be specified with modifying @ record.
Bug: https://bugzilla.samba.org/show_bug.cgi?id=10742
Signed-off-by: Amitay Isaacs <amitay@gmail.com>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
Amitay Isaacs [Tue, 29 Jul 2014 08:59:43 +0000 (18:59 +1000)]
selftest: Fix a typo (SIGTERm --> SIGTERM)
Signed-off-by: Amitay Isaacs <amitay@gmail.com>
Reviewed-by: Michael Adam <obnox@samba.org>
Autobuild-User(master): Michael Adam <obnox@samba.org>
Autobuild-Date(master): Tue Jul 29 17:09:00 CEST 2014 on sn-devel-104
Jeremy Allison [Mon, 28 Jul 2014 20:03:54 +0000 (13:03 -0700)]
Fix now erroneous comment for directory_create_or_exist()
It doesn't do any checking that the permissions are correct.
Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Volker Lendecke <vl@samba.org>
Autobuild-User(master): Volker Lendecke <vl@samba.org>
Autobuild-Date(master): Tue Jul 29 14:41:42 CEST 2014 on sn-devel-104
Martin Schwenke [Mon, 28 Jul 2014 02:56:47 +0000 (12:56 +1000)]
ctdb-eventscripts: Remove unused argument to natgw_ensure_master()
This was used to limit damage in the "recovered" event.
Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
Autobuild-User(master): Amitay Isaacs <amitay@samba.org>
Autobuild-Date(master): Tue Jul 29 10:03:16 CEST 2014 on sn-devel-104
Martin Schwenke [Tue, 22 Jul 2014 02:31:44 +0000 (12:31 +1000)]
ctdb-tests: Add another LCP2 takeover test
Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
Martin Schwenke [Fri, 25 Jul 2014 06:56:57 +0000 (16:56 +1000)]
ctdb-eventscripts: Remove NAT gateway "monitor" event
This event was introduced to handle misconfiguration. For example,
where all nodes where configured as NAT gateway slaves.
However, this event can fail when there are performance issues and
capabilities can't be retrieved from a remote node. The problem is
most likely with the remote node, so marking the local node UNHEALTHY
is probably a mistake.
Having a NAT gateway master node only matters in "ipreallocated", so
leave it to do the checking. Given that a node will run
"ipreallocated" as part of the first recovery, this should cause
misconfigurations to be detected nice and early.
Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
Volker Lendecke [Sun, 20 Jul 2014 14:07:44 +0000 (16:07 +0200)]
messaging4: Simplify imessaging_path
Use server_id_str_buf
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): Tue Jul 29 00:30:55 CEST 2014 on sn-devel-104
Volker Lendecke [Wed, 9 Jul 2014 14:40:12 +0000 (14:40 +0000)]
messaging3: messaging_array is no longer used
Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
Volker Lendecke [Thu, 24 Jul 2014 14:59:33 +0000 (14:59 +0000)]
unix_msg: simplify unix_msg_send
We have a variable array inside one-fragment fast path anyway. Moving
that to the toplevel of the function saves us a malloc/free pair.
Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
Volker Lendecke [Mon, 28 Jul 2014 11:54:16 +0000 (11:54 +0000)]
unix_msg: Use struct initializers
Saves a few lines and bytes of .text
Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
Volker Lendecke [Mon, 28 Jul 2014 12:02:12 +0000 (12:02 +0000)]
unix_msg: Use empty arrays in structs
Just a simple style update
Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
Volker Lendecke [Sun, 27 Jul 2014 17:18:09 +0000 (19:18 +0200)]
lib: directory_create_or_exist() does not use "uid" parameter
Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
Volker Lendecke [Sun, 27 Jul 2014 17:08:52 +0000 (19:08 +0200)]
lib: Simplify directory_create_or_exist with an early return
Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
Björn Jacke [Thu, 24 Jul 2014 08:29:32 +0000 (10:29 +0200)]
winbind/i18n: update Japanese pam winbind translation
Thanks to user "victory" and SATOH Fumiyasu for further fixes for Japanese
KATAKANA words!
BUG: https://bugzilla.samba.org/show_bug.cgi?id=10303
Signed-off-by: Bjoern Jacke <bj@sernet.de>
Reviewed-by: SATOH Fumiyasu <fumiyas@osstech.jp>
Autobuild-User(master): Björn Jacke <bj@sernet.de>
Autobuild-Date(master): Sat Jul 26 20:43:28 CEST 2014 on sn-devel-104
Michael Adam [Wed, 23 Jul 2014 09:42:57 +0000 (11:42 +0200)]
s3:idmap: fix talloc hierarchy in idmap_passdb_domain()
(don't init to NULL context - we got one handed in...)
Signed-off-by: Michael Adam <obnox@samba.org>
Reviewed-by: Volker Lendecke <vl@samba.org>
Autobuild-User(master): Volker Lendecke <vl@samba.org>
Autobuild-Date(master): Fri Jul 25 14:18:20 CEST 2014 on sn-devel-104
Michael Adam [Sun, 20 Jul 2014 10:12:16 +0000 (12:12 +0200)]
s3:idmap: only check the range values if a range setting has been found.
Otherwise, the check is superfluous since high and low values are
initialized to 0.
Signed-off-by: Michael Adam <obnox@samba.org>
Reviewed-by: Volker Lendecke <vl@samba.org>
Michael Adam [Sun, 20 Jul 2014 10:11:16 +0000 (12:11 +0200)]
s3:idmap: move loading of idmap options together before range checking in idmap_init_domain()
Signed-off-by: Michael Adam <obnox@samba.org>
Reviewed-by: Volker Lendecke <vl@samba.org>
Michael Adam [Sun, 20 Jul 2014 09:53:32 +0000 (11:53 +0200)]
s3:idmap: in idmap_init_domain() load methods before loading further config
Check whether the requested backend exists at all, before going
further into the config parsing.
Signed-off-by: Michael Adam <obnox@samba.org>
Reviewed-by: Volker Lendecke <vl@samba.org>
Michael Adam [Sun, 20 Jul 2014 09:49:37 +0000 (11:49 +0200)]
s3:idmap: don't log missing range config if range checking not requested
idmap_init_domain() is called with check_range == false from
idmap_passdb_domain(). In this case, we usually don't have an
idmap range at all, and we don't want to level 1 debug
messages complaining about the fact are irritating at least.
This patch removes the debug in the case of check_range == false.
BUG: https://bugzilla.samba.org/show_bug.cgi?id=10737
Signed-off-by: Michael Adam <obnox@samba.org>
Reviewed-by: Volker Lendecke <vl@samba.org>
Volker Lendecke [Wed, 9 Jul 2014 13:34:59 +0000 (13:34 +0000)]
messaging3: Remove an unnecessary variable
We can inspect rec.buf with a debugger, no separate variable needed
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): Fri Jul 25 00:03:48 CEST 2014 on sn-devel-104
Volker Lendecke [Thu, 17 Jul 2014 09:09:25 +0000 (09:09 +0000)]
messaging4: Simplify ping_message with server_id_str_buf()
Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
Volker Lendecke [Wed, 9 Jul 2014 13:17:13 +0000 (13:17 +0000)]
messaging3: Simplify ping_message()
The talloc_strnup was only used to \0-terminate the data for printing. The
same can be achieved by %.* in the printf format.
Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
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>
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
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>
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>
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>
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>
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>
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>
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>
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
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>
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>
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>
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>
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
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>
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
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>
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>
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>
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>
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>
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>
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
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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
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
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>
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
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
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>
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>
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>
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>
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>
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>
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
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
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>
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
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>
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>
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>
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
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
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
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>
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>
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>
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>
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>
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>
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>
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
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>
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
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
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