gd/samba-autobuild/.git
8 years agodocs: Bump version up to 4.4.
Karolin Seeger [Thu, 14 Jan 2016 11:16:51 +0000 (12:16 +0100)]
docs: Bump version up to 4.4.

Signed-off-by: Karolin Seeger <kseeger@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
Autobuild-User(master): Ralph Böhme <slow@samba.org>
Autobuild-Date(master): Tue Jan 19 21:34:14 CET 2016 on sn-devel-144

8 years agoctdb-build: Fix -O3 developer build
Amitay Isaacs [Fri, 15 Jan 2016 01:24:04 +0000 (12:24 +1100)]
ctdb-build: Fix -O3 developer build

Signed-off-by: Amitay Isaacs <amitay@gmail.com>
Reviewed-by: Volker Lendecke <vl@samba.org>
Autobuild-User(master): Volker Lendecke <vl@samba.org>
Autobuild-Date(master): Mon Jan 18 14:32:05 CET 2016 on sn-devel-144

8 years agoldb-samba: Expand testing of recursive search
Adrian Cochrane [Sun, 6 Dec 2015 21:07:26 +0000 (10:07 +1300)]
ldb-samba: Expand testing of recursive search

Signed-off-by: Adrian Cochrane <adrianc@catalyst.net.nz>
Reviewed-by: Garming Sam <garming@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Autobuild-User(master): Andrew Bartlett <abartlet@samba.org>
Autobuild-Date(master): Mon Jan 18 07:49:43 CET 2016 on sn-devel-144

8 years agoldb-samba: Correct error reporting to match Windows
Adrian Cochrane [Tue, 12 Jan 2016 00:11:03 +0000 (13:11 +1300)]
ldb-samba: Correct error reporting to match Windows

In some cases instead of replying with an error Windows instead returns
0 results.

Signed-off-by: Adrian Cochrane <adrianc@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Garming Sam <garming@catalyst.net.nz>
8 years agoldb-samba: Reenable recursive search
Adrian Cochrane [Wed, 6 Jan 2016 21:28:12 +0000 (10:28 +1300)]
ldb-samba: Reenable recursive search

In order for the recursive search module to work, we first
must stop asserting that any extended match rule is a DN (to be modified
per the extended DN munging), as this is not the case for this particular rule.

This reverts commit 8cacd5b8113fa30fb4ccaaf3193839660feb285f.

Signed-off-by: Adrian Cochrane <adrianc@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Garming Sam <garming@catalyst.net.nz>
8 years agoldb-samba: critical bugfix on original recursive search implementation
Adrian Cochrane [Fri, 8 Jan 2016 02:15:07 +0000 (15:15 +1300)]
ldb-samba: critical bugfix on original recursive search implementation

In the original patch (listed previously), when the search recurses it
will inevitably reallocate the visited list to a new array in memory.
When this happens the original patch didn't update it's reference to the
array.

This patch adds an extra level of indirection on the visited list in
order to fix this bug.

Signed-off-by: Adrian Cochrane <adrianc@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Garming Sam <garming@catalyst.net.nz>
8 years agoldb-samba: Implement transitive extended matching
Samuel Cabrero [Fri, 24 Oct 2014 15:52:47 +0000 (17:52 +0200)]
ldb-samba: Implement transitive extended matching

Documented in [MS-ADTS] section 3.1.1.3.4.4.3 LDAP_MATCHING_RULE_TRANSITIVE_EVAL

This allows a search filter such as:

 member:1.2.840.113556.1.4.1941:=cn=user,cn=users,dc=samba,dc=example,dc=com

This searches not only the member attribute, but also any member
attributes that point at an object with this member in them.  All the
various DN syntax types are supported, not just plain DNs.

Signed-off-by: Samuel Cabrero <samuelcabrero@kernevil.me>
(abartlet: Fixed compile error: return makes integer from pointer without a cast)
Signed-off-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Garming Sam <garming@catalyst.net.nz>
(returned to Samba by revert of
dc2d5ccd56ff8c59f3686a652ec3082069914bb4, returning the original
commit 2a22ba34cd6f28950246b54c6577c922c61f4fdb)

Signed-off-by: Andrew Bartlett <abartlet@samba.org>
Signed-off-by: Adrian Cochrane <adrianc@catalyst.net.nz>
Reviewed-by: Garming Sam <garming@catalyst.net.nz>
8 years agopidl: Change PyGetSetDef in generated python bindings to use C99 initialisers
Andrew Bartlett [Mon, 18 Jan 2016 02:53:15 +0000 (15:53 +1300)]
pidl: Change PyGetSetDef in generated python bindings to use C99 initialisers

Signed-off-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Garming Sam <garming@catalyst.net.nz>
8 years agos3: smbd: Remove one more use of lp_posix_pathnames().
Jeremy Allison [Sat, 16 Jan 2016 00:22:26 +0000 (16:22 -0800)]
s3: smbd: Remove one more use of lp_posix_pathnames().

Slowly removing them...

Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
Autobuild-User(master): Ralph Böhme <slow@samba.org>
Autobuild-Date(master): Sun Jan 17 02:07:23 CET 2016 on sn-devel-144

