bbaumbach/samba-autobuild/.git
5 years agopassdb: Do not routinely clear the global memory returned by get_global_sam_sid()
Andrew Bartlett [Tue, 13 May 2014 05:47:03 +0000 (17:47 +1200)]
passdb: Do not routinely clear the global memory returned by get_global_sam_sid()

This avoids use-after-free errors and tdb database churn.

Andrew Bartlett

Change-Id: If7ab2e24556d9dffc7ad22c0489d665dd75a0cab
Signed-off-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Kamen Mazdrashki <kamenim@samba.org>
5 years agoctdb-eventscripts: New configuration variable CTDB_GANESHA_REC_SUBDIR
Martin Schwenke [Fri, 6 Jun 2014 05:25:28 +0000 (15:25 +1000)]
ctdb-eventscripts: New configuration variable CTDB_GANESHA_REC_SUBDIR

Backup and restore of the cluster filesystem can upset the operation
of 60.ganesha by changing the contents of this subdirectory.

Allow this subdirectory to be configured to a subdirectory that is
ignored by backup and restore processes.

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 Jun 11 09:29:22 CEST 2014 on sn-devel-104

5 years agolibcli: Add a NULL check in dom_sid_string
Volker Lendecke [Tue, 3 Jun 2014 13:03:56 +0000 (13:03 +0000)]
libcli: Add a NULL check in dom_sid_string

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
Autobuild-User(master): Jeremy Allison <jra@samba.org>
Autobuild-Date(master): Tue Jun 10 21:46:15 CEST 2014 on sn-devel-104

5 years agoUse GUID_equal in a few places
Volker Lendecke [Thu, 5 Jun 2014 10:04:43 +0000 (10:04 +0000)]
Use GUID_equal in a few places

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
5 years agolibndr: Use GUID_compare in GUID_equal
Volker Lendecke [Thu, 5 Jun 2014 09:56:55 +0000 (09:56 +0000)]
libndr: Use GUID_compare in GUID_equal

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
5 years agos3: libsmb: Change cli_disk_size() to use the trans2/SMB_FS_FULL_SIZE_INFORMATION...
Jeremy Allison [Wed, 4 Jun 2014 21:53:01 +0000 (14:53 -0700)]
s3: libsmb: Change cli_disk_size() to use the trans2/SMB_FS_FULL_SIZE_INFORMATION call in preference to the old SMB1 call.

Fallback to the old CORE protocol SMBdskattr if
trans2/SMB_FS_FULL_SIZE_INFORMATION is not supported.

Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Volker Lendecke <Volker.Lendecke@SerNet.DE>
Autobuild-User(master): Jeremy Allison <jra@samba.org>
Autobuild-Date(master): Sat Jun  7 05:41:44 CEST 2014 on sn-devel-104

5 years agos3: libsmb: Make cli_smb2_dskattr() a 64-bit interface.
Jeremy Allison [Wed, 4 Jun 2014 21:19:30 +0000 (14:19 -0700)]
s3: libsmb: Make cli_smb2_dskattr() a 64-bit interface.

Remove the fallback call from cli_dskattr() (now it's
not called from external client code).

Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Volker Lendecke <Volker.Lendecke@SerNet.DE>
5 years agos3: libsmb : Move users of cli_dskattr to a 64-bit interface cli_disk_free().
Jeremy Allison [Wed, 4 Jun 2014 21:12:38 +0000 (14:12 -0700)]
s3: libsmb : Move users of cli_dskattr to a 64-bit interface cli_disk_free().

Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Volker Lendecke <Volker.Lendecke@SerNet.DE>
5 years agolib: tevent: make TEVENT_SIG_INCREMENT atomic.
Jeremy Allison [Tue, 3 Jun 2014 17:44:19 +0000 (10:44 -0700)]
lib: tevent: make TEVENT_SIG_INCREMENT atomic.

On arm platforms incrementing a variable is not
an atomic operation, so may be interrupted by
signal processing (if a signal interrupts another
signal handler).

Use compiler built-ins to make this atomic.
__sync_fetch_and_add() works on gcc, llvm,
IBM xlC on AIX, and Intel icc (10.1 and
above).

atomic_add_32() works on Oracle Solaris.

Based on an inital patch from kamei@osstech.co.jp.

