samba.git
5 years agos3/profiles: improve copy_registry_tree() errors
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

5 years agolibcli/secdesc: remove dup_sec_desc()
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>
5 years agolibcli/secdesc: replace dup_sec_desc() usage
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>
5 years agolibgpo: replace dup_sec_desc() usage
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>
5 years agos3/rpc_server/lsa: replace dup_sec_desc() usage
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>
5 years agos3/rpc_server/spoolss: replace dup_sec_desc() usage
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>
5 years agos3/posix_acls: replace dup_sec_desc() usage
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>
5 years agos3/net_rpc_printer: replace dup_sec_desc() usage
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>
5 years agos3/profiles: replace dup_sec_desc() usage
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>
5 years agos3/rpc_server/spoolss: remove SETUP_SPOOLSS_NOTIFY_DATA_SECDESC
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>
5 years agosharesec: remove unused security descriptor print fns
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>
5 years agosharesec: use NDR security descriptor print fns
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>
5 years agolibcli/sd: remove redundant sec_ace_add_sid()
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>
5 years agolibcli/sd: remove redundant sec_desc_add_sid()
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>
5 years agoctdb-tools-ctdb: scriptstatus should not count disabled scripts
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

5 years agoRemove obsolete README.packaging4.
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

5 years agolibcli: Simplify desc_ace_has_generic()
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>
5 years agolibcli: Simplify desc_expand_generic()
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>
5 years agolibcli: Avoid an explicit memset call
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>
5 years agolibcli: Avoid a talloc/free
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>
5 years agolibcli: Avoid a talloc/free
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>
5 years agos3-build: Support building with in-tree CTDB
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

5 years agoctdb-build: Move internal include files in a separate directory
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>
5 years agoctdb-build: Build ctdb_version.h before compiling files that include it
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>
5 years agolibcli: Fix a memleak
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

5 years agomessaging3: Remove a pointless return;
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

5 years agomessaging3: Fix whitespace
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>
5 years agoserverid: Fix an incompatible pointer assignment
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>
5 years agosmbd: Fix a typo
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>
5 years agos4-dns: dlz_bind9: improve log message consistency
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

5 years agos4-dns: dlz_bind9: Fix ipv6 updates
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>
5 years agos4:librpc/rpc: allow a shortcut in dcerpc_pipe_connect_ncacn_np_smb[2]_send()
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>
5 years agos4:librpc/rpc: split out continue_smb_open()
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>
5 years agos4:librpc/rpc: remove pipe_np_smb2_state and use pipe_np_smb_state
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>
5 years agos4:librpc/rpc: remember some smbXcli_* pointers within struct dcerpc_pipe_connect
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>
5 years agos4:librpc/rpc: use DCERPC_REQUEST_TIMEOUT for smb opens
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>
5 years agos4:librpc/rpc: remove some unused functions and structures from dcerpc_sock.c
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>
5 years agos4:librpc/rpc: avoid using dcerpc_socket_peer_addr()
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>
5 years agos4:librpc/rpc: set "localaddress" and reset "host" for ncacn_ip_tcp
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>
5 years agos4:librpc/rpc: return the local/remote ip from dcerpc_pipe_open_tcp_recv()
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>
5 years agos4:librpc/rpc: optionally return the local address from dcerpc_pipe_open_socket_recv()
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>
5 years agos4:librpc/rpc: avoid using dcerpc_unix_socket_path()
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>
5 years agotorture3: Add a little gencache_parse load test
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

5 years agoExit with ctdb_fatal if serverids_exist fails
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>
5 years agodbwrap_ctdb: open locally with TDB_VOLATILE if requested
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>
5 years agos3:smbd: let default_sys_recvfile() and sys_recvfile() cope with non-blocking sockets.
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>
5 years agounix_msg: Simplify unix_msg_send a bit
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

5 years agotorture/smb2/dir: check create time match find
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

5 years agos3: smb2: Move from using SBVAL to put NTTIMEs on the wire to put_long_date_timespec.
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>
5 years agos3: smb2: Move from using SBVAL to put NTTIMEs on the wire to put_long_date_timespec.
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>
5 years agotests: Add doc exception for spoolss: OSVERSION.
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

