ira/third_party.git
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 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 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 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 agotdb/tools: Allow tdbtool to r/o open mutexed tdbs
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 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 agotalloc: version 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 agotalloc: Tune talloc_vasprintf
Volker Lendecke [Fri, 10 Jan 2014 09:45:22 +0000 (10:45 +0100)]
talloc: Tune talloc_vasprintf

vsnprintf is significantly more expensive than memcpy. For the
common case where the string we print is less than a kilobyte, avoid
the second vsnprintf.

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): Thu May 15 12:49:14 CEST 2014 on sn-devel-104

5 years agoldbsamba: Move pyldb-utils dependency to python_samba__ldb
Kai Blin [Tue, 13 May 2014 22:22:01 +0000 (00:22 +0200)]
ldbsamba: Move pyldb-utils dependency to python_samba__ldb

This allows to build smbd statically again.

Pair-programmed-with: Stefan Metzmacher <metze@samba.org>
Signed-off-by: Kai Blin <kai@samba.org>
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Autobuild-User(master): Kai Blin <kai@samba.org>
Autobuild-Date(master): Wed May 14 04:01:46 CEST 2014 on sn-devel-104

5 years agotdb: return ENOSYS if the tdb was created with spinlocks.
Stefan Metzmacher [Tue, 6 May 2014 09:52:49 +0000 (11:52 +0200)]
tdb: return ENOSYS if the tdb was created with spinlocks.

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Michael Adam <obnox@samba.org>
Autobuild-User(master): Stefan Metzmacher <metze@samba.org>
Autobuild-Date(master): Mon May 12 21:07:04 CEST 2014 on sn-devel-104

5 years agopytdb: avoid const warnings by using discard_const_p()
Stefan Metzmacher [Mon, 3 Feb 2014 10:29:38 +0000 (11:29 +0100)]
pytdb: avoid const warnings by using discard_const_p()

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Michael Adam <obnox@samba.org>
5 years agoswrap: Update version to 1.0.2.
Andreas Schneider [Thu, 8 May 2014 12:07:36 +0000 (14:07 +0200)]
swrap: Update version to 1.0.2.

This makes sure we require version 1.0.2 of the system library.

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Volker Lendecke <vl@samba.org>
Autobuild-User(master): Andreas Schneider <asn@cryptomilk.org>
Autobuild-Date(master): Fri May  9 11:36:55 CEST 2014 on sn-devel-104

5 years agoswrap: Fall back to RTLD_NEXT if we can't find libc.
Andreas Schneider [Thu, 8 May 2014 12:07:16 +0000 (14:07 +0200)]
swrap: Fall back to RTLD_NEXT if we can't find libc.

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

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
5 years agoFix some typos.
Jakub Wilk [Thu, 8 May 2014 13:30:09 +0000 (15:30 +0200)]
Fix some typos.

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

Reviewed-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
5 years agoswrap: Use the loaded libc open() directly.
Andreas Schneider [Thu, 8 May 2014 12:05:30 +0000 (14:05 +0200)]
swrap: Use the loaded libc open() directly.

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Michael Adam <obnox@samba.org>
5 years agoswrap: Do not leak memory in swrap_recvmsg_after().
Andreas Schneider [Thu, 8 May 2014 12:04:11 +0000 (14:04 +0200)]
swrap: Do not leak memory in swrap_recvmsg_after().

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Jakub Hrozek <jhrozek@redhat.com>
Reviewed-by: Simo Sorce <idra@samba.org>
5 years agoparam: replace P_OCTAL variable setting with s3 version which uses sscanf
Garming Sam [Tue, 25 Feb 2014 23:31:03 +0000 (12:31 +1300)]
param: replace P_OCTAL variable setting with s3 version which uses sscanf

Signed-off-by: Garming Sam <garming@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
5 years agolib/param: change set_variable to be more consistent with s3 loadparm
Garming Sam [Tue, 25 Feb 2014 23:06:03 +0000 (12:06 +1300)]
lib/param: change set_variable to be more consistent with s3 loadparm