Bug #10640 - smbd is not responding - tevent_common_signal_handler() increments non-atomic variables

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

Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Volker Lendecke <Volker.Lendecke@SerNet.DE>
5 years agos3/s4: smbd, rpc, ldap, cldap, kdc services.
Jeremy Allison [Thu, 5 Jun 2014 19:32:30 +0000 (12:32 -0700)]
s3/s4: smbd, rpc, ldap, cldap, kdc services.

Allow us to start if we bind to *either* :: or 0.0.0.0.

Allows us to cope with systems configured as only IPv4
or only IPv6.

Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-By: Amitay Isaacs <amitay@gmail.com>
Reviewed-By: Alexander Bokovoy <ab@samba.org>
Autobuild-User(master): Jeremy Allison <jra@samba.org>
Autobuild-Date(master): Sat Jun  7 01:01:44 CEST 2014 on sn-devel-104

5 years agoselftest: Add support for tmate.
Andreas Schneider [Thu, 5 Jun 2014 13:07:07 +0000 (15:07 +0200)]
selftest: Add support for tmate.

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Michael Adam <obnox@samba.org>
Autobuild-User(master): Michael Adam <obnox@samba.org>
Autobuild-Date(master): Fri Jun  6 02:25:52 CEST 2014 on sn-devel-104

5 years agolib: Bump socket_wrapper version to 1.1.1.
Michael Adam [Thu, 5 Jun 2014 21:50:30 +0000 (23:50 +0200)]
lib: Bump socket_wrapper version to 1.1.1.

Signed-off-by: Michael Adam <obnox@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
5 years agoswrap: Disable incomplete bind checks (and tests) for EADDRINUSE.
Andreas Schneider [Thu, 5 Jun 2014 21:38:59 +0000 (23:38 +0200)]
swrap: Disable incomplete bind checks (and tests) for EADDRINUSE.

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Michael Adam <obnox@samba.org>
5 years agolib: Bump socket_wrapper version to 1.1.0.
Andreas Schneider [Tue, 3 Jun 2014 13:15:34 +0000 (15:15 +0200)]
lib: Bump socket_wrapper version to 1.1.0.

5 years agoswrap: check whether an address:port is already in use in swrap_bind()
Michael Adam [Tue, 3 Jun 2014 13:14:44 +0000 (15:14 +0200)]
swrap: check whether an address:port is already in use in swrap_bind()

Signed-off-by: Michael Adam <obnox@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
5 years agoswrap: implement check_addr_port_in_use()
Michael Adam [Tue, 3 Jun 2014 13:13:59 +0000 (15:13 +0200)]
swrap: implement check_addr_port_in_use()

Signed-off-by: Michael Adam <obnox@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
5 years agoswrap: fix AF_UNSPEC special case in swrap_bind()
Michael Adam [Tue, 3 Jun 2014 13:13:02 +0000 (15:13 +0200)]
swrap: fix AF_UNSPEC special case in swrap_bind()

Signed-off-by: Michael Adam <obnox@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
5 years agoswrap: extend input checks in swrap_bind()
Michael Adam [Tue, 3 Jun 2014 13:12:34 +0000 (15:12 +0200)]
swrap: extend input checks in swrap_bind()

Not only check family, but depending on family, also check the length.

Signed-off-by: Michael Adam <obnox@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
5 years agoswrap: add check for rpc/rpc.h - needed on freebsd for bindresvport
Michael Adam [Tue, 3 Jun 2014 13:11:46 +0000 (15:11 +0200)]
swrap: add check for rpc/rpc.h - needed on freebsd for bindresvport

Signed-off-by: Michael Adam <obnox@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
5 years agoswrap: Add support for bindresvport().
Andreas Schneider [Tue, 3 Jun 2014 13:10:19 +0000 (15:10 +0200)]
swrap: Add support for bindresvport().

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Michael Adam <obnox@samba.org>
5 years agoswrap: Add missing family check in bind().
Andreas Schneider [Tue, 3 Jun 2014 13:08:57 +0000 (15:08 +0200)]
swrap: Add missing family check in bind().

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Michael Adam <obnox@samba.org>
5 years agoswrap: Setup myname in swrap_socket() for getsockname().
Andreas Schneider [Tue, 3 Jun 2014 13:08:07 +0000 (15:08 +0200)]
swrap: Setup myname in swrap_socket() for getsockname().

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Michael Adam <obnox@samba.org>
5 years agoswrap: Make sure cmbuf is not NULL.
Andreas Schneider [Tue, 3 Jun 2014 13:07:07 +0000 (15:07 +0200)]
swrap: Make sure cmbuf is not NULL.