8 years agos3-util: skip S-1-18 sids in token generaion in sid_array_from_info3().
Günther Deschner [Fri, 15 Jan 2016 13:43:48 +0000 (14:43 +0100)]
s3-util: skip S-1-18 sids in token generaion in sid_array_from_info3().

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

Guenther

Signed-off-by: Günther Deschner <gd@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
Autobuild-User(master): Jeremy Allison <jra@samba.org>
Autobuild-Date(master): Sat Jan 16 01:24:04 CET 2016 on sn-devel-144

8 years agos3-util: add helper functions to deal with the S-1-18 domain.
Günther Deschner [Fri, 15 Jan 2016 13:43:12 +0000 (14:43 +0100)]
s3-util: add helper functions to deal with the S-1-18 domain.

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

Guenther

Signed-off-by: Günther Deschner <gd@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
8 years agosecurity: Add Asserted Identity sids (S-1-18)
Günther Deschner [Fri, 15 Jan 2016 13:46:07 +0000 (14:46 +0100)]
security: Add Asserted Identity sids (S-1-18)

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

definitions taken from [MS-DTYP]: Windows Data Types,
2.4.2.4 Well-Known SID Structures.

Guenther

Signed-off-by: Günther Deschner <gd@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
8 years agoldb: Fix CID 1348110 Uninitialized scalar variable
Volker Lendecke [Thu, 14 Jan 2016 20:10:39 +0000 (21:10 +0100)]
ldb: Fix CID 1348110 Uninitialized scalar variable

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): Fri Jan 15 07:12:06 CET 2016 on sn-devel-144

8 years agos3-libads: Use the configured LDAP page size.
Justin Maggard [Thu, 14 Jan 2016 00:25:34 +0000 (16:25 -0800)]
s3-libads: Use the configured LDAP page size.

We already allow the user to configure LDAP page size, and use it in pdb_ldap.
But then we hard-code the initial LDAP page size value to 1000 in ads_init, so
it doesn't take effect there.  So let's use the configured LDAP page size value
in ads_init also, which defaults to 1000.

Signed-off-by: Justin Maggard <jmaggard@netgear.com>
Reviewed-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Volker Lendecke <vl@samba.org>
Autobuild-User(master): Volker Lendecke <vl@samba.org>
Autobuild-Date(master): Fri Jan 15 03:59:16 CET 2016 on sn-devel-144

8 years agoChange default LDAP page size to 1000.
Justin Maggard [Thu, 14 Jan 2016 00:25:33 +0000 (16:25 -0800)]
Change default LDAP page size to 1000.

This matches Windows' Active Directory maximum page size.

Signed-off-by: Justin Maggard <jmaggard@netgear.com>
Reviewed-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Volker Lendecke <vl@samba.org>
8 years agoctdb-scripts: further untangle logic for success of interface monitoring
Michael Adam [Tue, 12 Jan 2016 17:59:15 +0000 (18:59 +0100)]
ctdb-scripts: further untangle logic for success of interface monitoring

Reduces intentation by using early returns.

Signed-off-by: Michael Adam <obnox@samba.org>
Reviewed-by: Martin Schwenke <martin@meltin.net>
Autobuild-User(master): Martin Schwenke <martins@samba.org>
Autobuild-Date(master): Thu Jan 14 22:41:29 CET 2016 on sn-devel-144

8 years agoctdb: Fix the O3 developer build
Volker Lendecke [Thu, 14 Jan 2016 10:20:21 +0000 (11:20 +0100)]
ctdb: Fix the O3 developer build

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Uri Simchoni <uri@samba.org>
Reviewed-by: Martin Schwenke <martin@meltin.net>
8 years agos4:acl LDB module - fix error message
Matthias Dieter Wallnöfer [Wed, 13 Jan 2016 20:53:26 +0000 (12:53 -0800)]
s4:acl LDB module - fix error message

Signed-off-by: Matthias Dieter Wallnöfer <mdw@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Autobuild-User(master): Jeremy Allison <jra@samba.org>
Autobuild-Date(master): Thu Jan 14 04:54:26 CET 2016 on sn-devel-144

8 years agoctdb-ipalloc: Document the steps involved in a takeover run
Martin Schwenke [Fri, 11 Dec 2015 05:07:51 +0000 (16:07 +1100)]
ctdb-ipalloc: Document the steps involved in a takeover run

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 Jan 13 23:27:01 CET 2016 on sn-devel-144

8 years agoctdb-ipalloc: Split IP allocation into its own build subsystem
Martin Schwenke [Mon, 23 Nov 2015 05:18:16 +0000 (16:18 +1100)]
ctdb-ipalloc: Split IP allocation into its own build subsystem

Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
8 years agos4-rpc_server: Add missing include for ROLE_ACTIVE_DIRECTORY_DC
Andreas Schneider [Wed, 13 Jan 2016 11:36:54 +0000 (12:36 +0100)]
s4-rpc_server: Add missing include for ROLE_ACTIVE_DIRECTORY_DC

Signed-off-by: Andreas Schneider <asn@cryptomilk.org>
Reviewed-by: Guenther Deschner <gd@samba.org>
Autobuild-User(master): Günther Deschner <gd@samba.org>
Autobuild-Date(master): Wed Jan 13 20:17:20 CET 2016 on sn-devel-144