Correctly frees CMDLIST memory and uses lp_int instead of atoi.

Signed-off-by: Garming Sam <garming@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
5 years agolib/param: change a comment regarding helper parametric functions
Garming Sam [Tue, 25 Feb 2014 04:12:14 +0000 (17:12 +1300)]
lib/param: change a comment regarding helper parametric functions

Signed-off-by: Garming Sam <garming@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
5 years agolib/param: remove unnecessary get_parametric s3 helper function
Garming Sam [Tue, 25 Feb 2014 04:07:31 +0000 (17:07 +1300)]
lib/param: remove unnecessary get_parametric s3 helper function

Signed-off-by: Garming Sam <garming@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
5 years agolib/param: use get_parametric_helper in lpcfg_get_parametric
Garming Sam [Tue, 25 Feb 2014 04:02:52 +0000 (17:02 +1300)]
lib/param: use get_parametric_helper in lpcfg_get_parametric

Signed-off-by: Garming Sam <garming@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
5 years agoparam: copy parametric option helper to lib/param
Garming Sam [Tue, 25 Feb 2014 03:58:21 +0000 (16:58 +1300)]
param: copy parametric option helper to lib/param

Signed-off-by: Garming Sam <garming@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
5 years agolib/param: clean up lpcfg_get_parametric
Garming Sam [Tue, 25 Feb 2014 03:36:57 +0000 (16:36 +1300)]
lib/param: clean up lpcfg_get_parametric

Signed-off-by: Garming Sam <garming@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
5 years agolib/param: Remove unused static variable defaults_saved
Andrew Bartlett [Mon, 27 Jan 2014 02:41:48 +0000 (15:41 +1300)]
lib/param: Remove unused static variable defaults_saved

Signed-off-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
5 years agolib/param: Make lpcfg_equal_parameter static (again)
Andrew Bartlett [Mon, 27 Jan 2014 02:34:06 +0000 (15:34 +1300)]
lib/param: Make lpcfg_equal_parameter static (again)

Signed-off-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
5 years agolib/param: Make and use lpcfg_dump_a_service() in common
Andrew Bartlett [Mon, 27 Jan 2014 02:32:39 +0000 (15:32 +1300)]
lib/param: Make and use lpcfg_dump_a_service() in common

Signed-off-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
5 years agoAdd a comment regarding strwicmp only being an ASCII string compare
Garming Sam [Wed, 19 Mar 2014 19:56:42 +0000 (08:56 +1300)]
Add a comment regarding strwicmp only being an ASCII string compare

Signed-off-by: Garming Sam <garming@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
5 years agoparam: remove NUMPARAMETERS macro from lib/param
Garming Sam [Thu, 13 Mar 2014 22:17:27 +0000 (11:17 +1300)]
param: remove NUMPARAMETERS macro from lib/param

Signed-off-by: Garming Sam <garming@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
5 years agolib/param: use strwicmp instead of strlower_talloc
Garming Sam [Tue, 25 Feb 2014 02:47:02 +0000 (15:47 +1300)]
lib/param: use strwicmp instead of strlower_talloc

Signed-off-by: Garming Sam <garming@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
5 years agolib/param: fix an error in the is_default method in lib/param
Garming Sam [Thu, 27 Feb 2014 02:26:10 +0000 (15:26 +1300)]
lib/param: fix an error in the is_default method in lib/param

This means that list values stored by s3 loadparm can still be detected as
default or not.

Signed-off-by: Garming Sam <garming@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
5 years agoparam: move parametric parameter dumping to lpcfg_dump_a_parameter
Garming Sam [Wed, 26 Feb 2014 00:22:33 +0000 (13:22 +1300)]
param: move parametric parameter dumping to lpcfg_dump_a_parameter

Signed-off-by: Garming Sam <garming@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
5 years agoparam: fix copy service to copy over cmdlist
Garming Sam [Mon, 24 Feb 2014 00:08:52 +0000 (13:08 +1300)]
param: fix copy service to copy over cmdlist