CID 63532

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Michael Adam <obnox@samba.org>
5 years agoswrap: We need to pass a pointer-pointer to not leak memory.
Andreas Schneider [Tue, 3 Jun 2014 13:06:33 +0000 (15:06 +0200)]
swrap: We need to pass a pointer-pointer to not leak memory.

CID 63533

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Michael Adam <obnox@samba.org>
5 years agoswrap: Support more socket options in getsockopt().
Andreas Schneider [Tue, 3 Jun 2014 13:05:56 +0000 (15:05 +0200)]
swrap: Support more socket options in getsockopt().

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Michael Adam <obnox@samba.org>
5 years agoswrap: Call swrap_msghdr_filter_cmsghdr in swrap_sendmsg_before().
Andreas Schneider [Tue, 3 Jun 2014 13:05:12 +0000 (15:05 +0200)]
swrap: Call swrap_msghdr_filter_cmsghdr in swrap_sendmsg_before().

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Michael Adam <obnox@samba.org>
5 years agoswrap: Add swrap_msghdr_filter_cmsg_pktinfo().
Andreas Schneider [Tue, 3 Jun 2014 13:04:45 +0000 (15:04 +0200)]
swrap: Add swrap_msghdr_filter_cmsg_pktinfo().

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Michael Adam <obnox@samba.org>
5 years agoswrap: Add swrap_sendmsg_filter_cmsg_socket().
Andreas Schneider [Tue, 3 Jun 2014 13:04:18 +0000 (15:04 +0200)]
swrap: Add swrap_sendmsg_filter_cmsg_socket().

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Michael Adam <obnox@samba.org>
5 years agoswrap: Add swrap_sendmsg_copy_cmsg().
Andreas Schneider [Tue, 3 Jun 2014 13:03:41 +0000 (15:03 +0200)]
swrap: Add swrap_sendmsg_copy_cmsg().

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Michael Adam <obnox@samba.org>
5 years agoswrap: Add swrap_sendmsg_filter_cmsghdr().
Andreas Schneider [Tue, 3 Jun 2014 13:03:03 +0000 (15:03 +0200)]
swrap: Add swrap_sendmsg_filter_cmsghdr().

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Michael Adam <obnox@samba.org>
5 years agoswrap: Implement support for IP_RECVDSTADDR on BSD.
Andreas Schneider [Tue, 3 Jun 2014 13:02:17 +0000 (15:02 +0200)]
swrap: Implement support for IP_RECVDSTADDR on BSD.

Pair-Programmed-With: Michael Adam <obnox@samba.org>
Signed-off-by: Andreas Schneider <asn@samba.org>
Signed-off-by: Michael Adam <obnox@samba.org>
5 years agoswrap: Check if the in_pktinfo structure is available.
Andreas Schneider [Tue, 3 Jun 2014 13:01:34 +0000 (15:01 +0200)]
swrap: Check if the in_pktinfo structure is available.

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Michael Adam <obnox@samba.org>
5 years agoswrap: Silence a warning on OpenIndiana.
Andreas Schneider [Tue, 3 Jun 2014 13:00:18 +0000 (15:00 +0200)]
swrap: Silence a warning on OpenIndiana.

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Michael Adam <obnox@samba.org>
5 years agoswrap: Properly cache the handle also in LIBC_SO case.
Pino Toscano [Tue, 3 Jun 2014 12:59:21 +0000 (14:59 +0200)]
swrap: Properly cache the handle also in LIBC_SO case.

Small regression introduced by me in commit
0fa56909442c3cfea6a697681ea0e89ba5a0aa0f.

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

Reviewed-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Michael Adam <obnox@samba.org>
5 years agoswrap: Truncate the address if the buffer is to small.
Andreas Schneider [Tue, 3 Jun 2014 12:58:24 +0000 (14:58 +0200)]
swrap: Truncate the address if the buffer is to small.