8 years agovfs_shadow_copy2: add a blackbox test suite
Uri Simchoni [Thu, 29 Oct 2015 20:24:30 +0000 (22:24 +0200)]
vfs_shadow_copy2: add a blackbox test suite

Add a blackbox test suite for vfs_shadow_copy2, testing
parameters mountpoint, basedir, snapdir, snapdirseverywhere,
and testing correct wide-link processing.

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

Signed-off-by: Uri Simchoni <uri@samba.org>
Reviewed-by: Michael Adam <obnox@samba.org>
Autobuild-User(master): Michael Adam <obnox@samba.org>
Autobuild-Date(master): Wed Jan 13 17:11:38 CET 2016 on sn-devel-144

8 years agovfs_shadow_copy2: fix case where snapshots are outside the share
Uri Simchoni [Mon, 2 Nov 2015 07:08:53 +0000 (09:08 +0200)]
vfs_shadow_copy2: fix case where snapshots are outside the share

Adjust the connect path to the root of the share in the snapshot,
or to the root of the snapshot if the snapshot is "inside" the
share.

This way snapshot symlink regarded as "wide links" if and only if
they point outside the snapshot or they were wide links when
the snapshot was taken.

This allows mounting the snapshots outside the share's root.

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

Signed-off-by: Uri Simchoni <uri@samba.org>
Reviewed-by: Michael Adam <obnox@samba.org>
8 years agovfs_shadow_copy2: add shadow_copy2_do_convert()
Uri Simchoni [Sun, 1 Nov 2015 20:28:46 +0000 (22:28 +0200)]
vfs_shadow_copy2: add shadow_copy2_do_convert()

Add a new routine shadow_copy2_do_convert() which is
like shadow_copy2_convert(), but beside calculating the
path of the snapshot file, it also returns the minimum length
of the subpath which is both inside the share and inside the
same snapshot as the file in question, i.e. (at least in the
classical case) the subdirectory of the the snapshot file's
snapshot directory that corresponds to the file's share root.

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

Signed-off-by: Uri Simchoni <uri@samba.org>
Reviewed-by: Michael Adam <obnox@samba.org>
8 years agos3:smbd_smb2_reauth_generic_return: make use of smb2req->xconn
Michael Adam [Wed, 9 Sep 2015 13:08:56 +0000 (15:08 +0200)]
s3:smbd_smb2_reauth_generic_return: make use of smb2req->xconn

More specifically move from smb2req->sconn to smb2req->xconn->client->sconn
to avouid using smb2req->sconn directly.

Signed-off-by: Michael Adam <obnox@samba.org>
Reviewed-by: Volker Lendecke <vl@samba.org>
Autobuild-User(master): Volker Lendecke <vl@samba.org>
Autobuild-Date(master): Wed Jan 13 14:02:21 CET 2016 on sn-devel-144

8 years agopam_winbind: check != PAM_SUCCESS and != NULL explicitly
Michael Adam [Tue, 8 Sep 2015 16:25:02 +0000 (18:25 +0200)]
pam_winbind: check != PAM_SUCCESS and != NULL explicitly

...instead of using "if (ret)" or similar.
This is just a code cleanup, no changes in behaviour.

Signed-off-by: Michael Adam <obnox@samba.org>
Reviewed-by: Volker Lendecke <vl@samba.org>
8 years agovfs:shadow_copy2: fix a debug message
Michael Adam [Wed, 13 Jan 2016 00:37:24 +0000 (01:37 +0100)]
vfs:shadow_copy2: fix a debug message

The debug message for the mountpoint option was the
wrong way around. This fixes it, also converting
the message to use DBG_WARNING() while we're touching it.

Signed-off-by: Michael Adam <obnox@samba.org>
Reviewed-by: Uri Simchoni <uri@samba.org>
Autobuild-User(master): Uri Simchoni <uri@samba.org>
Autobuild-Date(master): Wed Jan 13 10:56:42 CET 2016 on sn-devel-144

8 years agodocs: fix copy'n'paste error in vfs_shadow_copy2 manpage
Michael Adam [Wed, 13 Jan 2016 00:46:25 +0000 (01:46 +0100)]
docs: fix copy'n'paste error in vfs_shadow_copy2 manpage

Signed-off-by: Michael Adam <obnox@samba.org>
Reviewed-by: Uri Simchoni <uri@samba.org>
8 years agoasn1: Make asn1_peek_tag_needed_size static
Volker Lendecke [Mon, 11 Jan 2016 20:41:22 +0000 (21:41 +0100)]
asn1: Make asn1_peek_tag_needed_size static

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Uri Simchoni <uri@samba.org>
8 years agoasn1: Fix a typo
Volker Lendecke [Mon, 11 Jan 2016 20:38:20 +0000 (21:38 +0100)]
asn1: Fix a typo

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Uri Simchoni <uri@samba.org>
8 years agowinbind: Properly error check init_lsa_ref_domain_list
Volker Lendecke [Mon, 28 Dec 2015 16:01:47 +0000 (17:01 +0100)]
winbind: Properly error check init_lsa_ref_domain_list

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Uri Simchoni <uri@samba.org>
8 years agoidmap: Fix whitespace
Volker Lendecke [Sun, 27 Dec 2015 18:55:40 +0000 (19:55 +0100)]
idmap: Fix whitespace

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Uri Simchoni <uri@samba.org>
8 years agolibcli: Fix a typo
Volker Lendecke [Thu, 17 Dec 2015 14:42:33 +0000 (15:42 +0100)]
libcli: Fix a typo

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Uri Simchoni <uri@samba.org>
8 years agolibsmb: Remove ip_service based resolve_lmhosts
Volker Lendecke [Tue, 15 Dec 2015 20:52:38 +0000 (21:52 +0100)]
libsmb: Remove ip_service based resolve_lmhosts

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Uri Simchoni <uri@samba.org>
8 years agolibsmb: Convert resolve_hosts to sockaddr_storage
Volker Lendecke [Tue, 15 Dec 2015 20:43:50 +0000 (21:43 +0100)]
libsmb: Convert resolve_hosts to sockaddr_storage