5 years agodoc-xml: Add documentation for 'spoolss: os_[major|minor|build]' options.
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>
5 years agosmbd: add missing newline to debug message in daemon_ready()
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

5 years agolib/util: s/daemon/name
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>
5 years agoselftest: use dbwrap_tdb_mutexes:* = yes for "plugin_s4_dc" and "member"
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

5 years agodbwrap_tdb: Use mutexes on demand
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>
5 years agotdb/tools: Allow tdbtool to r/o open mutexed tdbs tdb-1.3.0
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>
5 years agotdb/tools: add -m option to tdbtorture
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>
5 years agotdb/test: add marklock deadlock test
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>
5 years agotdb/test: add mutex related tests
Volker Lendecke [Thu, 21 Feb 2013 15:34:32 +0000 (16:34 +0100)]
tdb/test: add mutex related tests

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>
5 years agotdb: add TDB_MUTEX_LOCKING support
Volker Lendecke [Thu, 21 Feb 2013 15:34:32 +0000 (16:34 +0100)]
tdb: add TDB_MUTEX_LOCKING support

This adds optional support for locking based on
shared robust mutexes.

The caller can use the TDB_MUTEX_LOCKING flag
together with TDB_CLEAR_IF_FIRST after verifying
with tdb_runtime_check_for_robust_mutexes() that
it's supported by the current system.

The caller should be aware that using TDB_MUTEX_LOCKING
implies some limitations, e.g. it's not possible to
have multiple read chainlocks on a given hash chain
from multiple processes.

Note: that this doesn't make tdb thread safe!

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>
5 years agotdb: introduce tdb->hdr_ofs
Volker Lendecke [Thu, 21 Feb 2013 15:34:32 +0000 (16:34 +0100)]
tdb: introduce tdb->hdr_ofs

This makes it possible to have some extra headers before
the real tdb content starts in the file.

This will be used used e.g. to implement locking based on robust mutexes.

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>
5 years agotdb: introduce TDB_SUPPORTED_FEATURE_FLAGS
Stefan Metzmacher [Tue, 4 Feb 2014 22:35:53 +0000 (23:35 +0100)]
tdb: introduce TDB_SUPPORTED_FEATURE_FLAGS

This will allow to store a feature mask in the tdb header on disk,
so that openers can check if they can handle the features
other openers are using.

Pair-Programmed-With: Volker Lendecke <vl@samba.org>
Pair-Programmed-With: Michael Adam <obnox@samba.org>
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Signed-off-by: Volker Lendecke <vl@samba.org>
Signed-off-by: Michael Adam <obnox@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
5 years agotdb: use asprintf() to simplify tdb_summary()
Stefan Metzmacher [Tue, 13 May 2014 01:15:41 +0000 (03:15 +0200)]
tdb: use asprintf() to simplify tdb_summary()

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Michael Adam <obnox@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
5 years agolibreplace: Define PTHREAD_MUTEX_ROBUST along with pthread_mutexattr_setrobust
Volker Lendecke [Wed, 6 Feb 2013 11:16:02 +0000 (12:16 +0100)]
libreplace: Define PTHREAD_MUTEX_ROBUST along with pthread_mutexattr_setrobust

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
5 years agolibreplace-waf: Only check for _np functions if standard functions are not available
Volker Lendecke [Wed, 6 Feb 2013 11:15:41 +0000 (12:15 +0100)]
libreplace-waf: Only check for _np functions if standard functions are not available

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
5 years agolibreplace: Add support for pthread_mutex_consistent
Volker Lendecke [Mon, 4 Feb 2013 11:26:47 +0000 (12:26 +0100)]
libreplace: Add support for pthread_mutex_consistent

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
5 years agolibreplace: Add support for pthread_mutexattr_setrobust
Volker Lendecke [Sat, 22 Dec 2012 07:42:48 +0000 (08:42 +0100)]
libreplace: Add support for pthread_mutexattr_setrobust

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
5 years agolibreplace: only add PTHREAD CFLAGS and LDFLAGS globally if asked for
Stefan Metzmacher [Thu, 16 May 2013 09:50:38 +0000 (11:50 +0200)]
libreplace: only add PTHREAD CFLAGS and LDFLAGS globally if asked for

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Michael Adam <obnox@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
5 years agolibreplace: Move thread checks from source3/wscript
Volker Lendecke [Mon, 14 Jan 2013 13:56:25 +0000 (14:56 +0100)]
libreplace: Move thread checks from source3/wscript

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
5 years agowscript: set conf.env.replace_add_global_pthread = True
Stefan Metzmacher [Thu, 16 May 2013 09:48:02 +0000 (11:48 +0200)]
wscript: set conf.env.replace_add_global_pthread = True