Signed-off-by: Andreas Schneider <asn@cryptomilk.org>
Reviewed-by: Michael Adam <obnox@samba.org>
5 years agoswrap: Process control messages in recvmsg().
Andreas Schneider [Tue, 3 Jun 2014 12:57:35 +0000 (14:57 +0200)]
swrap: Process control messages in recvmsg().

Pair-Programmed-With: Stefan Metzmacher <metze@samba.org>
Signed-off-by: Andreas Schneider <asn@samba.org>
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Michael Adam <obnox@samba.org>
5 years agoswrap: Call swrap_msghdr_socket_info in swrap_recvmsg_after().
Andreas Schneider [Tue, 3 Jun 2014 12:57:08 +0000 (14:57 +0200)]
swrap: Call swrap_msghdr_socket_info in swrap_recvmsg_after().

Pair-Programmed-With: Stefan Metzmacher <metze@samba.org>
Signed-off-by: Andreas Schneider <asn@samba.org>
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Michael Adam <obnox@samba.org>
5 years agoswrap: Add swrap_msghdr_socket_info().
Andreas Schneider [Tue, 3 Jun 2014 12:56:28 +0000 (14:56 +0200)]
swrap: Add swrap_msghdr_socket_info().

Pair-Programmed-With: Stefan Metzmacher <metze@samba.org>
Pair-Programmed-With: Michael Adam <obnox@samba.org>
Signed-off-by: Andreas Schneider <asn@samba.org>
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Signed-off-by: Michael Adam <obnox@samba.org>
5 years agoswrap: Add swrap_msghdr_add_pktinfo().
Andreas Schneider [Tue, 3 Jun 2014 12:55:49 +0000 (14:55 +0200)]
swrap: Add swrap_msghdr_add_pktinfo().

Pair-Programmed-With: Stefan Metzmacher <metze@samba.org>
Pair-Programmed-With: Michael Adam <obnox@samba.org>
Signed-off-by: Andreas Schneider <asn@samba.org>
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Signed-off-by: Michael Adam <obnox@samba.org>
5 years agoswrap: Add swrap_msghdr_add_cmsghdr().
Andreas Schneider [Tue, 3 Jun 2014 12:55:13 +0000 (14:55 +0200)]
swrap: Add swrap_msghdr_add_cmsghdr().

Pair-Programmed-With: Stefan Metzmacher <metze@samba.org>
Pair-Programmed-With: Michael Adam <obnox@samba.org>
Signed-off-by: Andreas Schneider <asn@samba.org>
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Signed-off-by: Michael Adam <obnox@samba.org>
5 years agoswrap: Add IP_PKTINFO support in setsockopt.
Andreas Schneider [Tue, 3 Jun 2014 12:54:28 +0000 (14:54 +0200)]
swrap: Add IP_PKTINFO support in setsockopt.

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Michael Adam <obnox@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
5 years agowaf: Add check for HAVE_STRUCT_IN6_PKTINFO.
Andreas Schneider [Tue, 3 Jun 2014 12:53:19 +0000 (14:53 +0200)]
waf: Add check for HAVE_STRUCT_IN6_PKTINFO.

Signed-off-by: Andreas Schneider <asn@samba.org>
5 years agoswrap: Correctly set the bind iface address on connect().
Andreas Schneider [Tue, 3 Jun 2014 12:50:53 +0000 (14:50 +0200)]
swrap: Correctly set the bind iface address on connect().

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
5 years agoswrap: use LIBC_SO from GNU libc, if available
Pino Toscano [Tue, 3 Jun 2014 12:50:05 +0000 (14:50 +0200)]
swrap: use LIBC_SO from GNU libc, if available

Look for gnu/lib-names.h and use the LIBC_SO define to dlopen libc, so
the right library is loaded without manually searching for libc.so.N.

Signed-off-by: Pino Toscano <toscano.pino@tiscali.it>
Reviewed-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
5 years agolibrpc: Fix a "ignoring asprintf return" warning
Volker Lendecke [Thu, 5 Jun 2014 12:38:50 +0000 (12:38 +0000)]
librpc: Fix a "ignoring asprintf return" warning

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Kamen Mazdrashki <kamenim@samba.org>
Autobuild-User(master): Kamen Mazdrashki <kamenim@samba.org>
Autobuild-Date(master): Thu Jun  5 22:28:16 CEST 2014 on sn-devel-104