Eventually I want to  get rid of struct ip_service.

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Uri Simchoni <uri@samba.org>
8 years agoRename 'errors' to 'samba-errors' and make it public.
Jelmer Vernooij [Mon, 4 Jan 2016 01:01:53 +0000 (01:01 +0000)]
Rename 'errors' to 'samba-errors' and make it public.

This is necessary because it has public headers.

Signed-off-by: Jelmer Vernooij <jelmer@jelmer.uk>
Reviewed-By: Andrew Bartlett <abartlet@samba.org>
Reviewed-By: Stefan Metzmacher <metze@samba.org>
Autobuild-User(master): Jelmer Vernooij <jelmer@samba.org>
Autobuild-Date(master): Wed Jan 13 07:47:04 CET 2016 on sn-devel-144

8 years agolibcli: Make headers for private libraries private.
Jelmer Vernooij [Mon, 4 Jan 2016 00:56:10 +0000 (00:56 +0000)]
libcli: Make headers for private libraries private.

Signed-off-by: Jelmer Vernooij <jelmer@jelmer.uk>
Reviewed-By: Andrew Bartlett <abartlet@samba.org>
Reviewed-By: Stefan Metzmacher <metze@samba.org>
8 years agoAdd a new header file for functions in lib/util/util.c.
Jelmer Vernooij [Mon, 28 Dec 2015 22:21:11 +0000 (22:21 +0000)]
Add a new header file for functions in lib/util/util.c.

This allows public headers to not include samba_util.h, but rather
specific header files under lib/util.

Signed-Off-By: Jelmer Vernooij <jelmer@samba.org>
Reviewed-By: Andrew Bartlett <abartlet@samba.org>
Reviewed-By: Stefan Metzmacher <metze@samba.org>
8 years agoMake libcli-smb-raw private, for now.
Jelmer Vernooij [Mon, 28 Dec 2015 22:19:21 +0000 (22:19 +0000)]
Make libcli-smb-raw private, for now.

Signed-Off-By: Jelmer Vernooij <jelmer@samba.org>
Reviewed-By: Andrew Bartlett <abartlet@samba.org>
Reviewed-By: Stefan Metzmacher <metze@samba.org>
8 years agoAvoid including libds/common/roles.h in public loadparm.h header.
Jelmer Vernooij [Mon, 28 Dec 2015 19:01:54 +0000 (19:01 +0000)]
Avoid including libds/common/roles.h in public loadparm.h header.

Signed-Off-By: Jelmer Vernooij <jelmer@samba.org>
Reviewed-By: Andrew Bartlett <abartlet@samba.org>
Reviewed-By: Stefan Metzmacher <metze@samba.org>
8 years agoldb: Only set public headers field when installing as a public library.
Jelmer Vernooij [Mon, 28 Dec 2015 18:57:26 +0000 (18:57 +0000)]
ldb: Only set public headers field when installing as a public library.

Signed-Off-By: Jelmer Vernooij <jelmer@samba.org>
Reviewed-By: Andrew Bartlett <abartlet@samba.org>
Reviewed-By: Stefan Metzmacher <metze@samba.org>
8 years agotime_basic.h: Remove unnecessary dependency on replace.h
Jelmer Vernooij [Mon, 4 Jan 2016 01:07:27 +0000 (01:07 +0000)]
time_basic.h: Remove unnecessary dependency on replace.h

Forward declare struct timeval

Signed-off-by: Jelmer Vernooij <jelmer@jelmer.uk>
Reviewed-By: Andrew Bartlett <abartlet@samba.org>
Reviewed-By: Stefan Metzmacher <metze@samba.org>
8 years agoRemove public library dcerpc-atsvc.
Jelmer Vernooij [Thu, 28 Jan 2016 15:21:21 +0000 (15:21 +0000)]
Remove public library dcerpc-atsvc.

Signed-Off-By: Jelmer Vernooij <jelmer@samba.org>
Reviewed-By: Andrew Bartlett <abartlet@samba.org>
Reviewed-By: Stefan Metzmacher <metze@samba.org>
8 years agoMake libregistry private, for now.
Jelmer Vernooij [Thu, 28 Jan 2016 15:21:21 +0000 (15:21 +0000)]
Make libregistry private, for now.

Signed-Off-By: Jelmer Vernooij <jelmer@samba.org>
Reviewed-By: Andrew Bartlett <abartlet@samba.org>
Reviewed-By: Stefan Metzmacher <metze@samba.org>
8 years agoMake libtorture private, for now.
Jelmer Vernooij [Thu, 28 Jan 2016 15:21:21 +0000 (15:21 +0000)]
Make libtorture private, for now.