In Samba we currently add PTHREAD CFLAGS/LDFLAGS globally.
The following changes will move the configure checks to
lib/replace and the the default of adding the flags globally will change there.

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Michael Adam <obnox@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
5 years agotdb/test: add UNMAP command to external-agent.c
Volker Lendecke [Thu, 21 Feb 2013 15:34:32 +0000 (16:34 +0100)]
tdb/test: add UNMAP command to external-agent.c

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
5 years agotdb/test: add PING command to external-agent.c
Volker Lendecke [Thu, 21 Feb 2013 15:34:32 +0000 (16:34 +0100)]
tdb/test: add PING command to external-agent.c

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
5 years agotdb/test: add shutdown_agent() helper function
Volker Lendecke [Thu, 21 Feb 2013 15:34:32 +0000 (16:34 +0100)]
tdb/test: add shutdown_agent() helper function

Signed-off-by: Volker Lendecke <vl@samba.org>
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
5 years agotdb/test: add a "skip()" macro.
Stefan Metzmacher [Tue, 6 May 2014 09:11:38 +0000 (11:11 +0200)]
tdb/test: add a "skip()" macro.

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Michael Adam <obnox@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
5 years agotdb/test: correctly use stderr, not stdout, in fail()
Stefan Metzmacher [Tue, 6 May 2014 09:10:23 +0000 (11:10 +0200)]
tdb/test: correctly use stderr, not stdout, in fail()

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Michael Adam <obnox@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
5 years agotdb/tools: explicitly use TDB_NOLOCK in tdbdump
Volker Lendecke [Thu, 21 Feb 2013 15:34:32 +0000 (16:34 +0100)]
tdb/tools: explicitly use TDB_NOLOCK in tdbdump

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
5 years agotdb/tools: add -l option to tdbtool
Volker Lendecke [Thu, 21 Feb 2013 15:34:32 +0000 (16:34 +0100)]
tdb/tools: add -l option to tdbtool

This opens the tdb with TDB_NOLOCK.

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
5 years agotdb/tools: add -l option to tdbbackup
Volker Lendecke [Thu, 21 Feb 2013 15:34:32 +0000 (16:34 +0100)]
tdb/tools: add -l option to tdbbackup

This opens the tdb with TDB_NOLOCK.

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
5 years agoAdd protocol version to smbstatus output
Mathias Dietz [Wed, 5 Mar 2014 15:26:20 +0000 (16:26 +0100)]
Add protocol version to smbstatus output

Signed-off-by: Mathias Dietz <mdietz@de.ibm.com>
Reviewed-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 May 22 18:37:27 CEST 2014 on sn-devel-104

5 years agos4-torture: add print_test_purge
David Disseldorp [Wed, 21 May 2014 19:55:59 +0000 (21:55 +0200)]
s4-torture: add print_test_purge

This change adds a regression test for print job purging via
SetPrinter(SPOOLSS_PRINTER_CONTROL_PURGE).

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): Thu May 22 01:55:39 CEST 2014 on sn-devel-104

5 years agoprinting: fix purge of all print jobs
David Disseldorp [Wed, 21 May 2014 19:55:58 +0000 (21:55 +0200)]
printing: fix purge of all print jobs

The incorrect (system) jobid is currently passed to the job deletion
function.

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