5 years agoctdb:server: fix DEBUG message for wrong event script options.
Michael Adam [Thu, 5 Jun 2014 10:48:03 +0000 (12:48 +0200)]
ctdb:server: fix DEBUG message for wrong event script options.

Signed-off-by: Michael Adam <obnox@samba.org>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
Autobuild-User(master): Amitay Isaacs <amitay@samba.org>
Autobuild-Date(master): Thu Jun  5 19:51:36 CEST 2014 on sn-devel-104

5 years agoWAF: use libsystemd-daemon only if linking actually succeeds
Alexander Bokovoy [Thu, 5 Jun 2014 05:15:13 +0000 (08:15 +0300)]
WAF: use libsystemd-daemon only if linking actually succeeds

Signed-off-by: Alexander Bokovoy <ab@samba.org>
Reviewed-by: Volker Lendecke <vl@samba.org>
Autobuild-User(master): Volker Lendecke <vl@samba.org>
Autobuild-Date(master): Thu Jun  5 17:16:22 CEST 2014 on sn-devel-104

5 years agoAdd YouCompleteMe config.
Andreas Schneider [Wed, 2 Apr 2014 07:01:41 +0000 (09:01 +0200)]
Add YouCompleteMe config.

This is a config file for a VIM code completion engine:
http://valloric.github.io/YouCompleteMe/

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Michael Adam <obnox@samba.org>
Autobuild-User(master): Andreas Schneider <asn@cryptomilk.org>
Autobuild-Date(master): Thu Jun  5 13:18:56 CEST 2014 on sn-devel-104

5 years agos3:vfs_afsacl fix compiler warnings
Christian Ambach [Sat, 24 May 2014 22:35:09 +0000 (00:35 +0200)]
s3:vfs_afsacl fix compiler warnings

Signed-off-by: Christian Ambach <ambi@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Autobuild-User(master): Christian Ambach <ambi@samba.org>
Autobuild-Date(master): Wed Jun  4 22:34:51 CEST 2014 on sn-devel-104

5 years agovfs_afsacl: remove unused includes
Christian Ambach [Wed, 14 May 2014 13:39:44 +0000 (15:39 +0200)]
vfs_afsacl: remove unused includes

* auth.h might cause collisions with the Heimdal headers
* we should not include afs/afs.h directly, see
https://bugs.launchpad.net/ubuntu/+source/openafs/+bug/1319336
http://rt.central.org/rt/Ticket/Display.html?id=131737

Signed-off-by: Christian Ambach <ambi@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
5 years agowaf: fixup build with fake kaserver enabled
Christian Ambach [Wed, 23 Apr 2014 15:03:47 +0000 (17:03 +0200)]
waf: fixup build with fake kaserver enabled

Signed-off-by: Christian Ambach <ambi@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
5 years agowaf: add --with-fake-kaserver option
Christian Ambach [Tue, 15 Apr 2014 22:36:25 +0000 (00:36 +0200)]
waf: add --with-fake-kaserver option

This option was not added during the transition from autoconf
to waf.
Bring it back so that the code can be used again.

Bug: https://bugzilla.samba.org/show_bug.cgi?id=9916
Signed-off-by: Christian Ambach <ambi@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
5 years agos3:lib/afs move afs_settoken.c to common lib dir
Christian Ambach [Mon, 14 Apr 2014 20:35:21 +0000 (22:35 +0200)]
s3:lib/afs move afs_settoken.c to common lib dir

Signed-off-by: Christian Ambach <ambi@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
5 years agos3:lib/afs move afs.c to common lib dir
Christian Ambach [Mon, 14 Apr 2014 20:11:12 +0000 (22:11 +0200)]
s3:lib/afs move afs.c to common lib dir

some of the code in afs.c is needed by wbinfo that lives in the toplevel
nsswitch directory, so move the afs.c file to a new top-level lib/afs
directory. Use the name afs_funcs to avoid collisions with the afs.h
header from OpenAFS

Signed-off-by: Christian Ambach <ambi@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
5 years agos3-winbind: Use strlcpy to avoid log entry.
Andreas Schneider [Wed, 12 Feb 2014 12:26:02 +0000 (13:26 +0100)]
s3-winbind: Use strlcpy to avoid log entry.