Signed-Off-By: Jelmer Vernooij <jelmer@jelmer.uk>
Reviewed-By: Andrew Bartlett <abartlet@samba.org>
Reviewed-By: Stefan Metzmacher <metze@samba.org>
8 years agoMake gensec private, for now.
Jelmer Vernooij [Thu, 28 Jan 2016 15:21:21 +0000 (15:21 +0000)]
Make gensec private, for now.

Signed-Off-By: Jelmer Vernooij <jelmer@samba.org>
Reviewed-By: Andrew Bartlett <abartlet@samba.org>
Reviewed-By: Stefan Metzmacher <metze@samba.org>
8 years agotalloc: Only set public headers field when installing as a public library.
Jelmer Vernooij [Mon, 4 Jan 2016 15:21:21 +0000 (15:21 +0000)]
talloc: Only set public headers field when installing as a public library.

Signed-Off-By: Jelmer Vernooij <jelmer@samba.org>
8 years agoError when private libraries have public headers.
Jelmer Vernooij [Mon, 28 Dec 2015 00:04:02 +0000 (00:04 +0000)]
Error when private libraries have public headers.

Signed-Off-By: Jelmer Vernooij <jelmer@samba.org>
Reviewed-By: Andrew Bartlett <abartlet@samba.org>
Reviewed-By: Stefan Metzmacher <metze@samba.org>
8 years agotdb: Only set public headers field when installing as a public library.
Jelmer Vernooij [Mon, 4 Jan 2016 15:21:02 +0000 (15:21 +0000)]
tdb: Only set public headers field when installing as a public library.

Signed-Off-By: Jelmer Vernooij <Jelmer@samba.org>
8 years agoAdd private_headers flag to SAMBA_*() functions.
Jelmer Vernooij [Sun, 27 Dec 2015 22:07:59 +0000 (22:07 +0000)]
Add private_headers flag to SAMBA_*() functions.

While this argument is correctly ignored, it does mean that we can
associate private headers with specific subsystems/libraries.

Signed-Off-By: Jelmer Vernooij <jelmer@samba.org>
Reviewed-By: Andrew Bartlett <abartlet@samba.org>
Reviewed-By: Stefan Metzmacher <metze@samba.org>
8 years agotevent: Only set public headers field when installing as a public library.
Jelmer Vernooij [Mon, 4 Jan 2016 23:01:26 +0000 (23:01 +0000)]
tevent: Only set public headers field when installing as a public library.

Signed-off-by: Jelmer Vernooij <jelmer@jelmer.uk>
8 years agosamdb: Add explicit dependency on ldb.
Jelmer Vernooij [Tue, 5 Jan 2016 23:11:08 +0000 (23:11 +0000)]
samdb: Add explicit dependency on ldb.

This is needed to pull in the right -I flags.

Signed-Off-By: Jelmer Vernooij <jelmer@samba.org>
8 years agoSimplify handling of dependencies on external libraries in test_headers.
Jelmer Vernooij [Sat, 9 Jan 2016 20:25:17 +0000 (20:25 +0000)]
Simplify handling of dependencies on external libraries in test_headers.

Signed-off-by: Jelmer Vernooij <jelmer@jelmer.uk>
8 years agoUse full path to dlinklist.h in includes.
Jelmer Vernooij [Sat, 9 Jan 2016 21:55:53 +0000 (21:55 +0000)]
Use full path to dlinklist.h in includes.

Signed-off-by: Jelmer Vernooij <jelmer@jelmer.uk>
8 years agoRevert "winbind: Retry after SESSION_EXPIRED error in ping-dc"
Christof Schmitt [Thu, 7 Jan 2016 20:27:49 +0000 (13:27 -0700)]
Revert "winbind: Retry after SESSION_EXPIRED error in ping-dc"

This reverts commit a2670f15dea27c10e3827216adf572f9c3894f85.

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

cm_connect_netlogon now handles the retry for an expired session.

Signed-off-by: Christof Schmitt <cs@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
Autobuild-User(master): Jeremy Allison <jra@samba.org>
Autobuild-Date(master): Wed Jan 13 03:35:57 CET 2016 on sn-devel-144

8 years agowinbindd: Retry on expired session in cm_connect_netlogon
Christof Schmitt [Tue, 5 Jan 2016 22:10:45 +0000 (15:10 -0700)]
winbindd: Retry on expired session in cm_connect_netlogon

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

Signed-off-by: Christof Schmitt <cs@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
8 years agowinbindd: Retry on expired session in cm_connect_sam
Christof Schmitt [Thu, 7 Jan 2016 22:03:22 +0000 (15:03 -0700)]
winbindd: Retry on expired session in cm_connect_sam

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

Signed-off-by: Christof Schmitt <cs@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
8 years agowinbindd: Retry on expired session in cm_connect_lsa
Christof Schmitt [Wed, 6 Jan 2016 21:15:30 +0000 (14:15 -0700)]
winbindd: Retry on expired session in cm_connect_lsa

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