Reported-by: Franz Pförtsch <franz.pfoertsch@brose.com>
Signed-off-by: David Disseldorp <ddiss@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
5 years agoprovision: Correctly provision the SOA record minimum TTL
Kai Blin [Fri, 16 May 2014 16:33:42 +0000 (18:33 +0200)]
provision: Correctly provision the SOA record minimum TTL

This fixes bug #10466

Signed-off-by: Kai Blin <kai@samba.org>
Reviewed-by: Guenter Kukkukk <kukks@samba.org>
Autobuild-User(master): Kai Blin <kai@samba.org>
Autobuild-Date(master): Wed May 21 10:55:00 CEST 2014 on sn-devel-104

5 years agobug #10609: CVE-2014-0239 Don't reply to replies
Kai Blin [Tue, 13 May 2014 06:13:29 +0000 (08:13 +0200)]
bug #10609: CVE-2014-0239 Don't reply to replies

Due to insufficient input checking, the DNS server will reply to a packet that
has the "reply" bit set. Over UDP, this allows to send a packet with a spoofed
sender address and have two servers DOS each other with circular replies.

This patch fixes bug #10609 and adds a test to make sure we don't regress.
CVE-2014-2039 has been assigned to this issue.
Bug: https://bugzilla.samba.org/show_bug.cgi?id=10609

Signed-off-by: Kai Blin <kai@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
Autobuild-User(master): Kai Blin <kai@samba.org>
Autobuild-Date(master): Tue May 20 04:15:44 CEST 2014 on sn-devel-104

5 years agosmbd: fix creation of BUILTIN\{Administrators,Users} when "tdbsam:map builtin = false"
Michael Adam [Sat, 3 May 2014 00:59:37 +0000 (02:59 +0200)]
smbd: fix creation of BUILTIN\{Administrators,Users} when "tdbsam:map builtin = false"

In this case, passdb/group mapping is not responsible for the id mapping
of the builtins, so the check whether the SID maps to a unix ID is not
valid for checking whether the builtin has been created as a proper group.
So this patch changes the check to whether we find the builtin in the group
mapping database.

Signed-off-by: Michael Adam <obnox@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
Autobuild-User(master): Andreas Schneider <asn@cryptomilk.org>
Autobuild-Date(master): Mon May 19 16:41:41 CEST 2014 on sn-devel-104

5 years agos4-torture: fix some build warnings in rpc samr test.
Günther Deschner [Mon, 12 May 2014 21:33:53 +0000 (23:33 +0200)]
s4-torture: fix some build warnings in rpc samr test.

Guenther

Signed-off-by: Günther Deschner <gd@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
Autobuild-User(master): Günther Deschner <gd@samba.org>
Autobuild-Date(master): Fri May 16 23:48:35 CEST 2014 on sn-devel-104

5 years agos4-torture: fix test_openprinter_wrap fake test result.
Günther Deschner [Mon, 12 May 2014 21:06:49 +0000 (23:06 +0200)]
s4-torture: fix test_openprinter_wrap fake test result.

Guenther

Signed-off-by: Günther Deschner <gd@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
5 years agotalloc: version 2.1.1 talloc-2.1.1
Stefan Metzmacher [Thu, 15 May 2014 12:53:49 +0000 (14:53 +0200)]
talloc: version 2.1.1

Changes:
- documentation updates
- a fix for pytalloc-util.pc
- performance improvements here and there
- fixed compiler warnings

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): Fri May 16 19:51:26 CEST 2014 on sn-devel-104

5 years agotalloc/tests: avoid some unused variable warnings
Stefan Metzmacher [Thu, 27 Feb 2014 08:28:02 +0000 (09:28 +0100)]
talloc/tests: avoid some unused variable warnings

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
5 years agotalloc: fix compiler warning
Stefan Metzmacher [Wed, 20 Nov 2013 08:58:09 +0000 (09:58 +0100)]
talloc: fix compiler warning

This avoids the following warning when using:

CFLAGS="-O3 -g -fstrict-overflow -Wstrict-overflow=5"