The full_name from Windows can be longer than 255 chars which results in
a warning on log level 0 that we have a string overflow. This will avoid
the warning. However we should fix this sooner or later on the protocol
level to have no limit.

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Guenther Deschner <gd@samba.org>
Autobuild-User(master): Andreas Schneider <asn@cryptomilk.org>
Autobuild-Date(master): Wed Jun  4 16:49:11 CEST 2014 on sn-devel-104

5 years agodocs: Update Roadmap
Andrew Bartlett [Tue, 3 Jun 2014 08:10:47 +0000 (20:10 +1200)]
docs: Update Roadmap

Change-Id: I336f0c23759ea48fdb2bc3349d8fe19849645fb5
Signed-off-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: David Disseldorp <ddiss@samba.org>
Autobuild-User(master): David Disseldorp <ddiss@samba.org>
Autobuild-Date(master): Wed Jun  4 13:33:05 CEST 2014 on sn-devel-104

5 years agos3-rpc_server: Use C99 types in rpc_pipes.h
Andrew Bartlett [Thu, 8 May 2014 00:16:24 +0000 (12:16 +1200)]
s3-rpc_server: Use C99 types in rpc_pipes.h

Change-Id: Ic282f02f421870ff8a8623005979f8a034902d88
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): Wed Jun  4 05:48:29 CEST 2014 on sn-devel-104

5 years agos4-messaging: Make header guard less generic
Andrew Bartlett [Tue, 6 May 2014 01:38:44 +0000 (13:38 +1200)]
s4-messaging: Make header guard less generic

Change-Id: I659bbb317e69aee6632db8bce3c4bdb5f9ad3d8d
Signed-off-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
5 years agowinbind: Fix template homedir to match source3
Andrew Bartlett [Fri, 28 Mar 2014 03:32:06 +0000 (16:32 +1300)]
winbind: Fix template homedir to match source3

Fix provided by Andy Igoshin <ai@vsu.ru>

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

Andrew Bartlett

Change-Id: Ie94d207fed91e9dfd85ee3c3339c376b25ac5fa4
Signed-off-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
5 years agomake winbindd work in "samba4" member server modes
Andrew Bartlett [Wed, 9 Apr 2014 03:54:07 +0000 (15:54 +1200)]
make winbindd work in "samba4" member server modes

These modes are useful for testing aspects of the code like the rpc proxy.

Andrew Bartlett

Change-Id: I87b3ac0df299dd176599f824f8815880470c6401
Signed-off-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
5 years agos3-param: Add lp_dnsdomain() for use by winbindd
Andrew Bartlett [Fri, 16 May 2014 08:04:21 +0000 (20:04 +1200)]
s3-param: Add lp_dnsdomain() for use by winbindd

Change-Id: I987aa533ebe11c93b9e836fafc7b19c81bf600a5
Signed-off-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
5 years agowinbindd: Use rpc_pipe_open_interface() so that winbindd uses the correct rpc servers
Andrew Bartlett [Mon, 28 Apr 2014 09:07:59 +0000 (21:07 +1200)]
winbindd: Use rpc_pipe_open_interface() so that winbindd uses the correct rpc servers

This means that in the AD DC, we use the AD DC servers, while in the classic DC or file server we continue
to use the built-in SAMR and LSA servers.

Andrew Bartlett

Change-Id: I63b1443f5665016f7fcbed35907ec29d4424ab18
Signed-off-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
5 years agos3-rpc_server: Give log messages on failure
Andrew Bartlett [Mon, 28 Apr 2014 21:08:25 +0000 (09:08 +1200)]
s3-rpc_server: Give log messages on failure

Change-Id: I240d58fdf71bbab42d1ffb63bb52b9650fd4bd85
Signed-off-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
5 years agowinbindd: Remove pointless if statement
Andrew Bartlett [Mon, 28 Apr 2014 09:03:40 +0000 (21:03 +1200)]
winbindd: Remove pointless if statement