Signed-off-by: Garming Sam <garming@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Jeremy Allison <abartlet@samba.org>
5 years agoparam: correctly use param_table.c as a regular C file
Garming Sam [Sun, 23 Feb 2014 23:31:43 +0000 (12:31 +1300)]
param: correctly use param_table.c as a regular C file

Signed-off-by: Garming Sam <garming@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
5 years agoparam: use a single special handler for idmap parameters
Garming Sam [Sun, 23 Feb 2014 21:38:37 +0000 (10:38 +1300)]
param: use a single special handler for idmap parameters

Signed-off-by: Garming Sam <garming@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
5 years agoparam: add lp_do_parameter to s3 helpers
Garming Sam [Sun, 23 Feb 2014 21:30:03 +0000 (10:30 +1300)]
param: add lp_do_parameter to s3 helpers

Signed-off-by: Garming Sam <garming@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
5 years agoparam: use a single handle_netbios_aliases function
Garming Sam [Sun, 23 Feb 2014 21:12:48 +0000 (10:12 +1300)]
param: use a single handle_netbios_aliases function

Signed-off-by: Garming Sam <garming@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
5 years agoparam: include set_netbios_aliases in s3 helpers
Garming Sam [Sun, 23 Feb 2014 20:58:05 +0000 (09:58 +1300)]
param: include set_netbios_aliases in s3 helpers

Signed-off-by: Garming Sam <garming@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
5 years agoparam: setup ctx variable in loadparm globals
Garming Sam [Wed, 19 Mar 2014 20:09:58 +0000 (09:09 +1300)]
param: setup ctx variable in loadparm globals

Signed-off-by: Garming Sam <garming@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
5 years agomove str_list_make_v3 out of s3 code
Garming Sam [Mon, 24 Feb 2014 04:33:57 +0000 (17:33 +1300)]
move str_list_make_v3 out of s3 code

Signed-off-by: Garming Sam <garming@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
5 years agoparam: have a single handle_ldap_debug_level function
Garming Sam [Sun, 23 Feb 2014 20:53:44 +0000 (09:53 +1300)]
param: have a single handle_ldap_debug_level function

Signed-off-by: Garming Sam <garming@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
5 years agoparam: include init_ldap_debugging in the s3 helpers
Garming Sam [Sun, 23 Feb 2014 20:47:17 +0000 (09:47 +1300)]
param: include init_ldap_debugging in the s3 helpers

Signed-off-by: Garming Sam <garming@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
5 years agoparam: make lp_do_parameter_parametric use set_param_opt
Garming Sam [Sun, 23 Feb 2014 20:34:45 +0000 (09:34 +1300)]
param: make lp_do_parameter_parametric use set_param_opt

Signed-off-by: Garming Sam <garming@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
5 years agoparam: move handle printing into lib/param
Garming Sam [Fri, 21 Feb 2014 04:59:41 +0000 (17:59 +1300)]
param: move handle printing into lib/param

Signed-off-by: Garming Sam <garming@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
5 years agoparam: setup more variables in for the temporary loadparm context for the special...
Garming Sam [Fri, 21 Feb 2014 04:59:19 +0000 (17:59 +1300)]
param: setup more variables in for the temporary loadparm context for the special functions

In doing so, the loadparm context definition is now also moved to the loadparm.h header.

This means that the loadparm context is no longer private to the
lib/param code and that the source3 code can now override the values
within it.

Signed-off-by: Garming Sam <garming@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
5 years agoparam: add extra default parameter to get_parametrics_by_service
Garming Sam [Fri, 21 Feb 2014 04:16:15 +0000 (17:16 +1300)]
param: add extra default parameter to get_parametrics_by_service

Signed-off-by: Garming Sam <garming@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
5 years agoparam: make init_printer_values use lpcfg functions
Garming Sam [Fri, 21 Feb 2014 03:09:01 +0000 (16:09 +1300)]
param: make init_printer_values use lpcfg functions

Signed-off-by: Garming Sam <garming@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>