Signed-off-by: Christof Schmitt <cs@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
8 years agowinbindd: Remove double retry from some ADS methods
Christof Schmitt [Tue, 5 Jan 2016 21:42:09 +0000 (14:42 -0700)]
winbindd: Remove double retry from some ADS methods

The retry through the new reconnect_ads layer is enough. This structure
also makes the distinction between retry layer and actual methods call a
bit clearer.

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

Signed-off-by: Christof Schmitt <cs@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
8 years agowinbindd: Add retry also for ADS method calls
Christof Schmitt [Tue, 5 Jan 2016 21:37:30 +0000 (14:37 -0700)]
winbindd: Add retry also for ADS method calls

RPC calls can return IO_DEVICE_ERROR on expired SMB2 sessions. Retrying
on a new connection avoids surfacing this error to winbindd clients.

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

Signed-off-by: Christof Schmitt <cs@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
8 years agowinbindd: Reset connection for expired session before reconnecting
Christof Schmitt [Tue, 5 Jan 2016 20:39:25 +0000 (13:39 -0700)]
winbindd: Reset connection for expired session before reconnecting

A RPC call on a expired SMB2 session returns IO_DEVICE_ERROR. In this
case, reset the connection before issuing the same call
again.

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

Signed-off-by: Christof Schmitt <cs@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
8 years agoctdb-tests: Fix some incorrect memory allocations
Martin Schwenke [Tue, 1 Dec 2015 04:32:07 +0000 (15:32 +1100)]
ctdb-tests: Fix some incorrect memory allocations

These allocate enough memory but things get confusing if they're used
as a guide when updating the code.

Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Michael Adam <obnox@samba.org>
Autobuild-User(master): Michael Adam <obnox@samba.org>
Autobuild-Date(master): Tue Jan 12 22:19:16 CET 2016 on sn-devel-144

8 years agoctdb-scripts: Use more unique temporary file names
Martin Schwenke [Thu, 10 Dec 2015 04:03:46 +0000 (15:03 +1100)]
ctdb-scripts: Use more unique temporary file names

Consider this sequence of events:

1. Instance of script running update_tickles() hangs
2. Script debugging is launched asynchronously
3. New instance of script is launched, creates temporary file(s)
4. Original hung script makes progress before asynchronous script
   debugging kills it, so it removes temporary file(s)
5. New instance of script produces error due to missing files(s)

This is obviously rare.

Use more unique filenames to avoid step (4) removing the file(s)
belonging to other instances of the script.

This requires some extra cleanup to avoid too many temporary files
(which is why unique filenames were not originally usd).  It is
sufficient to remove files modified at least 10 minutes ago.

Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Michael Adam <obnox@samba.org>
8 years agoctdb-scripts: Don't remove temporary files before use
Martin Schwenke [Thu, 10 Dec 2015 03:58:53 +0000 (14:58 +1100)]
ctdb-scripts: Don't remove temporary files before use

They will be clobbered by the redirect anyway.

Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Michael Adam <obnox@samba.org>
8 years agoctdb-scripts: Superficial clean-ups to 10.interface
Martin Schwenke [Fri, 18 Dec 2015 02:16:27 +0000 (13:16 +1100)]
ctdb-scripts: Superficial clean-ups to 10.interface

Whitespace and indentation improvements.

Remove comments describing events, since the README covers that much
better.

Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Michael Adam <obnox@samba.org>
8 years agoctdb-scripts: Clarify logic for success of interface monitoring
Martin Schwenke [Wed, 16 Dec 2015 08:18:49 +0000 (19:18 +1100)]
ctdb-scripts: Clarify logic for success of interface monitoring

The current code uses so many shell idioms that it is difficult to
follow.

Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Michael Adam <obnox@samba.org>
8 years agoctdb-scripts: Fix regression in updateip code
Martin Schwenke [Fri, 18 Dec 2015 04:33:38 +0000 (15:33 +1100)]
ctdb-scripts: Fix regression in updateip code

Regression introduced in commit
6471541d6d2bc9f2af0ff92b280abbd1d933cf88.

Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Michael Adam <obnox@samba.org>
8 years agoctdb-ipalloc: Fix a memory leak
Martin Schwenke [Tue, 1 Dec 2015 03:38:48 +0000 (14:38 +1100)]
ctdb-ipalloc: Fix a memory leak

Commit cfa0ffe78073f9e3a014bb127fb9a4b7ad95fceb introduced a memory
leak.  Never assume...

Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Michael Adam <obnox@samba.org>
8 years agoctdb-daemon: Don't leak memory if not using recovery lock
Martin Schwenke [Mon, 11 Jan 2016 02:41:30 +0000 (13:41 +1100)]
ctdb-daemon: Don't leak memory if not using recovery lock

Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Michael Adam <obnox@samba.org>
8 years agoctdb-recoverd: Fix some uninitialised memory issues
Martin Schwenke [Mon, 11 Jan 2016 06:23:12 +0000 (17:23 +1100)]
ctdb-recoverd: Fix some uninitialised memory issues

The first element of these structures is a 32-bit PNN.  On 64-bit
systems this field can be followed by 32-bits of padding.  When the
structures are copied this can cause uninitialised memory to be
copied.

Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Michael Adam <obnox@samba.org>
8 years agoctdb-daemon: Drop the "schedule for deletion" messages to DEBUG level
Martin Schwenke [Thu, 17 Dec 2015 01:27:58 +0000 (12:27 +1100)]
ctdb-daemon: Drop the "schedule for deletion" messages to DEBUG level