Change-Id: I7d2646078f6e7ba596b92da7d37c285d10ad38c0
Signed-off-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
5 years agowinbindd: explain that this check protects the AD DC machine account password (for...
Andrew Bartlett [Sun, 18 May 2014 23:08:00 +0000 (11:08 +1200)]
winbindd: explain that this check protects the AD DC machine account password (for now at least)

Change-Id: I2e2eb2e7fc4a12f27025f42e4cc41560311ce6c8
Signed-off-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
5 years agodsdb: Do not give an error is metadata.tdb does not yet exist
Andrew Bartlett [Fri, 23 May 2014 04:41:33 +0000 (16:41 +1200)]
dsdb: Do not give an error is metadata.tdb does not yet exist

Change-Id: I88ee188c776364fd66da388ce01fc9288aa2ded0
Signed-off-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
5 years agoselftest: Add knownfail entries for wbinfo --user-info tests only on the failing...
Andrew Bartlett [Mon, 19 May 2014 21:23:33 +0000 (09:23 +1200)]
selftest: Add knownfail entries for wbinfo --user-info tests only on the failing environments

This is better than skipping on every environment in the test

Andrew Bartlett

Change-Id: Ib4b114059d8f8bb05a9bdc2eca0f71310fc5a3bc
Signed-off-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
5 years agoselftest: move all winbind test rules to one place
Andrew Bartlett [Mon, 19 May 2014 05:32:56 +0000 (17:32 +1200)]
selftest: move all winbind test rules to one place

We now run wbinfo_simple additionally against plugin_s4_dc and dc

This also extends many of the tests to run against more environments,
hence the additional knownfail entries.

For winbind.wbclient, the fl2003dc environment has been selected not
to run with password history so as to allow the winindd.wbinfo test to
complete (once switched to running winbindd).

Andrew Bartlett

Change-Id: I475fd9937e515796b5e47c042a8bfa85f76441ca
Signed-off-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
5 years agoselftest: enable winbind enum users/groups in s4 environments
Andrew Bartlett [Mon, 19 May 2014 23:16:07 +0000 (11:16 +1200)]
selftest: enable winbind enum users/groups in s4 environments

Change-Id: I5a9218294580670048636645315a9cf217618e58
Signed-off-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
5 years agoselftest: Make test_wbinfo.sh work with s3-winbindd
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>
5 years agolibwbclient-tests: No longer hardcoded password and test domain
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>
5 years agoselftest: Run samba4.blackbox.wbinfo against plugin_s4_dc
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>
5 years agoselftest: Set winbind separator = /
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>
5 years agoselftest: Ensure winbindd is fully operating before running tests
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>
5 years agoselftest: consitently use the name s4member
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>
5 years agodocs: Remove out of date Kerberos and security chapter
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

5 years agodocs: Multiple passdb backend support has been removed
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>
5 years agodocs: Remove most references to Samba-3 and change to just Samba
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>
5 years agodocs: Samba is now GPLv3
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>
5 years agodocs: Remove references to SWAT (now removed)
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>
5 years agomessaging3: Fix a talloc_tos memleak
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>
5 years agos3:messaging: protect use of msg_control with HAVE_STRUCT_MSGHDR_MSG_CONTROL
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

5 years agobuild: rename HAVE_MSGHDR_MSG_ACCTRIGHTS to HAVE_STRUCT_MSGHDR_MSG_ACCTRIGHTS
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>
5 years agobuild: rename HAVE_MSGHDR_MSG_CONTROL to HAVE_STRUCT_MSGHDR_MSG_CONTROL
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>
5 years agovfs:aio_fork: simplify checking of MSG_CONTROL and MSG_ACCTRIGHTS
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>
5 years agos3:smb2_server: call smbd_smb2_flush_send_queue() directly
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

5 years agos3:smb2_server: fix invalid TALLOC_FREE(iov) in smbd_smb2_inbuf_parse_compound()
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>
5 years agomessaging3: Enforce just one messaging context
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>
5 years agomessaging3: Make messaging_context private
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>
5 years agomessaging3: Add and use messaging_tevent_context()
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>
5 years agomessaging3: Introduce messaging_local_backend()
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>
5 years agomessaging3: The backend send_fn doesn't need a messaging_context
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>
5 years agoimessaging: Fix a comment
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>
5 years agoFix several talloc stack frames not freed
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

5 years agos3:messaging: change unix_dgram_recv_handler() to use recvmsg, not recv
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

5 years agos3:messaging: change messaging_backend to use iovec instead of data blob in send_fn
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>
5 years agoctdb-tools-ctdb: Make natgwlist and lvsmaster more resilient
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

5 years agoctdb-ib: Make infiniband transport compile again
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>
5 years agoctdb-pmda: Do not hardcode include paths
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>
5 years agolibcli/security: remove sec_ace_equal
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