Ralph Boehme [Fri, 26 Feb 2016 09:54:01 +0000 (10:54 +0100)]
s3/vfs: wrap async io function args inside struct vfs_aio_state
Subsequent commits that are going to track aio request duration in the
aio backends will use this.
Signed-off-by: Ralph Boehme <slow@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
Volker Lendecke [Tue, 1 Mar 2016 15:57:45 +0000 (16:57 +0100)]
passdb: Avoid a "ret == true"
Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Michael Adam <obnox@samba.org>
Autobuild-User(master): Michael Adam <obnox@samba.org>
Autobuild-Date(master): Wed Mar 2 01:04:14 CET 2016 on sn-devel-144
Michael Adam [Thu, 25 Feb 2016 15:15:04 +0000 (16:15 +0100)]
netlogon_creds_cli: use dbwrap_purge instead of dbwrap_delete where appropriate
Signed-off-by: Michael Adam <obnox@samba.org>
Reviewed-by: Volker Lendecke <vl@samba.org>
Michael Adam [Wed, 24 Feb 2016 23:58:50 +0000 (00:58 +0100)]
s3:registry: use dbwrap_purge_bystring instead of dbwrap_delete_bystring
where appropriate
Signed-off-by: Michael Adam <obnox@samba.org>
Reviewed-by: Volker Lendecke <vl@samba.org>
Michael Adam [Wed, 24 Feb 2016 23:56:14 +0000 (00:56 +0100)]
dbwrap: add dbwrap_purge[_bystring]
Variants of dbrwap_delete[_bysrting] that treats NOT FOUND
as success.
Signed-off-by: Michael Adam <obnox@samba.org>
Reviewed-by: Volker Lendecke <vl@samba.org>
Michael Adam [Thu, 25 Feb 2016 15:02:36 +0000 (16:02 +0100)]
dbwrap_util: improve a debug message in dbwrap_delete_action()
Signed-off-by: Michael Adam <obnox@samba.org>
Reviewed-by: Volker Lendecke <vl@samba.org>
Volker Lendecke [Tue, 1 Mar 2016 11:43:32 +0000 (12:43 +0100)]
lib: Fix
1354521 Unchecked return value
Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Uri Simchoni <uri@samba.org>
Autobuild-User(master): Uri Simchoni <uri@samba.org>
Autobuild-Date(master): Tue Mar 1 21:49:44 CET 2016 on sn-devel-144
Volker Lendecke [Tue, 1 Mar 2016 11:42:37 +0000 (12:42 +0100)]
ntvfs: Fix CID
1354522 Unchecked return value
Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Uri Simchoni <uri@samba.org>
Jeremy Allison [Sat, 27 Feb 2016 00:35:17 +0000 (16:35 -0800)]
s3: smbd: Change dptr_create() to take a const struct smb_filename * instead of const char *.
Also internally change path storage inside struct dptr_struct
to a struct smb_filename *.
This allows me to remove several of the synthetic_smb_fname()
calls I had to add in the previous patches, as we're now
dealing with struct smb_filename * throughout the dptr and
OpenDir code.
Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
Autobuild-User(master): Ralph Böhme <slow@samba.org>
Autobuild-Date(master): Tue Mar 1 18:34:24 CET 2016 on sn-devel-144
Jeremy Allison [Sat, 27 Feb 2016 00:31:10 +0000 (16:31 -0800)]
s3: smbd: In call_trans2findfirst() all use of ctx is really talloc_tos().
Use talloc_tos() explicitly to make this clear. Will help make the next
commit clearer.
Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
Jeremy Allison [Fri, 26 Feb 2016 23:55:14 +0000 (15:55 -0800)]
s3: smbd: Change OpenDir() to take a struct smb_filename *, not a char *.
Enhances plumbing to remove lp_posix_pathnames() later.
Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
Jeremy Allison [Fri, 26 Feb 2016 22:59:51 +0000 (14:59 -0800)]
s3: smbd: Change the internals of the private struct smb_Dir.
Store a struct smb_filename *, not a char *. This will
allow us to change the interface to OpenDir() in the next
commit to pass in a struct smb_filename *, not a char *.
Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
Jeremy Allison [Fri, 26 Feb 2016 22:53:12 +0000 (14:53 -0800)]
VFS: Modify opendir to take a const struct smb_filename * instead of const char *
Preparing to reduce use of lp_posix_pathnames().
Uses the same techniques as commit
616d068f0cebb8e50a855b6e30f36fccb7f5a3c8
(synthetic_smb_fname()) to cope with modules that
modify the incoming pathname.
Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
Uri Simchoni [Tue, 1 Mar 2016 08:36:35 +0000 (10:36 +0200)]
passdb: add linefeed to debug message
BUG: https://bugzilla.samba.org/show_bug.cgi?id=11763
Signed-off-by: Uri Simchoni <uri@samba.org>
Reviewed-by: Volker Lendecke <vl@samba.org>
Autobuild-User(master): Volker Lendecke <vl@samba.org>
Autobuild-Date(master): Tue Mar 1 15:24:35 CET 2016 on sn-devel-144
Aurelien Aptel [Mon, 29 Feb 2016 17:23:39 +0000 (18:23 +0100)]
s3/passdb/py_passdb.c: free frame before returning
these talloc frames are freed *after* the return instruction and are
never executed. this fixes potential memory leaks.
Signed-off-by: Aurelien Aptel <aaptel@suse.com>
Reviewed-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
Autobuild-User(master): Amitay Isaacs <amitay@samba.org>
Autobuild-Date(master): Tue Mar 1 12:08:40 CET 2016 on sn-devel-144
Martin Schwenke [Fri, 26 Feb 2016 09:08:11 +0000 (20:08 +1100)]
ctdb-tests: Override local daemon configuration from the environment
Anything starting with CTDB_ is appended to each node's configuration
file.
This is made slightly more difficult because the "env" command doesn't
necessarily quote values for consumption by the shell. The strategy
used here is a bit fragile (assumes double-quotes, no nested quotes)
but this is test code and only developers are expected to use this
override.
Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
Autobuild-User(master): Martin Schwenke <martins@samba.org>
Autobuild-Date(master): Tue Mar 1 08:56:09 CET 2016 on sn-devel-144
Martin Schwenke [Fri, 26 Feb 2016 08:36:25 +0000 (19:36 +1100)]
ctdb-tests: Change local daemon startup to use ctdbd_wrapper
This uses a configuration file which can be more easily overridden
that explicit command-line options.
Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
Martin Schwenke [Fri, 26 Feb 2016 05:51:50 +0000 (16:51 +1100)]
ctdb-tests: Simplify handling of public addresses for local daemons
Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
Martin Schwenke [Fri, 26 Feb 2016 05:47:59 +0000 (16:47 +1100)]
ctdb-scripts: Allow configuration file to be overridden
For testing only (so not documented), set CTDBD_CONF.
Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
Martin Schwenke [Mon, 29 Feb 2016 04:18:52 +0000 (15:18 +1100)]
lib/util: Add strv_util.[ch] containing new function strv_split()
strv_split() adds to a strv by splitting a string on separators.
Tests included.
Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Volker Lendecke <vl@samba.org>
Steven Chamberlain [Thu, 11 Feb 2016 02:27:29 +0000 (02:27 +0000)]
ctdb: Fix detection of gnukfreebsd
GNU/kFreeBSD's platform name is 'gnukfreebsd', not just 'kfreebsd'.
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Garming Sam <garming@catalyst.net.nz>
Autobuild-User(master): Garming Sam <garming@samba.org>
Autobuild-Date(master): Tue Mar 1 05:42:23 CET 2016 on sn-devel-144
Aurelien Aptel [Thu, 25 Feb 2016 13:11:10 +0000 (14:11 +0100)]
lib/util/util.c: move null-check before use
moves a null pointer check *before* the pointer is used in
the strlen() call
- still allocate the `fname` array on the stack
- still compiles under C90 definition/code mixing rules
Signed-off-by: Aurelien Aptel <aaptel@suse.com>
Reviewed-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Ralph Boehme <rb@sernet.de>
Autobuild-User(master): Jeremy Allison <jra@samba.org>
Autobuild-Date(master): Tue Mar 1 02:25:22 CET 2016 on sn-devel-144
Michael Adam [Mon, 29 Feb 2016 00:52:42 +0000 (01:52 +0100)]
torture:smb2: fix skip message if share is not CA
Signed-off-by: Michael Adam <obnox@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
Michael Adam [Mon, 29 Feb 2016 00:52:07 +0000 (01:52 +0100)]
torture:smb2: skip replay5 test if server does not support persistent handles
Signed-off-by: Michael Adam <obnox@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
Michael Adam [Mon, 29 Feb 2016 00:51:23 +0000 (01:51 +0100)]
torture:smb2: skip replay3 if server does not support Multi-Channel
Signed-off-by: Michael Adam <obnox@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
Martin Schwenke [Mon, 29 Feb 2016 09:04:19 +0000 (20:04 +1100)]
lib/util: Add tests for strv_addn()
Also some other minor test cleanups.
Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Volker Lendecke <vl@samba.org>
Autobuild-User(master): Volker Lendecke <vl@samba.org>
Autobuild-Date(master): Mon Feb 29 15:18:17 CET 2016 on sn-devel-144
Volker Lendecke [Mon, 29 Feb 2016 04:15:04 +0000 (15:15 +1100)]
lib/util: Add strv_addn()
strv_addn() adds some number of characters from an existing string.
This is useful for parsing.
Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Martin Schwenke <martin@meltin.net>
Martin Schwenke [Mon, 29 Feb 2016 08:49:39 +0000 (19:49 +1100)]
Revert "lib/util: Expose strv_addn() for adding string with specified length"
This reverts commit
0c61dd15137b4603bd47b3d6ae18ded6bd18ffae.
The intention of strv_addn() is to be able to add some number of
characters from an existing string. This implementation carelessly
assumes that the old _strv_append() added the trailing NUL to form a
valid strv. That's not true.
New implementation to follow.
Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Volker Lendecke <vl@samba.org>
Michael Adam [Sun, 28 Feb 2016 00:46:47 +0000 (01:46 +0100)]
smbd:smb2_creat: remove outdated TODO comments
Leases have meanwhile been implemented and the
TODO has been taken care of.
Signed-off-by: Michael Adam <obnox@samba.org>
Reviewed-by: Jeremy Allson <jra@samba.org>
Autobuild-User(master): Jeremy Allison <jra@samba.org>
Autobuild-Date(master): Sun Feb 28 08:16:26 CET 2016 on sn-devel-144
Michael Adam [Sat, 27 Feb 2016 00:58:45 +0000 (01:58 +0100)]
smbXsrv_client: factor fetch-locking of global record into function
Signed-off-by: Michael Adam <obnox@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
Michael Adam [Sat, 27 Feb 2016 00:37:34 +0000 (01:37 +0100)]
smbXsrv_session: factor fetch-locking of local record into function
Signed-off-by: Michael Adam <obnox@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
Michael Adam [Sat, 27 Feb 2016 00:26:16 +0000 (01:26 +0100)]
smbXsrv_session: factor fetch-locking of global record into function
Signed-off-by: Michael Adam <obnox@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
Michael Adam [Sat, 27 Feb 2016 00:06:13 +0000 (01:06 +0100)]
smbXsrv_tcon: factor fetch-locking of local record into function
Signed-off-by: Michael Adam <obnox@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
Michael Adam [Fri, 26 Feb 2016 23:52:59 +0000 (00:52 +0100)]
smbXsrv_tcon: factor fetch-locking of global record into function
Signed-off-by: Michael Adam <obnox@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
Aurelien Aptel [Thu, 25 Feb 2016 13:39:10 +0000 (14:39 +0100)]
s3/libsmb/clirap2.c: use actual buffer size
data used to be a stack allocated array but was changed to a heap
allocated buffer by commit
95a81a3. Update sizeof(data) to data_size.
Signed-off-by: Aurelien Aptel <aaptel@suse.com>
Reviewed-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Ira Cooper <ira@samba.org>
Autobuild-User(master): Jeremy Allison <jra@samba.org>
Autobuild-Date(master): Sat Feb 27 05:25:40 CET 2016 on sn-devel-144
Michael Adam [Thu, 25 Feb 2016 23:53:22 +0000 (00:53 +0100)]
smbXsrv_open: factor fetch-locking of local record into function
smbXsrv_open_local_fetch_locked()
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): Fri Feb 26 22:35:28 CET 2016 on sn-devel-144
Michael Adam [Thu, 25 Feb 2016 23:41:24 +0000 (00:41 +0100)]
smbXsrv_open: factor fetch-locking of global record into function
smbXsrv_open_global_fetch_locked()
Signed-off-by: Michael Adam <obnox@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
Martin Schwenke [Fri, 26 Feb 2016 04:23:31 +0000 (15:23 +1100)]
lib/util: Add tests for strv
These are blackbox tests against most of the API.
It would be possible to write tests that check the internals of the
strv are as expected but that probably doesn't add much value.
Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Jeremy Allison <jra@samba.org>
Aurelien Aptel [Thu, 25 Feb 2016 12:58:01 +0000 (13:58 +0100)]
lib/util/idtree.c: fix UB by using uint in left-shift
Using negative values on the left-side of a left-shift operation is an
Undefined Behaviour in C.
Signed-off-by: Aurelien Aptel <aaptel@suse.com>
Reviewed-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Ira Cooper <ira@samba.org>
Christian Ambach [Sat, 6 Feb 2016 09:30:29 +0000 (10:30 +0100)]
selftest: Add a blackbox test for smbget
Signed-off-by: Christian Ambach <ambi@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
Autobuild-User(master): Christian Ambach <ambi@samba.org>
Autobuild-Date(master): Fri Feb 26 14:40:55 CET 2016 on sn-devel-144
Christian Ambach [Thu, 4 Feb 2016 20:41:08 +0000 (21:41 +0100)]
selftest: add a helper for the smbget binary
Signed-off-by: Christian Ambach <ambi@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
Christian Ambach [Wed, 17 Feb 2016 23:48:04 +0000 (00:48 +0100)]
selftest: Reduce code duplication
Factor out a createuser sub.
Signed-off-by: Christian Ambach <ambi@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
Christian Ambach [Sat, 20 Feb 2016 20:11:51 +0000 (21:11 +0100)]
s3:utils/smbget fix option parsing
* use proper values for val in poptOption
* popt does not support bool, so set them via the switch statement
* abort when option parsing reported errors
Signed-off-by: Christian Ambach <ambi@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
Christian Ambach [Wed, 17 Feb 2016 21:57:59 +0000 (22:57 +0100)]
WHATSNEW: document removal of -P in smbget
Signed-off-by: Christian Ambach <ambi@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
Christian Ambach [Wed, 17 Feb 2016 18:25:59 +0000 (19:25 +0100)]
s3:utils/smbget update manpage with -P option removal
Signed-off-by: Christian Ambach <ambi@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
Christian Ambach [Mon, 15 Feb 2016 21:25:11 +0000 (22:25 +0100)]
s3:utils/smbget remove -P option
as agreed on samba-technical list.
It does not really provide a useful function but can cause confusion
Signed-off-by: Christian Ambach <ambi@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
Christian Ambach [Mon, 8 Feb 2016 22:27:09 +0000 (23:27 +0100)]
s3:utils/smbget improve check of write() result
check that all bytes in the buffer have been written
Signed-off-by: Christian Ambach <ambi@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
Christian Ambach [Mon, 8 Feb 2016 22:25:04 +0000 (23:25 +0100)]
s3:utils/smbget abort recursive download on error
Signed-off-by: Christian Ambach <ambi@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
Christian Ambach [Mon, 8 Feb 2016 22:24:36 +0000 (23:24 +0100)]
s3:utils/smbget another int -> bool conversion
Signed-off-by: Christian Ambach <ambi@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
Stefan Metzmacher [Fri, 22 Jan 2016 08:57:04 +0000 (09:57 +0100)]
s3:libads: setup the msDS-SupportedEncryptionTypes attribute on ldap_add
We may not have the permission to modify the object after creation.
BUG: https://bugzilla.samba.org/show_bug.cgi?id=11755
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Björn Jacke <bj@sernet.de>
Reviewed-by: Günther Deschner <gd@samba.org>
Autobuild-User(master): Stefan Metzmacher <metze@samba.org>
Autobuild-Date(master): Fri Feb 26 11:30:03 CET 2016 on sn-devel-144
Martin Schwenke [Wed, 24 Feb 2016 05:05:34 +0000 (16:05 +1100)]
ctdb: Drop unnecessary defines of TEVENT_DEPRECATED
These have been scattered around the code so that
tevent_loop_allow_nesting() can be called. However, only the main
daemon and some tests currently use nested event loops.
TEVENT_DEPRECATED is already defined in the places where it is needed.
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): Fri Feb 26 07:11:29 CET 2016 on sn-devel-144
Christof Schmitt [Thu, 25 Feb 2016 20:42:21 +0000 (13:42 -0700)]
vfs_gpfs: Fix compile after change in get_nt_acl_fn
Signed-off-by: Christof Schmitt <cs@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
Autobuild-User(master): Jeremy Allison <jra@samba.org>
Autobuild-Date(master): Fri Feb 26 01:21:21 CET 2016 on sn-devel-144
Aurelien Aptel [Thu, 25 Feb 2016 13:17:46 +0000 (14:17 +0100)]
s3/lib/netapi/tests/netuser.c: fix wrong closing paren
Signed-off-by: Aurelien Aptel <aaptel@suse.com>
Reviewed-by: David Disseldorp <ddiss@samba.org>
Reviewed-by: Michael Adam <obnox@samba.org>
Revewied-by: Jeremy Allison <jra@samba.org>
Aurelien Aptel [Thu, 25 Feb 2016 14:55:07 +0000 (15:55 +0100)]
s3/vfs_btrfs.c: use sizeof() instead of ARRAY_SIZE()
The `unused` member being set to zero is an uint64_t array. We want the
byte size here.
Signed-off-by: Aurelien Aptel <aaptel@suse.com>
Reviewed-by: David Disseldorp <ddiss@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
Uri Simchoni [Thu, 25 Feb 2016 05:08:06 +0000 (07:08 +0200)]
smbd: ignore SVHDX create context
According to discussions with dochelp@microsoft.com, an SMB
server should ignore an SVHDX_OPEN_DEVICE_CONTEXT or
SVHDX_OPEN_DEVICE_CONTEXT_V2 create context if it does not
support the RSVD protocol. This is contrary to [MS-SMB2] rev 48.0
which states (3.3.5.9.14) that the open should fail in this case.
Failing the create fails Windows backup if the SMB dialect is
SMB3.0.2 or higher.
Hopefully a new revision of MS-SMB2 will clear this up in the future.
Meanwhile, this patch modifies smbd to ignore the
SVHDX_OPEN_DEVICE_CONTEXT by default. This can be overriden by a VFS
module if a VFS module adds support for RSVD.
BUG: https://bugzilla.samba.org/show_bug.cgi?id=11753
Signed-off-by: Uri Simchoni <uri@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Richard Sharpe <realrichardsharpe@gmail.com>
Jeremy Allison [Wed, 24 Feb 2016 22:02:45 +0000 (14:02 -0800)]
VFS: Modify rmdir to take a const struct smb_filename * instead of const char *
Preparing to reduce use of lp_posix_pathnames().
Uses the same techniques as commit
616d068f0cebb8e50a855b6e30f36fccb7f5a3c8
(synthetic_smb_fname()) to cope with modules that
modify the incoming pathname.
Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Michael Adam <obnox@samba.org>
Autobuild-User(master): Michael Adam <obnox@samba.org>
Autobuild-Date(master): Thu Feb 25 20:46:49 CET 2016 on sn-devel-144
Jeremy Allison [Wed, 24 Feb 2016 22:00:27 +0000 (14:00 -0800)]
vfs:ceph: Fix mkdir_fn to take struct smb_filename * insted of char *
Missed in previous VFS change.
Signed-off-by: Jeremy Allison <jra@samba.org>
Jeremy Allison [Wed, 24 Feb 2016 21:58:16 +0000 (13:58 -0800)]
vfs:glusterfs: Fix mkdir_fn to take struct smb_filename * instead of char *
Missed in previous VFS change.
Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Michael Adam <obnox@samba.org>
Martin Schwenke [Thu, 25 Feb 2016 04:35:44 +0000 (15:35 +1100)]
lib/util: Expose strv_addn() for adding string with specified length
This is just a rename of previously static function _strv_append().
strv is now more useful for parsing.
Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Volker Lendecke <vl@samba.org>
Autobuild-User(master): Volker Lendecke <vl@samba.org>
Autobuild-Date(master): Thu Feb 25 13:43:31 CET 2016 on sn-devel-144
Andrew Bartlett [Wed, 24 Feb 2016 03:39:38 +0000 (16:39 +1300)]
samba-tool: Support preloading multiple users
Based on patches by Adrian Cochrane
Signed-off-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Garming Sam <garming@catalyst.net.nz>
Autobuild-User(master): Andrew Bartlett <abartlet@samba.org>
Autobuild-Date(master): Thu Feb 25 07:58:55 CET 2016 on sn-devel-144
Andrew Bartlett [Wed, 24 Feb 2016 23:42:09 +0000 (12:42 +1300)]
python: Allow optional multi-value arguements for samba-tool commands
Signed-off-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Garming Sam <garming@catalyst.net.nz>
Jeremy Allison [Tue, 23 Feb 2016 21:14:03 +0000 (13:14 -0800)]
s3: VFS: Modify mkdir to take a const struct smb_filename * instead of const char *
Preparing to reduce use of lp_posix_pathnames().
Uses the same techniques as commit
616d068f0cebb8e50a855b6e30f36fccb7f5a3c8
(synthetic_smb_fname()) to cope with modules that
modify the incoming pathname.
Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Uri Simchoni <uri@samba.org>
Autobuild-User(master): Uri Simchoni <uri@samba.org>
Autobuild-Date(master): Wed Feb 24 16:05:55 CET 2016 on sn-devel-144
Amitay Isaacs [Sat, 21 Nov 2015 12:36:00 +0000 (23:36 +1100)]
ctdb-client: Add missing initialisation of calldata
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 Feb 24 11:57:23 CET 2016 on sn-devel-144
Amitay Isaacs [Fri, 20 Nov 2015 05:22:41 +0000 (16:22 +1100)]
ctdb-client: Keep trying to migrate till record lock is obtained
If a record is not on a local node, then it is migrated from remote node.
However, before the client can get a lock on the record, it's possible
for the record to get migrated away. In that case, repeat migration.
Signed-off-by: Amitay Isaacs <amitay@gmail.com>
Reviewed-by: Martin Schwenke <martin@meltin.net>
Amitay Isaacs [Wed, 18 Nov 2015 04:15:16 +0000 (15:15 +1100)]
ctdb-client: Remove TALLOC_CTX argument from sync functions
There is no allocated memory returned from these functions.
Signed-off-by: Amitay Isaacs <amitay@gmail.com>
Reviewed-by: Martin Schwenke <martin@meltin.net>
Amitay Isaacs [Wed, 18 Nov 2015 04:11:37 +0000 (15:11 +1100)]
ctdb-client: Add async version of set/remove message handler functions
Signed-off-by: Amitay Isaacs <amitay@gmail.com>
Reviewed-by: Martin Schwenke <martin@meltin.net>
Amitay Isaacs [Tue, 17 Nov 2015 05:58:26 +0000 (16:58 +1100)]
ctdb-client: Add sync API for waiting for recovery
Signed-off-by: Amitay Isaacs <amitay@gmail.com>
Reviewed-by: Martin Schwenke <martin@meltin.net>
Amitay Isaacs [Tue, 17 Nov 2015 05:52:54 +0000 (16:52 +1100)]
ctdb-client: Drop TALLOC_CTX argument from ctdb_attach
The database context returned is allocated off the client and is not
allocated from user-supplied TALLOC_CTX.
Signed-off-by: Amitay Isaacs <amitay@gmail.com>
Reviewed-by: Martin Schwenke <martin@meltin.net>
Amitay Isaacs [Tue, 10 Nov 2015 05:59:21 +0000 (16:59 +1100)]
ctdb-client: Add new API for ctdb_client_wait_timeout()
This is similar to ctdb_client_wait() with additional timeout argument.
Signed-off-by: Amitay Isaacs <amitay@gmail.com>
Reviewed-by: Martin Schwenke <martin@meltin.net>
Amitay Isaacs [Fri, 6 Nov 2015 06:08:48 +0000 (17:08 +1100)]
ctdb-client: Do not use sync functions in async computation
This leads to nested event loops.
Signed-off-by: Amitay Isaacs <amitay@gmail.com>
Reviewed-by: Martin Schwenke <martin@meltin.net>
Amitay Isaacs [Fri, 6 Nov 2015 04:44:27 +0000 (15:44 +1100)]
ctdb-client: Do not use sync functions in async computation
This leads to nested event loops.
Signed-off-by: Amitay Isaacs <amitay@gmail.com>
Reviewed-by: Martin Schwenke <martin@meltin.net>
Volker Lendecke [Wed, 17 Feb 2016 13:01:47 +0000 (14:01 +0100)]
idmap_script: Parallelize script calls
Fixes a case I've seen where a user with 200 group memberships timed out and
can now log in.
Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Michael Adam <obnox@samba.org>
Autobuild-User(master): Michael Adam <obnox@samba.org>
Autobuild-Date(master): Wed Feb 24 01:17:25 CET 2016 on sn-devel-144
Volker Lendecke [Mon, 22 Feb 2016 10:59:52 +0000 (11:59 +0100)]
lib: Avoid an unnecessary cast
Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Michael Adam <obnox@samba.org>
Volker Lendecke [Tue, 16 Feb 2016 16:09:43 +0000 (17:09 +0100)]
lib: Remove "includes.h" from util_file.c
Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Michael Adam <obnox@samba.org>
Volker Lendecke [Tue, 16 Feb 2016 16:01:04 +0000 (17:01 +0100)]
lib: Add file_pload_send/recv
Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Michael Adam <obnox@samba.org>
Volker Lendecke [Tue, 16 Feb 2016 15:29:01 +0000 (16:29 +0100)]
lib: Add "mem_ctx" to file_lines_pload
Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Michael Adam <obnox@samba.org>
Volker Lendecke [Tue, 16 Feb 2016 15:24:29 +0000 (16:24 +0100)]
lib: Remove an unimplemented prototype
Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Michael Adam <obnox@samba.org>
Volker Lendecke [Tue, 16 Feb 2016 14:58:52 +0000 (15:58 +0100)]
lib: Extract sys_popen()
This was added by Jeremy with
3cf31a194f5, do the (C) accordingly
sys_popen is a pretty isolated functionality, and I'd like to use it
soon without "includes.h", needed by "proto.h"
Except for one malloc->talloc this is supposed to be a 1:1 copy
Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Michael Adam <obnox@samba.org>
Volker Lendecke [Tue, 16 Feb 2016 14:46:06 +0000 (15:46 +0100)]
lib: Remove sys_waitpid
We have waitpid in libreplace
Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Michael Adam <obnox@samba.org>
Volker Lendecke [Tue, 16 Feb 2016 13:59:53 +0000 (14:59 +0100)]
lib: Fix whitespace
Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Michael Adam <obnox@samba.org>
Volker Lendecke [Sat, 20 Feb 2016 09:07:11 +0000 (10:07 +0100)]
lib: Move data_blob_list_item to source4
It's only used in dcesrv_call_state.
Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Michael Adam <obnox@samba.org>
Volker Lendecke [Thu, 14 Jan 2016 10:51:39 +0000 (11:51 +0100)]
smbd: Fix line length & whitespace in write_file
No code change intended. This file just looked to hard to read.
Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Michael Adam <obnox@samba.org>
Volker Lendecke [Wed, 13 Jan 2016 10:15:36 +0000 (11:15 +0100)]
py_xattr: Fix a "ignoring return value" warning
Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Michael Adam <obnox@samba.org>
Uri Simchoni [Tue, 9 Feb 2016 22:38:11 +0000 (00:38 +0200)]
winbindd: return trust parameters when listing trusts
When asking a child domain process to list trusts on that domain,
return (along with trust domain names and SID) the trust properties -
flags, type, and attributes.
Use those attributes to initialize domain object.
BUG: https://bugzilla.samba.org/show_bug.cgi?id=11691
Signed-off-by: Uri Simchoni <uri@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
Autobuild-User(master): Ralph Böhme <slow@samba.org>
Autobuild-Date(master): Tue Feb 23 22:02:16 CET 2016 on sn-devel-144
Uri Simchoni [Tue, 9 Feb 2016 22:32:23 +0000 (00:32 +0200)]
winbindd: initialize foreign domain as AD based on trust
Based on trust parameters, initialize the active_directory
member of domain object to true.
BUG: https://bugzilla.samba.org/show_bug.cgi?id=11691
Signed-off-by: Uri Simchoni <uri@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
Uri Simchoni [Tue, 9 Feb 2016 22:26:45 +0000 (00:26 +0200)]
winbindd: introduce add_trusted_domain_from_tdc()
This is purely a refactoring patch -
Add a routine that adds a winbindd domain object based on
domain trust cache entry. add_trusted_domain() becomes
a wrapper for this new routine.
BUG: https://bugzilla.samba.org/show_bug.cgi?id=11691
Signed-off-by: Uri Simchoni <uri@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
Karolin Seeger [Tue, 23 Feb 2016 09:12:10 +0000 (10:12 +0100)]
s3/winbindd: Add missing space in debug message.
Signed-off-by: Karolin Seeger <kseeger@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
Autobuild-User(master): Karolin Seeger <kseeger@samba.org>
Autobuild-Date(master): Tue Feb 23 14:20:01 CET 2016 on sn-devel-144
Martin Schwenke [Mon, 1 Feb 2016 00:46:05 +0000 (11:46 +1100)]
ctdb-recovery: Limit scope of reclock latency statistics
It does not make sense to update this statistic for the timeout case,
since this could skew the statistic. To keep it simple, just update
it for the usual case where there is lock contention, since this is
the usual case. So the daemon statistic measures time to test the
lock and the corresponding recovery daemon statistic measures time to
take the lock.
Additionally, the recovery daemon will eventually use this code to
take the lock, and the method of updating the latency statistic will
need to be pushed further out to a configurable handler that depends
on the calling context.
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 Feb 23 10:32:06 CET 2016 on sn-devel-144
Martin Schwenke [Thu, 28 Jan 2016 04:07:30 +0000 (15:07 +1100)]
ctdb-recovery: Negate the status when checking the recovery lock
Have 0 indicate that the lock was taken. This allows non-zero values
to be used to indicate why the lock could not be taken. EACCES means
lock contention.
For now use just EACCES to cover all failures, since
ctdb_recovery_lock() returns a bool and details of other errors will
be lost. ctdb_recovery_lock() will undergo some big changes, so don't
try to fix this now.
Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
Martin Schwenke [Thu, 28 Jan 2016 03:59:18 +0000 (14:59 +1100)]
ctdb-recovery: Clean up status handling from recmode child
This currently returns an incorrect error when the expected number of
bytes are not read. Separate out the different cases to clarify the
logic and avoid reporting the wrong error.
Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
Martin Schwenke [Mon, 11 Jan 2016 03:50:14 +0000 (14:50 +1100)]
ctdb-recovery: Don't bother ensuring file descriptor is -1
This is already done before the destructor is assigned.
Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
Martin Schwenke [Mon, 11 Jan 2016 02:58:54 +0000 (13:58 +1100)]
ctdb-recovery: Don't store recmode in recovery mode state
The callbacks that use this value are only ever called if recovery
mode is being set to NORMAL. So do not check if recmode is NORMAL
either.
Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
Martin Schwenke [Tue, 8 Dec 2015 03:20:59 +0000 (14:20 +1100)]
ctdb: Use ctdb_wait_for_process_to_exit()
Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
Martin Schwenke [Tue, 8 Dec 2015 03:12:46 +0000 (14:12 +1100)]
ctdb-common: New function ctdb_wait_for_process_to_exit()
This pattern is used quite a few times in the CTDB code. Many
instances use ctdb_kill() but for signal 0 this just calls kill(2)
anyway.
Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
Martin Schwenke [Tue, 8 Dec 2015 03:21:33 +0000 (14:21 +1100)]
ctdb-recovery: Drop redundant status send when setting recovery mode
The child process writes the status into the pipe before looping to
wait.
Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
Martin Schwenke [Tue, 16 Feb 2016 02:41:21 +0000 (13:41 +1100)]
ctdb-recovery: Include lib/util/time.h instead of samba_util.h
Less is more...
Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
Michael Adam [Mon, 22 Feb 2016 23:27:11 +0000 (00:27 +0100)]
torture:smb2: improve torture_comments in connect test
Signed-off-by: Michael Adam <obnox@samba.org>
Autobuild-User(master): Jeremy Allison <jra@samba.org>
Autobuild-Date(master): Tue Feb 23 04:50:53 CET 2016 on sn-devel-144
Michael Adam [Mon, 22 Feb 2016 22:23:13 +0000 (23:23 +0100)]
torture:smb2: fix memory leak in connect test.
Signed-off-by: Michael Adam <obnox@samba.org>
Michael Adam [Mon, 22 Feb 2016 15:22:14 +0000 (16:22 +0100)]
torture:smb2: rewrite connect test to use torture_asserts for create errors
let torture_smb2_createfile propagate errors
Signed-off-by: Michael Adam <obnox@samba.org>
Michael Adam [Mon, 22 Feb 2016 13:32:44 +0000 (14:32 +0100)]
torture:smb2: rewrite connect test to use torture_asserts
Signed-off-by: Michael Adam <obnox@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>