Thousands of these can be generated each second, rendering INFO level
debugging useless.

Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Michael Adam <obnox@samba.org>
8 years agoctdb/web: Fix typo.
Karolin Seeger [Mon, 11 Jan 2016 10:43:49 +0000 (11:43 +0100)]
ctdb/web: Fix typo.

assinged -> assigned

Signed-off-by: Karolin Seeger <kseeger@samba.org>
Reviewed-by: Michael Adam <obnox@samba.org>
Autobuild-User(master): Michael Adam <obnox@samba.org>
Autobuild-Date(master): Mon Jan 11 21:40:36 CET 2016 on sn-devel-144

8 years agotalloc: Fix a documentation typo
Martin Schwenke [Mon, 11 Jan 2016 08:49:14 +0000 (19:49 +1100)]
talloc: Fix a documentation typo

Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Volker Lendecke <vl@samba.org>
Autobuild-User(master): Volker Lendecke <vl@samba.org>
Autobuild-Date(master): Mon Jan 11 18:34:53 CET 2016 on sn-devel-144

8 years agonss_wrapper: bump version to 1.1.2
Michael Adam [Wed, 16 Dec 2015 16:47:04 +0000 (17:47 +0100)]
nss_wrapper: bump version to 1.1.2

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): Mon Jan 11 15:30:49 CET 2016 on sn-devel-144

8 years agonwrap: Fix segfaults while reloading hosts file
Andreas Schneider [Thu, 17 Dec 2015 07:46:33 +0000 (08:46 +0100)]
nwrap: Fix segfaults while reloading hosts file

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Michael Adam <obnox@samba.org>
8 years agonwrap: Don't fail if we want to add an existing entry
Andreas Schneider [Tue, 24 Nov 2015 16:32:47 +0000 (17:32 +0100)]
nwrap: Don't fail if we want to add an existing entry

Pair-Programmed-With: Michael Adam <obnox@samba.org>
Signed-off-by: Andreas Schneider <asn@samba.org>
Signed-off-by: Michael Adam <obnox@samba.org>
8 years agonwrap: Fix the build on Solaris
Andreas Schneider [Mon, 23 Nov 2015 07:33:02 +0000 (08:33 +0100)]
nwrap: Fix the build on Solaris

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Michael Adam <obnox@samba.org>
8 years agonwrap: Don't leak memory from gethostbyname*() functions
Andreas Schneider [Fri, 20 Nov 2015 08:38:16 +0000 (09:38 +0100)]
nwrap: Don't leak memory from gethostbyname*() functions

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Michael Adam <obnox@samba.org>
8 years agonwrap: Fix the build on FreeBSD
Andreas Schneider [Fri, 20 Nov 2015 07:51:49 +0000 (08:51 +0100)]
nwrap: Fix the build on FreeBSD

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Michael Adam <obnox@samba.org>
8 years agonwrap: fix a copy and paste error in the destructor.
Michael Adam [Fri, 20 Nov 2015 08:01:01 +0000 (09:01 +0100)]
nwrap: fix a copy and paste error in the destructor.

Signed-off-by: Michael Adam <obnox@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
8 years agonwrap: Cleanup shadow getspnam() memory
Andreas Schneider [Thu, 19 Nov 2015 08:02:46 +0000 (09:02 +0100)]
nwrap: Cleanup shadow getspnam() memory

Signed-off-by: Andreas Schneider <asn@samba.org>
Signed-off-by: Michael Adam <obnox@samba.org>
8 years agonwrap: fix leaking the entlists
Michael Adam [Thu, 19 Nov 2015 00:00:16 +0000 (01:00 +0100)]
nwrap: fix leaking the entlists

Track the list heads in a vector in the newrap_he_global
struct and free the structures upon nwrap_he_unload.

Signed-off-by: Michael Adam <obnox@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
8 years agonwrap: catch error to add item to vector in nwrap_he_parse_line()
Michael Adam [Wed, 18 Nov 2015 23:34:54 +0000 (00:34 +0100)]
nwrap: catch error to add item to vector in nwrap_he_parse_line()

Signed-off-by: Michael Adam <obnox@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
8 years agonwrap: rename nwrap_he.entdata to nwrap_he.entries
Michael Adam [Wed, 18 Nov 2015 23:30:17 +0000 (00:30 +0100)]
nwrap: rename nwrap_he.entdata to nwrap_he.entries

That's what is is the list of entries. In the guise
nwrap_entdata structures but the code reads more
naturally this way.

Signed-off-by: Michael Adam <obnox@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
8 years agonwrap: remove unused member list from struct nwrap_he
Michael Adam [Wed, 18 Nov 2015 23:24:14 +0000 (00:24 +0100)]
nwrap: remove unused member list from struct nwrap_he

Signed-off-by: Michael Adam <obnox@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
8 years agonwrap: Small code shift in nwrap_ed_inventarize_add_to_existing()
Robin Hack [Mon, 16 Nov 2015 22:38:51 +0000 (23:38 +0100)]
nwrap: Small code shift in nwrap_ed_inventarize_add_to_existing()

Allocate memory only when necessary.