../talloc.c: In Funktion »talloc_is_parent«:
../talloc.c:2658:21: Warnung: assuming signed overflow does not occur when
changing X +- C1 cmp C2 to X cmp C1 +- C2 [-Wstrict-overflow]

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
5 years agotalloc: check for TALLOC_GET_TYPE_ABORT_NOOP
Stefan Metzmacher [Thu, 5 Dec 2013 07:36:13 +0000 (08:36 +0100)]
talloc: check for TALLOC_GET_TYPE_ABORT_NOOP

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
5 years agotalloc: avoid a function call in TALLOC_FREE() if possible.
Stefan Metzmacher [Wed, 4 Dec 2013 14:35:37 +0000 (15:35 +0100)]
talloc: avoid a function call in TALLOC_FREE() if possible.

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
5 years agotalloc: inline talloc_get_name()
Stefan Metzmacher [Wed, 4 Dec 2013 22:22:04 +0000 (23:22 +0100)]
talloc: inline talloc_get_name()

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
5 years agotalloc: inline more static functions
Stefan Metzmacher [Wed, 20 Nov 2013 08:57:58 +0000 (09:57 +0100)]
talloc: inline more static functions

We need the code to be as fast as possible.

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
5 years agolib: Fix build --without-winbind by adding winbind_lookup_usersids dummy
Kai Blin [Fri, 9 May 2014 13:01:23 +0000 (15:01 +0200)]
lib: Fix build --without-winbind by adding winbind_lookup_usersids dummy

When building without winbind lib/winbind_util.c was missing a dummy function for winbind_lookup_usersids()

Signed-off-by: Kai Blin <kai@samba.org>
Reviewed-by: Volker Lendecke <vl@samba.org>
Autobuild-User(master): Kai Blin <kai@samba.org>
Autobuild-Date(master): Fri May 16 17:19:18 CEST 2014 on sn-devel-104

5 years agoselftest: Test auth_wbc, the auth4 winbind and winbind_wbclient modules using pdbtest
Andrew Bartlett [Fri, 16 May 2014 02:30:43 +0000 (14:30 +1200)]
selftest: Test auth_wbc, the auth4 winbind and winbind_wbclient modules using pdbtest

This ensures these authentication modules continue to operate correctly, and that the results are consistent.

Andrew Bartlett

Change-Id: I7f63cd93e55c6f73ceeafb14f1dc265291791803
Signed-off-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
Autobuild-User(master): Andrew Bartlett <abartlet@samba.org>
Autobuild-Date(master): Fri May 16 12:50:44 CEST 2014 on sn-devel-104

5 years agoauth: Allow auth_samba4 to be forced to run a specific auth module
Andrew Bartlett [Fri, 16 May 2014 02:29:43 +0000 (14:29 +1200)]
auth: Allow auth_samba4 to be forced to run a specific auth module

This will allow new tests to be written to validate winbindd authentication results

Andrew Bartlett

Change-Id: I008eba1de349b17ee4eb9f11be08338557dffecc
Signed-off-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
5 years agoselftest: Run pdbtest under valgrind if specified
Andrew Bartlett [Wed, 14 May 2014 07:26:00 +0000 (19:26 +1200)]
selftest: Run pdbtest under valgrind if specified

Change-Id: I21e169ba563551e13c46f07f86205625ad166c64
Signed-off-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Volker Lendecke <Volker.Lendecke@SerNet.DE>
5 years agonsswitch: Fix the check for the privileged pipe.
Andreas Schneider [Fri, 16 May 2014 07:50:42 +0000 (09:50 +0200)]
nsswitch: Fix the check for the privileged pipe.

Change-Id: I8f23ecc8444c3b25d5be2a7fdbf51ba7fe4a5ed9
Signed-off-by: Andreas Schneider <asn@samba.org>
Pair-Programmed-With: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
5 years agoadd FSCTL_SET_ZERO_ON_DEALLOCATION define
Björn Jacke [Thu, 15 May 2014 09:38:25 +0000 (11:38 +0200)]
add FSCTL_SET_ZERO_ON_DEALLOCATION define

Signed-off-by: Bjoern Jacke <bj@sernet.de>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
Autobuild-User(master): Björn Jacke <bj@sernet.de>
Autobuild-Date(master): Thu May 15 15:16:34 CEST 2014 on sn-devel-104