Andrew Bartlett [Mon, 12 May 2014 05:10:14 +0000 (17:10 +1200)]
selftest: Make test_wbinfo.sh work with s3-winbindd
Change-Id: I41ed850b6424eac3fb8b6603d5b87c66bb77dd51
Signed-off-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
Andrew Bartlett [Mon, 12 May 2014 02:29:27 +0000 (14:29 +1200)]
libwbclient-tests: No longer hardcoded password and test domain
The password is made more complex, and the test domain is made to
use the command line options.
Andrew Bartlett
Change-Id: Ia1ec24a9fc393e7f7b210f845bcf32dbc933d48f
Signed-off-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
Andrew Bartlett [Wed, 9 Apr 2014 03:37:33 +0000 (15:37 +1200)]
selftest: Run samba4.blackbox.wbinfo against plugin_s4_dc
Change-Id: I5580de814d5fe000d352f3c78743837d26f9422d
Signed-off-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
Andrew Bartlett [Mon, 31 Mar 2014 07:47:18 +0000 (20:47 +1300)]
selftest: Set winbind separator = /
This avoids a pile of shell-script escape pain, and fixes some tests.
Andrew Bartlett
Change-Id: Ie1d0e32ab484a5b0ddbc4073831fe6de27e38e92
Signed-off-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
Andrew Bartlett [Fri, 23 May 2014 21:44:58 +0000 (09:44 +1200)]
selftest: Ensure winbindd is fully operating before running tests
Signed-off-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
Andrew Bartlett [Sat, 24 May 2014 10:47:30 +0000 (22:47 +1200)]
selftest: consitently use the name s4member
This avoids a conflict with the Samba3.pm defined member environment, and so spurious
failures in make test for the member environment dependent on test ordering.
Andrew Bartlett
Signed-off-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
Andrew Bartlett [Tue, 3 Jun 2014 08:20:08 +0000 (20:20 +1200)]
docs: Remove out of date Kerberos and security chapter
Signed-off-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
Autobuild-User(master): Jeremy Allison <jra@samba.org>
Autobuild-Date(master): Tue Jun 3 21:24:45 CEST 2014 on sn-devel-104
Andrew Bartlett [Tue, 3 Jun 2014 08:20:07 +0000 (20:20 +1200)]
docs: Multiple passdb backend support has been removed
Signed-off-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
Andrew Bartlett [Tue, 3 Jun 2014 08:20:06 +0000 (20:20 +1200)]
docs: Remove most references to Samba-3 and change to just Samba
References are kept where the version number makes sense in the context.
Andrew Bartlett
Signed-off-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
Andrew Bartlett [Tue, 3 Jun 2014 08:20:05 +0000 (20:20 +1200)]
docs: Samba is now GPLv3
Signed-off-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
Andrew Bartlett [Tue, 3 Jun 2014 08:20:04 +0000 (20:20 +1200)]
docs: Remove references to SWAT (now removed)
Signed-off-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
Volker Lendecke [Mon, 2 Jun 2014 20:48:56 +0000 (22:48 +0200)]
messaging3: Fix a talloc_tos memleak
Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
Michael Adam [Sat, 31 May 2014 10:16:08 +0000 (12:16 +0200)]
s3:messaging: protect use of msg_control with HAVE_STRUCT_MSGHDR_MSG_CONTROL
Signed-off-by: Michael Adam <obnox@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
Autobuild-User(master): Michael Adam <obnox@samba.org>
Autobuild-Date(master): Tue Jun 3 01:14:17 CEST 2014 on sn-devel-104
Michael Adam [Sat, 31 May 2014 10:05:50 +0000 (12:05 +0200)]
build: rename HAVE_MSGHDR_MSG_ACCTRIGHTS to HAVE_STRUCT_MSGHDR_MSG_ACCTRIGHTS
for consistency.
Signed-off-by: Michael Adam <obnox@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
Michael Adam [Sat, 31 May 2014 10:04:05 +0000 (12:04 +0200)]
build: rename HAVE_MSGHDR_MSG_CONTROL to HAVE_STRUCT_MSGHDR_MSG_CONTROL
So that we are consistent with the socket_wrapper define.
Signed-off-by: Michael Adam <obnox@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
Michael Adam [Sat, 31 May 2014 09:58:01 +0000 (11:58 +0200)]
vfs:aio_fork: simplify checking of MSG_CONTROL and MSG_ACCTRIGHTS
Signed-off-by: Michael Adam <obnox@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
Stefan Metzmacher [Fri, 23 May 2014 10:30:21 +0000 (12:30 +0200)]
s3:smb2_server: call smbd_smb2_flush_send_queue() directly
This avoids recursion into smbd_smb2_io_handler(),
which avoids confusion when analysing out put of
performance analysing tools, e.g. callgrind.
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): Sat May 31 04:25:36 CEST 2014 on sn-devel-104
Stefan Metzmacher [Fri, 23 May 2014 10:21:57 +0000 (12:21 +0200)]
s3:smb2_server: fix invalid TALLOC_FREE(iov) in smbd_smb2_inbuf_parse_compound()
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
Volker Lendecke [Tue, 18 Feb 2014 19:51:23 +0000 (20:51 +0100)]
messaging3: Enforce just one messaging context
The current messaging implementation is based on a tdb indexed by server_id. If
we have more than one messaging context in a process, messages might not arrive
at the right context and be dropped, depending on which signal handler is
triggered first.
This is the same patch as
bd55fdb lifted to messaging.c
Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
Volker Lendecke [Thu, 29 May 2014 14:44:55 +0000 (16:44 +0200)]
messaging3: Make messaging_context private
Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
Volker Lendecke [Thu, 29 May 2014 14:44:32 +0000 (16:44 +0200)]
messaging3: Add and use messaging_tevent_context()
Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
Volker Lendecke [Thu, 29 May 2014 13:01:03 +0000 (15:01 +0200)]
messaging3: Introduce messaging_local_backend()
Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
Volker Lendecke [Thu, 29 May 2014 12:51:37 +0000 (14:51 +0200)]
messaging3: The backend send_fn doesn't need a messaging_context
Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
Volker Lendecke [Thu, 29 May 2014 11:10:45 +0000 (13:10 +0200)]
imessaging: Fix a comment
Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
Samuel Cabrero [Wed, 28 May 2014 15:57:31 +0000 (17:57 +0200)]
Fix several talloc stack frames not freed
Signed-off-by: Samuel Cabrero <scabrero@zentyal.com>
Reviewed-by: Kamen Mazdrashki <kamenim@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Autobuild-User(master): Kamen Mazdrashki <kamenim@samba.org>
Autobuild-Date(master): Fri May 30 15:29:29 CEST 2014 on sn-devel-104
Michael Adam [Tue, 13 May 2014 10:42:32 +0000 (12:42 +0200)]
s3:messaging: change unix_dgram_recv_handler() to use recvmsg, not recv
This is in preparation of adding fd-passing to messaging.
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 May 30 02:28:15 CEST 2014 on sn-devel-104
Michael Adam [Tue, 13 May 2014 09:55:37 +0000 (11:55 +0200)]
s3:messaging: change messaging_backend to use iovec instead of data blob in send_fn
This also changes the layering
messaging_send_iov -> messaging_send_buf -> messaging_send
to
messaging_send_buf -> messaging_send -> messaging_send_iov
Signed-off-by: Michael Adam <obnox@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
Martin Schwenke [Fri, 23 May 2014 11:58:55 +0000 (21:58 +1000)]
ctdb-tools-ctdb: Make natgwlist and lvsmaster more resilient
Recent changes have caused these commands to attempt to get
capabilities from all nodes before doing further filtering. This
means that capabilities are unnecessarily fetched from nodes that are
unlikely to be the master. If such a node does not answer the control
then many nodes can fail to calculate the master node. In the case of
natgwlist this will cause "monitor" events to fail resulting in
unhealthy nodes.
Restore the behaviour where capabilities are only fetched for a node
that will be the master if it has the desired flags.
Although this masks a problem where a connected node is not replying,
it can help to avoid an outage in some cases.
Add supporting tests and infrastructure. Infrastructure just lets a
timeout be faked - just for ctdb_ctrl_getcapabilities_stub() so far.
First test checks that this infrastructure works if the first node
times out in natgwlist. Second test checks the case worked around by
the above fix - that is, no failure when a node with PNN beyond the
NATGW master can time out.
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): Thu May 29 05:59:37 CEST 2014 on sn-devel-104
Amitay Isaacs [Wed, 28 May 2014 00:40:29 +0000 (10:40 +1000)]
ctdb-ib: Make infiniband transport compile again
Update included header files and fix compilation warnings.
ib/ibwrapper.c: In function ‘ibw_stop’:
ib/ibwrapper.c:1015:17: warning: comparison between ‘enum ibw_state_ctx’ and ‘enum ibw_state_conn’ [-Wenum-compare]
if (ctx->state==IBWC_ERROR || ctx->state==IBWC_CONNECTED) {
^
ib/ibwrapper.c:1015:43: warning: comparison between ‘enum ibw_state_ctx’ and ‘enum ibw_state_conn’ [-Wenum-compare]
if (ctx->state==IBWC_ERROR || ctx->state==IBWC_CONNECTED) {
The current logic just seems wrong. The context of this line and the
error checking in ibw_disconnect() suggest that these comparisons
should use p->state rather than ctx->state, so do that.
Signed-off-by: Amitay Isaacs <amitay@gmail.com>
Reviewed-by: Martin Schwenke <martin@meltin.net>
Amitay Isaacs [Tue, 27 May 2014 22:09:02 +0000 (08:09 +1000)]
ctdb-pmda: Do not hardcode include paths
Signed-off-by: Amitay Isaacs <amitay@gmail.com>
Reviewed-by: Martin Schwenke <martin@meltin.net>
David Disseldorp [Wed, 28 May 2014 15:50:52 +0000 (17:50 +0200)]
libcli/security: remove sec_ace_equal
This function is a duplicate of security_ace_equal(), and is no longer
used.
Signed-off-by: David Disseldorp <ddiss@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Autobuild-User(master): Andrew Bartlett <abartlet@samba.org>
Autobuild-Date(master): Thu May 29 03:34:38 CEST 2014 on sn-devel-104
David Disseldorp [Wed, 28 May 2014 15:44:43 +0000 (17:44 +0200)]
secdesc: use security_ace_equal instead of sec_ace_equal
Both offer the same functionality, sec_ace_equal() will be removed.
Signed-off-by: David Disseldorp <ddiss@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
David Disseldorp [Wed, 28 May 2014 15:44:43 +0000 (17:44 +0200)]
torture/attr: use security_ace_equal instead of sec_ace_equal
Both offer the same functionality, sec_ace_equal() will be removed.
Signed-off-by: David Disseldorp <ddiss@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
David Disseldorp [Wed, 28 May 2014 15:44:43 +0000 (17:44 +0200)]
s3/smbcacls: use security_ace_equal instead of sec_ace_equal
Both offer the same functionality, sec_ace_equal() will be removed.
Signed-off-by: David Disseldorp <ddiss@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
David Disseldorp [Wed, 28 May 2014 15:44:08 +0000 (17:44 +0200)]
s3/sharesec: use security_ace_equal instead of sec_ace_equal
Both offer the same functionality, sec_ace_equal() will be removed.
Signed-off-by: David Disseldorp <ddiss@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
David Disseldorp [Wed, 28 May 2014 15:42:08 +0000 (17:42 +0200)]
s3/libsmb_xattr: use security_ace_equal instead of sec_ace_equal
Both offer the same functionality, sec_ace_equal() will be removed.
Signed-off-by: David Disseldorp <ddiss@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
David Disseldorp [Wed, 28 May 2014 15:13:32 +0000 (17:13 +0200)]
libcli/security: cleanup security_ace_equal()
This change cleans up the white-space damage, and converts the single
line if-then statements to match Samba's coding conventions.
Signed-off-by: David Disseldorp <ddiss@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
David Disseldorp [Wed, 28 May 2014 15:11:20 +0000 (17:11 +0200)]
libcli/security: remove unused sec_ace_del_sid()
With sec_desc_del_sid() now gone, this can also be removed.
Signed-off-by: David Disseldorp <ddiss@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
David Disseldorp [Wed, 28 May 2014 14:48:59 +0000 (16:48 +0200)]
libcli/security: remove unused sec_desc_del_sid()
The function is unused, and shares mostly the same behaviour as
security_descriptor_acl_del().
Signed-off-by: David Disseldorp <ddiss@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
David Disseldorp [Wed, 28 May 2014 13:43:34 +0000 (15:43 +0200)]
libcli/security: remove dup_sec_acl()
With make_sec_desc() converted to use security_acl_dup(), which offers
the same behaviour, this function is no longer needed.
Signed-off-by: David Disseldorp <ddiss@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
David Disseldorp [Wed, 28 May 2014 13:25:29 +0000 (15:25 +0200)]
libcli/security: clean up and fix make_sec_desc
It currently leaks memory onto the provided talloc context on error, fix
this.
Use X_acl_dup() functions provided by secuity_descriptor.c, rather than
the redundant secdesc.c calls. Also, use the IDL generated functions to
calculate the security descriptor structure size.
Signed-off-by: David Disseldorp <ddiss@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
David Disseldorp [Tue, 27 May 2014 09:04:11 +0000 (11:04 +0200)]
s3/profiles: improve copy_registry_tree() errors
The current error logic doesn't distinguish between a NULL source
security descriptor and ENOMEM.
Signed-off-by: David Disseldorp <ddiss@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Volker Lendecke <vl@samba.org>
Autobuild-User(master): Jeremy Allison <jra@samba.org>
Autobuild-Date(master): Wed May 28 20:18:21 CEST 2014 on sn-devel-104
David Disseldorp [Mon, 26 May 2014 14:25:31 +0000 (16:25 +0200)]
libcli/secdesc: remove dup_sec_desc()
With all callers converted to use security_descriptor_copy(), this
function can be removed.
Signed-off-by: David Disseldorp <ddiss@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Volker Lendecke <vl@samba.org>
David Disseldorp [Mon, 26 May 2014 13:48:34 +0000 (15:48 +0200)]
libcli/secdesc: replace dup_sec_desc() usage
Use security_descriptor_copy() instead, which is also provided by
libcli.
Signed-off-by: David Disseldorp <ddiss@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Volker Lendecke <vl@samba.org>
David Disseldorp [Mon, 26 May 2014 13:48:34 +0000 (15:48 +0200)]
libgpo: replace dup_sec_desc() usage
Use security_descriptor_copy() instead, which is also provided by
libcli.
Signed-off-by: David Disseldorp <ddiss@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
David Disseldorp [Mon, 26 May 2014 13:48:34 +0000 (15:48 +0200)]
s3/rpc_server/lsa: replace dup_sec_desc() usage
Use security_descriptor_copy() instead, which is also provided by
libcli.
Signed-off-by: David Disseldorp <ddiss@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Volker Lendecke <vl@samba.org>
David Disseldorp [Mon, 26 May 2014 13:48:34 +0000 (15:48 +0200)]
s3/rpc_server/spoolss: replace dup_sec_desc() usage
Use security_descriptor_copy() instead, which is also provided by
libcli.
Signed-off-by: David Disseldorp <ddiss@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Volker Lendecke <vl@samba.org>
David Disseldorp [Mon, 26 May 2014 13:46:52 +0000 (15:46 +0200)]
s3/posix_acls: replace dup_sec_desc() usage
Use security_descriptor_copy() instead, which is also provided by
libcli.
Signed-off-by: David Disseldorp <ddiss@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Volker Lendecke <vl@samba.org>
David Disseldorp [Mon, 26 May 2014 13:46:00 +0000 (15:46 +0200)]
s3/net_rpc_printer: replace dup_sec_desc() usage
Use security_descriptor_copy() instead, which is also provided by
libcli.
Signed-off-by: David Disseldorp <ddiss@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Volker Lendecke <vl@samba.org>
David Disseldorp [Mon, 26 May 2014 13:41:41 +0000 (15:41 +0200)]
s3/profiles: replace dup_sec_desc() usage
Use security_descriptor_copy() instead, which is also provided by
libcli.
Signed-off-by: David Disseldorp <ddiss@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
David Disseldorp [Mon, 26 May 2014 13:20:13 +0000 (15:20 +0200)]
s3/rpc_server/spoolss: remove SETUP_SPOOLSS_NOTIFY_DATA_SECDESC
The macro is only used once, and is broken in two ways:
- it relies on an externally defined mem_ctx
- _data->data.sd.sd_size is set zero twice for a NULL sd
Signed-off-by: David Disseldorp <ddiss@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Volker Lendecke <vl@samba.org>
David Disseldorp [Mon, 26 May 2014 12:39:41 +0000 (14:39 +0200)]
sharesec: remove unused security descriptor print fns
IDL generated NDR routines are now used, so the old hand rolled
functions can be removed.
Signed-off-by: David Disseldorp <ddiss@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Volker Lendecke <vl@samba.org>
David Disseldorp [Mon, 26 May 2014 12:38:24 +0000 (14:38 +0200)]
sharesec: use NDR security descriptor print fns
Signed-off-by: David Disseldorp <ddiss@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Volker Lendecke <vl@samba.org>
David Disseldorp [Mon, 26 May 2014 10:34:38 +0000 (12:34 +0200)]
libcli/sd: remove redundant sec_ace_add_sid()
This function adds a new allow-type ACE to an existing ACE list. With
the removal of sec_desc_add_sid(), this is no longer used internally.
The same behaviour can be achieved via the much cleaner
security_ace_create() function.
Signed-off-by: David Disseldorp <ddiss@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Volker Lendecke <vl@samba.org>
David Disseldorp [Mon, 26 May 2014 10:23:47 +0000 (12:23 +0200)]
libcli/sd: remove redundant sec_desc_add_sid()
This function adds an ACE to a security descriptor DACL. The same can be
achieved via the more flexible and much cleaner security_ace_create()
and security_descriptor_dacl_add() functions.
Signed-off-by: David Disseldorp <ddiss@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Volker Lendecke <vl@samba.org>
Martin Schwenke [Tue, 6 May 2014 01:08:57 +0000 (11:08 +1000)]
ctdb-tools-ctdb: scriptstatus should not count disabled scripts
script_status->num_scripts is used as the count in this message:
"%d scripts were executed last %s cycle\n"
However, script_status->num_scripts includes disabled scripts, which
are never actually executed.
Instead, count the number of scripts that aren't disabled and make the
message print that.
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): Wed May 28 02:27:48 CEST 2014 on sn-devel-104
Michael Adam [Tue, 27 May 2014 12:30:10 +0000 (14:30 +0200)]
Remove obsolete README.packaging4.
Signed-off-by: Michael Adam <obnox@samba.org>
Reviewed-by: David Disseldorp <ddiss@samba.org>
Autobuild-User(master): David Disseldorp <ddiss@samba.org>
Autobuild-Date(master): Tue May 27 19:55:07 CEST 2014 on sn-devel-104
Volker Lendecke [Tue, 27 May 2014 07:04:38 +0000 (07:04 +0000)]
libcli: Simplify desc_ace_has_generic()
Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: David Disseldorp <ddiss@samba.org>
Volker Lendecke [Tue, 27 May 2014 07:03:18 +0000 (07:03 +0000)]
libcli: Simplify desc_expand_generic()
Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: David Disseldorp <ddiss@samba.org>
Volker Lendecke [Mon, 26 May 2014 21:01:38 +0000 (21:01 +0000)]
libcli: Avoid an explicit memset call
On x86 with -O3, this saves surprising 160 bytes .text
Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: David Disseldorp <ddiss@samba.org>
Volker Lendecke [Mon, 26 May 2014 20:57:31 +0000 (20:57 +0000)]
libcli: Avoid a talloc/free
Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: David Disseldorp <ddiss@samba.org>
Volker Lendecke [Mon, 26 May 2014 20:57:31 +0000 (20:57 +0000)]
libcli: Avoid a talloc/free
Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: David Disseldorp <ddiss@samba.org>
Amitay Isaacs [Tue, 13 May 2014 15:11:43 +0000 (01:11 +1000)]
s3-build: Support building with in-tree CTDB
If --with-ctdb-dir option is not specified, use CTDB headers from ctdb/
subdirectory in the source tree.
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 May 27 16:07:13 CEST 2014 on sn-devel-104
Amitay Isaacs [Tue, 13 May 2014 13:13:13 +0000 (23:13 +1000)]
ctdb-build: Move internal include files in a separate directory
This will allow to build clustered samba with built-in ctdb tree rather
than needing to install CTDB first.
Signed-off-by: Amitay Isaacs <amitay@gmail.com>
Reviewed-by: Michael Adam <obnox@samba.org>
Amitay Isaacs [Tue, 13 May 2014 15:40:22 +0000 (01:40 +1000)]
ctdb-build: Build ctdb_version.h before compiling files that include it
This will correctly build ctdb_version.h before other targets when
running make -j.
Signed-off-by: Amitay Isaacs <amitay@gmail.com>
Reviewed-by: Michael Adam <obnox@samba.org>
Volker Lendecke [Mon, 26 May 2014 20:48:05 +0000 (20:48 +0000)]
libcli: Fix a memleak
struct security_ace has a struct dom_sid, not a pointer to it. So we don't have
to talloc it first and then not free it.
Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
Autobuild-User(master): Volker Lendecke <vl@samba.org>
Autobuild-Date(master): Tue May 27 12:54:55 CEST 2014 on sn-devel-104
Volker Lendecke [Tue, 13 May 2014 13:02:57 +0000 (15:02 +0200)]
messaging3: Remove a pointless return;
Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Martin Schwenke <martin@meltin.net>
Autobuild-User(master): Martin Schwenke <martins@samba.org>
Autobuild-Date(master): Tue May 27 04:41:43 CEST 2014 on sn-devel-104
Volker Lendecke [Wed, 14 May 2014 07:31:20 +0000 (09:31 +0200)]
messaging3: Fix whitespace
Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Martin Schwenke <martin@meltin.net>
Volker Lendecke [Wed, 14 May 2014 08:13:48 +0000 (10:13 +0200)]
serverid: Fix an incompatible pointer assignment
Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Martin Schwenke <martin@meltin.net>
Volker Lendecke [Fri, 23 May 2014 13:19:05 +0000 (15:19 +0200)]
smbd: Fix a typo
Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Martin Schwenke <martin@meltin.net>
Arvid Requate [Sun, 18 May 2014 17:16:06 +0000 (19:16 +0200)]
s4-dns: dlz_bind9: improve log message consistency
Change-Id: I0a12c048fd4e667b9aa0777f99c8f8306fc090ea
Signed-off-by: Arvid Requate <requate@univention.de>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Kai Blin <kai@samba.org>
Autobuild-User(master): Andrew Bartlett <abartlet@samba.org>
Autobuild-Date(master): Mon May 26 05:55:46 CEST 2014 on sn-devel-104
Arvid Requate [Sat, 17 May 2014 16:25:01 +0000 (18:25 +0200)]
s4-dns: dlz_bind9: Fix ipv6 updates
b9_record_match needs to consider all allowed representations of IPv6
addresses (RFC 2373), otherwise DNS subtractrdataset operations fail
due to differences in zero padding between bind9 frontend and ndr_pull
of a dnsp_DnssrvRpcRecord structure.
Change-Id: Ic0a1b16008458993dc644646d7f4ae3d3a3c5fed
Signed-off-by: Arvid Requate <requate@univention.de>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Kai Blin <kai@samba.org>
Reviewed-by: Guenter Kukkukk <kukks@samba.org>
Stefan Metzmacher [Wed, 15 Jan 2014 12:06:20 +0000 (13:06 +0100)]
s4:librpc/rpc: allow a shortcut in dcerpc_pipe_connect_ncacn_np_smb[2]_send()
If the caller provided smbXcli * pointers of an existing connection,
we can use it.
This will be used later in order to allow multiple dcerpc connections
over the same smb connection.
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Stefan Metzmacher [Wed, 15 Jan 2014 12:03:27 +0000 (13:03 +0100)]
s4:librpc/rpc: split out continue_smb_open()
The smb and smb2 code pathes are the same.
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Stefan Metzmacher [Wed, 15 Jan 2014 11:58:52 +0000 (12:58 +0100)]
s4:librpc/rpc: remove pipe_np_smb2_state and use pipe_np_smb_state
There's no need for two almost identical structures.
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Stefan Metzmacher [Wed, 15 Jan 2014 11:56:36 +0000 (12:56 +0100)]
s4:librpc/rpc: remember some smbXcli_* pointers within struct dcerpc_pipe_connect
This will simplify further improvements.
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Stefan Metzmacher [Wed, 15 Jan 2014 12:17:42 +0000 (13:17 +0100)]
s4:librpc/rpc: use DCERPC_REQUEST_TIMEOUT for smb opens
There's no need to make the connect timeout dynamic.
We implicitly used SMB_REQUEST_TIMEOUT which is also 60 seconds before.
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Stefan Metzmacher [Fri, 14 Feb 2014 00:15:23 +0000 (01:15 +0100)]
s4:librpc/rpc: remove some unused functions and structures from dcerpc_sock.c
Now we just dcerpc_sock.c doesn't need to maintain 'struct sock_private'
in p->transport.private_data anymore, we're just using a raw tstream_context
as p->transport.stream.
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Stefan Metzmacher [Fri, 14 Feb 2014 00:08:31 +0000 (01:08 +0100)]
s4:librpc/rpc: avoid using dcerpc_socket_peer_addr()
We use information stored in the dcerpc_binding in order
to open a secondary connection.
The goals are:
- dcerpc_secondary_connection_* should just use the dcerpc_binding
information for the first connection and just call dcerpc_pipe_connect_*
- Get rid of dcerpc_pipe->transport.* and just use a tstream_context.
All other details should be maintained only by the higher levels.
- Hide dcerpc_pipe and dcecli_connection behind dcerpc_binding_handle.
- Have just one entry point to create a new connection. For source4/librpc
this will be dcerpc_pipe_connect_*. For source3/rpc_client we need
a similar function.
- We'll have a new dcerpc_connection layer, with also just one
entry point to create a new connection.
- Replace dcerpc_pipe and dcecli_connection with the new dcerpc_connection layer.
- Replace rpc_pipe_client with the new dcerpc_connection layer.
- When the client side is unified we can change the server
as it needs to act as a client in order to register the endpoint mappings.
- Then the core of the server will be changed to use the new dcerpc_connection
layer.
As dcerpc_socket_peer_addr() uses p->transport.private_data
as 'struct sock_private', we should avoid it.
We can then remove dcerpc_unix_socket_path() and 'struct sock_private'.
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Stefan Metzmacher [Thu, 13 Feb 2014 15:28:54 +0000 (16:28 +0100)]
s4:librpc/rpc: set "localaddress" and reset "host" for ncacn_ip_tcp
We should remember local and remote ip address in dcerpc_pipe->binding.
Note: that we still have the "target_hostname" unmodified, if present.
This way dcerpc_pipe->binding can be used to create a secondary connection
that is a additional connection for the existing association group.
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Stefan Metzmacher [Thu, 13 Feb 2014 15:27:22 +0000 (16:27 +0100)]
s4:librpc/rpc: return the local/remote ip from dcerpc_pipe_open_tcp_recv()
It's important that the caller can remember the ips,
so that a secondary connection can use the same addresses
in order to get association group binding to work.
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Stefan Metzmacher [Thu, 13 Feb 2014 15:22:59 +0000 (16:22 +0100)]
s4:librpc/rpc: optionally return the local address from dcerpc_pipe_open_socket_recv()
The caller should be able to remember the local address that was used
for the connection.
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Stefan Metzmacher [Thu, 13 Feb 2014 08:53:49 +0000 (09:53 +0100)]
s4:librpc/rpc: avoid using dcerpc_unix_socket_path()
We use information stored in the dcerpc_binding in order
to open a secondary connection.
The goals are:
- dcerpc_secondary_connection_* should just use the dcerpc_binding
information for the first connection and just call dcerpc_pipe_connect_*
- Get rid of dcerpc_pipe->transport.* and just use a tstream_context.
All other details should be maintained only by the higher levels.
- Hide dcerpc_pipe and dcecli_connection behind dcerpc_binding_handle.
- Have just one entry point to create a new connection. For source4/librpc
this will be dcerpc_pipe_connect_*. For source3/rpc_client we need
a similar function.
- We'll have a new dcerpc_connection layer, with also just one
entry point to create a new connection.
- Replace dcerpc_pipe and dcecli_connection with the new dcerpc_connection layer.
- Replace rpc_pipe_client with the new dcerpc_connection layer.
- When the client side is unified we can change the server
as it needs to act as a client in order to register the endpoint mappings.
- Then the core of the server will be changed to use the new dcerpc_connection
layer.
As dcerpc_unix_socket_path() uses p->transport.private_data
as 'struct sock_private', we should avoid it.
We can then remove dcerpc_unix_socket_path() and 'struct sock_private'.
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Volker Lendecke [Mon, 10 Mar 2014 14:43:19 +0000 (15:43 +0100)]
torture3: Add a little gencache_parse load test
Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Christof Schmitt <cs@samba.org>
Reviewed-by: Michael Adam <obnox@samba.org>
Autobuild-User(master): Michael Adam <obnox@samba.org>
Autobuild-Date(master): Sat May 24 16:16:43 CEST 2014 on sn-devel-104
Volker Lendecke [Thu, 4 Jul 2013 12:22:28 +0000 (14:22 +0200)]
Exit with ctdb_fatal if serverids_exist fails
The only reason why this could fail is a severe ctdb communications
problem. The normal way to deal with this is ctdb_fatal. This avoids a
confusing panic in get_share_mode_lock when ctdb is shutdown while this
call happens.
Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Christof Schmitt <cs@samba.org>
Reviewed-by: Michael Adam <obnox@samba.org>
Volker Lendecke [Mon, 17 Mar 2014 11:21:28 +0000 (12:21 +0100)]
dbwrap_ctdb: open locally with TDB_VOLATILE if requested
Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Christof Schmitt <cs@samba.org>
Reviewed-by: Michael Adam <obnox@samba.org>
Jeremy Allison [Tue, 15 Apr 2014 19:43:06 +0000 (12:43 -0700)]
s3:smbd: let default_sys_recvfile() and sys_recvfile() cope with non-blocking sockets.
default_sys_recvfile() and splice() recvfile were not
written to cope with non-blocking sockets.
When either the socket read() or splice() return
-1 with errno EWOULDBLOCK or EAGAIN, if no bytes have been
processed yet, return -1 and let the caller set
blocking and retry. If bytes have been processed,
just return them as a short read and let the
caller retry with the remaining needed reads.
Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Michael Adam <obnox@samba.org>
Volker Lendecke [Fri, 23 May 2014 17:32:04 +0000 (19:32 +0200)]
unix_msg: Simplify unix_msg_send a bit
Now that we settled on variable arrays, remove a fixed one
Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
Autobuild-User(master): Jeremy Allison <jra@samba.org>
Autobuild-Date(master): Sat May 24 02:56:31 CEST 2014 on sn-devel-104
David Disseldorp [Fri, 23 May 2014 17:11:59 +0000 (19:11 +0200)]
torture/smb2/dir: check create time match find
This adds a check to ensure that the create time returned in the SMB2
create response matches the value found in the find response.
Signed-off-by: David Disseldorp <ddiss@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
Autobuild-User(master): Jeremy Allison <jra@samba.org>
Autobuild-Date(master): Fri May 23 22:42:24 CEST 2014 on sn-devel-104
Jeremy Allison [Wed, 21 May 2014 18:57:16 +0000 (11:57 -0700)]
s3: smb2: Move from using SBVAL to put NTTIMEs on the wire to put_long_date_timespec.
put_long_date_timespec() correctly calls round_timespec()
on the time parameters, and is the correct function to
use when writing *any* file-based NTTIME on the wire.
Move from using NTTIME variables internally
in the server to struct timespec variables, which is
what all the other server code uses. Only map to
NTTIME as the last step of marshalling the output
data.
The previous SMB2 create code missed the round_timespec()
call before marshalling.
Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: David Disseldorp <ddiss@samba.org>
Jeremy Allison [Wed, 21 May 2014 18:31:44 +0000 (11:31 -0700)]
s3: smb2: Move from using SBVAL to put NTTIMEs on the wire to put_long_date_timespec.
put_long_date_timespec() correctly calls round_timespec()
on the time parameters, and is the correct function to
use when writing *any* file-based NTTIME on the wire.
The smb2_close() code being modified already did this by
hand, and so this doesn't change any of the functionality, only
makes the SMB2 code match all of the other server
code in Samba. Move from using NTTIME variables internally
in the server to struct timespec variables, which is
what all the other server code uses. Only map to
NTTIME as the last step of marshalling the output
data.
Not following the put_long_date_timespec()
convention in the SMB2 create code caused the
round_timespec() step to have been missed in
that code.
Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: David Disseldorp <ddiss@samba.org>
Andreas Schneider [Thu, 22 May 2014 09:42:29 +0000 (11:42 +0200)]
tests: Add doc exception for spoolss: OSVERSION.
Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Guenther Deschner <gd@samba.org>
Autobuild-User(master): Andreas Schneider <asn@cryptomilk.org>
Autobuild-Date(master): Fri May 23 20:10:49 CEST 2014 on sn-devel-104
Andreas Schneider [Wed, 21 May 2014 09:19:17 +0000 (11:19 +0200)]
doc-xml: Add documentation for 'spoolss: os_[major|minor|build]' options.
Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Guenther Deschner <gd@samba.org>
Michael Adam [Thu, 22 May 2014 06:48:32 +0000 (08:48 +0200)]
smbd: add missing newline to debug message in daemon_ready()
Wrap overly long line while touching it anyways.
Signed-off-by: Michael Adam <obnox@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Alexander Bokovoy <ab@samba.org>
Autobuild-User(master): Michael Adam <obnox@samba.org>
Autobuild-Date(master): Fri May 23 04:03:43 CEST 2014 on sn-devel-104
Stefan Metzmacher [Mon, 12 May 2014 12:36:57 +0000 (14:36 +0200)]
lib/util: s/daemon/name
daemon() is a public function...
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Michael Adam <obnox@samba.org>
Reviewed-by: Alexander Bokovoy <ab@samba.org>
Stefan Metzmacher [Mon, 13 May 2013 09:14:26 +0000 (11:14 +0200)]
selftest: use dbwrap_tdb_mutexes:* = yes for "plugin_s4_dc" and "member"
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-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 May 22 23:33:41 CEST 2014 on sn-devel-104
Volker Lendecke [Tue, 19 Mar 2013 11:02:22 +0000 (12:02 +0100)]
dbwrap_tdb: Use mutexes on demand
Pair-Programmed-With: Stefan Metzmacher <metze@samba.org>
Signed-off-by: Volker Lendecke <vl@samba.org>
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Michael Adam <obnox@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
Volker Lendecke [Fri, 15 Nov 2013 11:57:06 +0000 (12:57 +0100)]
tdb/tools: Allow tdbtool to r/o open mutexed tdbs
Pair-Programmed-With: Stefan Metzmacher <metze@samba.org>
Signed-off-by: Volker Lendecke <vl@samba.org>
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
Volker Lendecke [Thu, 21 Feb 2013 15:34:32 +0000 (16:34 +0100)]
tdb/tools: add -m option to tdbtorture
This allows tdbtorture to run with mutexes.
Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
Volker Lendecke [Wed, 22 Jan 2014 10:15:55 +0000 (11:15 +0100)]
tdb/test: add marklock deadlock test
Pair-Programmed-With: Stefan Metzmacher <metze@samba.org>
Pair-Programmed-With: Michael Adam <obnox@samba.org>
Signed-off-by: Volker Lendecke <vl@samba.org>
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Signed-off-by: Michael Adam <obnox@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>