Signed-off-by: Robin Hack <hack.robin@gmail.com>
Reviewed-by: Michael Adam <obnox@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
8 years agonwrap: Cast max_hostents to avoid warnings
Andreas Schneider [Mon, 16 Nov 2015 09:19:27 +0000 (10:19 +0100)]
nwrap: Cast max_hostents to avoid warnings

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Michael Adam <obnox@samba.org>
8 years agonwrap: Fix initialization of e entry
Andreas Schneider [Mon, 16 Nov 2015 09:17:39 +0000 (10:17 +0100)]
nwrap: Fix initialization of e entry

This fixes a compiler warning.

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Michael Adam <obnox@samba.org>
8 years agonwrap: remove ai_tail argument from nwrap_files_getaddrinfo()
Michael Adam [Thu, 12 Nov 2015 09:20:37 +0000 (10:20 +0100)]
nwrap: remove ai_tail argument from nwrap_files_getaddrinfo()

Signed-off-by: Michael Adam <obnox@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
8 years agonwrap: rewrite the loop for duplication ai entries if socktype not given
Michael Adam [Thu, 12 Nov 2015 10:35:07 +0000 (11:35 +0100)]
nwrap: rewrite the loop for duplication ai entries if socktype not given

This loop reads much more naturally now. It inserts the
duplicated entry right after the entrie that is being
duplicated. It does not need a ai_tail any more.

Signed-off-by: Michael Adam <obnox@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
8 years agonwrap: add an explaining comment for the ai duplicating loop
Michael Adam [Thu, 12 Nov 2015 10:17:21 +0000 (11:17 +0100)]
nwrap: add an explaining comment for the ai duplicating loop

Signed-off-by: Michael Adam <obnox@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
8 years agonwrap: move setting of ai_{flags|socktype|protocol} into nwrap_convert_he_ai
Michael Adam [Thu, 12 Nov 2015 10:15:03 +0000 (11:15 +0100)]
nwrap: move setting of ai_{flags|socktype|protocol} into nwrap_convert_he_ai

This makes the code in nwrap_getaddrinfo() more readable
and also treats all ai stuctures in the linked list, not
just the first one!

Signed-off-by: Michael Adam <obnox@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
8 years agonwrap: use symbols IPPROTO_TCP and IPPROTO_UDP
Michael Adam [Thu, 12 Nov 2015 10:08:47 +0000 (11:08 +0100)]
nwrap: use symbols IPPROTO_TCP and IPPROTO_UDP

Signed-off-by: Michael Adam <obnox@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
8 years agonwrap: rename _ai -> ai_new in nwrap_files_getaddrinfo()
Michael Adam [Thu, 12 Nov 2015 08:47:59 +0000 (09:47 +0100)]
nwrap: rename _ai -> ai_new in nwrap_files_getaddrinfo()

Signed-off-by: Michael Adam <obnox@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
8 years agonwrap: fix a memleak in nwrap_files_getaddrinfo()
Michael Adam [Thu, 12 Nov 2015 08:46:29 +0000 (09:46 +0100)]
nwrap: fix a memleak in nwrap_files_getaddrinfo()

Signed-off-by: Michael Adam <obnox@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
8 years agonwrap: rename ai_prev -> ai_cur in nwrap_files_getaddrinfo()
Michael Adam [Thu, 12 Nov 2015 08:45:50 +0000 (09:45 +0100)]
nwrap: rename ai_prev -> ai_cur in nwrap_files_getaddrinfo()

Signed-off-by: Michael Adam <obnox@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
8 years agonwrap: Fix inventarization of IPs when loading hosts
Michael Adam [Thu, 12 Nov 2015 07:34:39 +0000 (08:34 +0100)]
nwrap: Fix inventarization of IPs when loading hosts

Use nwrap_ed_inventarize() instead of nwrap_add_ai().

This not only removes code duplication, but also
more correctly adds more than one line for a given
IP address in a list behind this address.

The original code would only have inventarized
the first line for an IP found.

Signed-off-by: Michael Adam <obnox@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
8 years agonwrap: refactor nwrap_add_hname_* into one nwrap_ed_inventarize.
Michael Adam [Thu, 12 Nov 2015 07:29:57 +0000 (08:29 +0100)]
nwrap: refactor nwrap_add_hname_* into one nwrap_ed_inventarize.

This reduces code duplication and abstracts the logic out.
It was not special to hname or hname_alias.

Signed-off-by: Michael Adam <obnox@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
8 years agonwrap: treat AI_NUMERICHOST correctly in getaddrinfo.
Michael Adam [Sun, 8 Nov 2015 23:29:23 +0000 (00:29 +0100)]
nwrap: treat AI_NUMERICHOST correctly in getaddrinfo.

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

Signed-off-by: Michael Adam <obnox@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
8 years agonwrap: fix treatment of EAI_ADDRINFO in nwrap_files_getaddrinfo
Michael Adam [Thu, 12 Nov 2015 07:16:18 +0000 (08:16 +0100)]
nwrap: fix treatment of EAI_ADDRINFO in nwrap_files_getaddrinfo

Checking whether the passed in name (node) is a valid IPv6 or IPv4
address, we can do the checking for these two error conditions
properly up front.

Signed-off-by: Michael Adam <obnox@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>