bjacke/samba-autobuild/.git
7 weeks agowafbuild: create missing private library symlinks on platforms without soname support... master
Björn Jacke [Thu, 28 Feb 2019 16:31:31 +0000 (17:31 +0100)]
wafbuild: create missing private library symlinks on platforms without soname support for shared libs

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

Signed-off-by: Bjoern Jacke <bjacke@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
7 weeks agolibsmb: Make cli_smb2_rmdir asynchronous
Volker Lendecke [Thu, 28 Feb 2019 12:47:22 +0000 (13:47 +0100)]
libsmb: Make cli_smb2_rmdir asynchronous

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 Mar  1 01:30:35 UTC 2019 on sn-devel-144

7 weeks agolibsmb: add in/out cblobs to cli_smb2_create_fnum
Volker Lendecke [Wed, 20 Feb 2019 16:23:46 +0000 (17:23 +0100)]
libsmb: add in/out cblobs to cli_smb2_create_fnum

This is driven by the imminent smb2 unix extensions, we'll want to make use of
it from source3/libsmb.

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
7 weeks agolibsmb: Avoid a separate "cblobs" var sending smb2 create
Volker Lendecke [Wed, 20 Feb 2019 16:06:32 +0000 (17:06 +0100)]
libsmb: Avoid a separate "cblobs" var sending smb2 create

Less lines of code, and we will add custom cblobs soon. This change
makes that logic easier.

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
7 weeks agolibsmb: Reformat the cli_smb2_create_fnum_send args
Volker Lendecke [Fri, 15 Feb 2019 17:24:31 +0000 (18:24 +0100)]
libsmb: Reformat the cli_smb2_create_fnum_send args

We'll add parameters in the next commit, make that commit a bit more obvious

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
7 weeks agolib: modify string conversion wrapper to handle signed input
Swen Schillig [Tue, 5 Feb 2019 07:39:14 +0000 (08:39 +0100)]
lib: modify string conversion wrapper to handle signed input

The standard string conversion routines convert a "signed string"
into the positive representation of the resulting value.
This is not wanted and therefore now detected and flag'ed as an error.

Signed-off-by: Swen Schillig <swen@linux.ibm.com>
Reviewed-by: Ralph Böhme <slow@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
7 weeks agoctdb-utils: Use wrapper for string to integer conversion
Swen Schillig [Wed, 30 Jan 2019 09:28:52 +0000 (10:28 +0100)]
ctdb-utils: Use wrapper for string to integer conversion

In order to detect an value overflow error during
the string to integer conversion with strtoul/strtoull,
the errno variable must be set to zero before the execution and
checked after the conversion is performed. This is achieved by
using the wrapper function strtoul_err and strtoull_err.

Signed-off-by: Swen Schillig <swen@linux.ibm.com>
Reviewed-by: Ralph Böhme <slow@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
7 weeks agosource4: Use wrapper for string to integer conversion
Swen Schillig [Wed, 30 Jan 2019 08:31:34 +0000 (09:31 +0100)]
source4: Use wrapper for string to integer conversion

In order to detect an value overflow error during
the string to integer conversion with strtoul/strtoull,
the errno variable must be set to zero before the execution and
checked after the conversion is performed. This is achieved by
using the wrapper function strtoul_err and strtoull_err.

Signed-off-by: Swen Schillig <swen@linux.ibm.com>
Reviewed-by: Ralph Böhme <slow@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
7 weeks agolibcli: Use wrapper for string to integer conversion
Swen Schillig [Wed, 30 Jan 2019 07:39:15 +0000 (08:39 +0100)]
libcli: Use wrapper for string to integer conversion

In order to detect an value overflow error during
the string to integer conversion with strtoul/strtoull,
the errno variable must be set to zero before the execution and
checked after the conversion is performed. This is achieved by
using the wrapper function strtoul_err and strtoull_err.

Signed-off-by: Swen Schillig <swen@linux.ibm.com>
Reviewed-by: Ralph Böhme <slow@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
7 weeks agocommon-lib: Use wrapper for string to integer conversion
Swen Schillig [Wed, 30 Jan 2019 07:33:02 +0000 (08:33 +0100)]
common-lib: Use wrapper for string to integer conversion

In order to detect an value overflow error during
the string to integer conversion with strtoul/strtoull,
the errno variable must be set to zero before the execution and
checked after the conversion is performed. This is achieved by
using the wrapper function strtoul_err and strtoull_err.

Signed-off-by: Swen Schillig <swen@linux.ibm.com>
Reviewed-by: Ralph Böhme <slow@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
7 weeks agowbinfo: Use wrapper for string to integer conversion
Swen Schillig [Tue, 29 Jan 2019 13:36:44 +0000 (14:36 +0100)]
wbinfo: Use wrapper for string to integer conversion

In order to detect an value overflow error during
the string to integer conversion with strtoul/strtoull,
the errno variable must be set to zero before the execution and
checked after the conversion is performed. This is achieved by
using the wrapper function strtoul_err and strtoull_err.

Signed-off-by: Swen Schillig <swen@linux.ibm.com>
Reviewed-by: Ralph Böhme <slow@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
7 weeks agolibwbclient: Use wrapper for string to integer conversion
Swen Schillig [Tue, 29 Jan 2019 13:21:25 +0000 (14:21 +0100)]
libwbclient: Use wrapper for string to integer conversion

In order to detect an value overflow error during
the string to integer conversion with strtoul/strtoull,
the errno variable must be set to zero before the execution and
checked after the conversion is performed. This is achieved by
using the wrapper function strtoul_err and strtoull_err.

Signed-off-by: Swen Schillig <swen@linux.ibm.com>
Reviewed-by: Ralph Böhme <slow@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
7 weeks agoctdb-tools: Use wrapper for string to integer conversion
Swen Schillig [Tue, 29 Jan 2019 12:27:28 +0000 (13:27 +0100)]
ctdb-tools: Use wrapper for string to integer conversion

In order to detect an value overflow error during
the string to integer conversion with strtoul/strtoull,
the errno variable must be set to zero before the execution and
checked after the conversion is performed. This is achieved by
using the wrapper function strtoul_err and strtoull_err.

Signed-off-by: Swen Schillig <swen@linux.ibm.com>
Reviewed-by: Ralph Böhme <slow@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
7 weeks agoctdb-server: Use wrapper for string to integer conversion
Swen Schillig [Tue, 29 Jan 2019 12:07:56 +0000 (13:07 +0100)]
ctdb-server: Use wrapper for string to integer conversion

In order to detect an value overflow error during
the string to integer conversion with strtoul/strtoull,
the errno variable must be set to zero before the execution and
checked after the conversion is performed. This is achieved by
using the wrapper function strtoul_err and strtoull_err.

Signed-off-by: Swen Schillig <swen@linux.ibm.com>
Reviewed-by: Ralph Böhme <slow@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
7 weeks agoctdb-protocol: Use wrapper for string to integer conversion
Swen Schillig [Tue, 29 Jan 2019 12:03:20 +0000 (13:03 +0100)]
ctdb-protocol: Use wrapper for string to integer conversion

In order to detect an value overflow error during
the string to integer conversion with strtoul/strtoull,
the errno variable must be set to zero before the execution and
checked after the conversion is performed. This is achieved by
using the wrapper function strtoul_err and strtoull_err.

Signed-off-by: Swen Schillig <swen@linux.ibm.com>
Reviewed-by: Ralph Böhme <slow@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
7 weeks agorpcclient: Use wrapper for string to integer conversion
Swen Schillig [Mon, 28 Jan 2019 13:35:30 +0000 (14:35 +0100)]
rpcclient: Use wrapper for string to integer conversion

In order to detect an value overflow error during
the string to integer conversion with strtoul/strtoull,
the errno variable must be set to zero before the execution and
checked after the conversion is performed. This is achieved by
using the wrapper function strtoul_err and strtoull_err.

Signed-off-by: Swen Schillig <swen@linux.ibm.com>
Reviewed-by: Ralph Böhme <slow@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
7 weeks agomodules: Use wrapper for string to integer conversion
Swen Schillig [Mon, 28 Jan 2019 13:30:15 +0000 (14:30 +0100)]
modules: Use wrapper for string to integer conversion

In order to detect an value overflow error during
the string to integer conversion with strtoul/strtoull,
the errno variable must be set to zero before the execution and
checked after the conversion is performed. This is achieved by
using the wrapper function strtoul_err and strtoull_err.

Signed-off-by: Swen Schillig <swen@linux.ibm.com>
Reviewed-by: Ralph Böhme <slow@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
7 weeks agowinbindd: Use wrapper for string to integer conversion
Swen Schillig [Mon, 28 Jan 2019 13:07:39 +0000 (14:07 +0100)]
winbindd: Use wrapper for string to integer conversion

In order to detect an value overflow error during
the string to integer conversion with strtoul/strtoull,
the errno variable must be set to zero before the execution and
checked after the conversion is performed. This is achieved by
using the wrapper function strtoul_err and strtoull_err.

Signed-off-by: Swen Schillig <swen@linux.ibm.com>
Reviewed-by: Ralph Böhme <slow@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
7 weeks agopassdb: Use wrapper for string to integer conversion
Swen Schillig [Mon, 28 Jan 2019 12:57:15 +0000 (13:57 +0100)]
passdb: Use wrapper for string to integer conversion

In order to detect an value overflow error during
the string to integer conversion with strtoul/strtoull,
the errno variable must be set to zero before the execution and
checked after the conversion is performed. This is achieved by
using the wrapper function strtoul_err and strtoull_err.

Signed-off-by: Swen Schillig <swen@linux.ibm.com>
Reviewed-by: Ralph Böhme <slow@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
7 weeks agoutils: Use wrapper for string to integer conversion
Swen Schillig [Mon, 28 Jan 2019 12:36:45 +0000 (13:36 +0100)]
utils: Use wrapper for string to integer conversion

In order to detect an value overflow error during
the string to integer conversion with strtoul/strtoull,
the errno variable must be set to zero before the execution and
checked after the conversion is performed. This is achieved by
using the wrapper function strtoul_err and strtoull_err.

Signed-off-by: Swen Schillig <swen@linux.ibm.com>
Reviewed-by: Ralph Böhme <slow@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
7 weeks agogroupdb: Use wrapper for string to integer conversion
Swen Schillig [Mon, 28 Jan 2019 12:12:09 +0000 (13:12 +0100)]
groupdb: Use wrapper for string to integer conversion

In order to detect an value overflow error during
the string to integer conversion with strtoul/strtoull,
the errno variable must be set to zero before the execution and
checked after the conversion is performed. This is achieved by
using the wrapper function strtoul_err and strtoull_err.

Signed-off-by: Swen Schillig <swen@linux.ibm.com>
Reviewed-by: Ralph Böhme <slow@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
7 weeks agolib: Use wrapper for string to integer conversion
Swen Schillig [Mon, 28 Jan 2019 11:54:07 +0000 (12:54 +0100)]
lib: Use wrapper for string to integer conversion

In order to detect an value overflow error during
the string to integer conversion with strtoul/strtoull,
the errno variable must be set to zero before the execution and
checked after the conversion is performed. This is achieved by
using the wrapper function strtoul_err and strtoull_err.

Signed-off-by: Swen Schillig <swen@linux.ibm.com>
Reviewed-by: Ralph Böhme <slow@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
7 weeks agoutil: Add two wrapper for string to int conversion
Swen Schillig [Mon, 28 Jan 2019 08:42:13 +0000 (09:42 +0100)]
util: Add two wrapper for string to int conversion

Adding wrapper strtoull_err and strtoul_err to handle
error conditions of the conversion process.

Signed-off-by: Swen Schillig <swen@linux.ibm.com>
Reviewed-by: Ralph Böhme <slow@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
7 weeks agolibcli/security: add "Owner Rights" calculation to access_check_max_allowed()
Ralph Boehme [Wed, 27 Feb 2019 17:07:03 +0000 (18:07 +0100)]
libcli/security: add "Owner Rights" calculation to access_check_max_allowed()

This was missing in 44590c1b70c0a24f853c02d5fcdb3c609401e2ca.

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

Signed-off-by: Ralph Boehme <slow@samba.org>
Reviewed-by: David Disseldorp <ddiss@samba.org>
Autobuild-User(master): David Disseldorp <ddiss@samba.org>
Autobuild-Date(master): Thu Feb 28 19:18:16 UTC 2019 on sn-devel-144

7 weeks agos4:torture: add a Maximum Access check with an Owner Rights ACE
Ralph Boehme [Thu, 28 Feb 2019 13:48:02 +0000 (14:48 +0100)]
s4:torture: add a Maximum Access check with an Owner Rights ACE

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

Signed-off-by: Ralph Boehme <slow@samba.org>
Reviewed-by: David Disseldorp <ddiss@samba.org>
7 weeks agos4:libcli: remember return code from maximum access
Ralph Boehme [Thu, 28 Feb 2019 13:47:18 +0000 (14:47 +0100)]
s4:libcli: remember return code from maximum access

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

Signed-off-by: Ralph Boehme <slow@samba.org>
Reviewed-by: David Disseldorp <ddiss@samba.org>
7 weeks agolib: Remove some unused code
Volker Lendecke [Tue, 26 Feb 2019 14:23:17 +0000 (15:23 +0100)]
lib: Remove some unused code

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Christof Schmitt <cs@samba.org>
Autobuild-User(master): Volker Lendecke <vl@samba.org>
Autobuild-Date(master): Thu Feb 28 13:53:41 UTC 2019 on sn-devel-144

7 weeks agopassdb: Make [ug]id_to_sid use xid_to_sid
Volker Lendecke [Tue, 26 Feb 2019 14:17:36 +0000 (15:17 +0100)]
passdb: Make [ug]id_to_sid use xid_to_sid

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Christof Schmitt <cs@samba.org>
Bug: https://bugzilla.samba.org/show_bug.cgi?id=13813

7 weeks agopassdb: Introduce xid_to_sid
Volker Lendecke [Tue, 26 Feb 2019 14:10:21 +0000 (15:10 +0100)]
passdb: Introduce xid_to_sid

This explicitly avoids the legacy_[ug]id_to_sid calls, which create
long-term cache entries to S-1-22-x-y if anthing fails. We can't do
this, because this will turn temporary winbind communication failures
into long-term problems: A short hickup in winbind_uid_to_sid will
create a mapping to S-1-22-1-uid for a week. It should be up to the
lower layers to do the caching.

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Christof Schmitt <cs@samba.org>
Bug: https://bugzilla.samba.org/show_bug.cgi?id=13813

7 weeks agolib: Introduce winbind_xid_to_sid
Volker Lendecke [Tue, 26 Feb 2019 13:45:32 +0000 (14:45 +0100)]
lib: Introduce winbind_xid_to_sid

This does not merge a winbind communication error into
"global_sid_NULL" (S-1-0-0), which by the way non-intuitively does not
go along with is_null_sid(). Instead, this just touches the output sid
when winbind returned success. This success might well be a negative
mapping indicated by S-0-0, which *is* is_null_sid()...

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Christof Schmitt <cs@samba.org>
Bug: https://bugzilla.samba.org/show_bug.cgi?id=13813

7 weeks agowinbind: Use idmap_cache_find_xid2sid
Volker Lendecke [Tue, 26 Feb 2019 13:34:56 +0000 (14:34 +0100)]
winbind: Use idmap_cache_find_xid2sid

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Christof Schmitt <cs@samba.org>
Bug: https://bugzilla.samba.org/show_bug.cgi?id=13813

7 weeks agotorture: Add tests for idmap cache
Volker Lendecke [Wed, 27 Feb 2019 13:54:12 +0000 (14:54 +0100)]
torture: Add tests for idmap cache

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Christof Schmitt <cs@samba.org>
Bug: https://bugzilla.samba.org/show_bug.cgi?id=13813

7 weeks agoidmap_cache: Introduce idmap_cache_find_xid2sid
Volker Lendecke [Tue, 26 Feb 2019 13:32:52 +0000 (14:32 +0100)]
idmap_cache: Introduce idmap_cache_find_xid2sid

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Christof Schmitt <cs@samba.org>
Bug: https://bugzilla.samba.org/show_bug.cgi?id=13813

7 weeks agowinbind: Now we explicitly track if we got ids from cache
Volker Lendecke [Mon, 25 Feb 2019 13:55:00 +0000 (14:55 +0100)]
winbind: Now we explicitly track if we got ids from cache

This now properly makes us use negative cache entries

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Christof Schmitt <cs@samba.org>
Bug: https://bugzilla.samba.org/show_bug.cgi?id=13813

7 weeks agowinbind: Initialize "expired" parameter to idmap_cache_xid2sid
Volker Lendecke [Tue, 26 Feb 2019 11:52:28 +0000 (12:52 +0100)]
winbind: Initialize "expired" parameter to idmap_cache_xid2sid

The code in idmap_cache only touches its output parameters upon success

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Christof Schmitt <cs@samba.org>
Bug: https://bugzilla.samba.org/show_bug.cgi?id=13813

7 weeks agoidmap_cache: Only touch "sid" on success in find_xid_to_sid
Volker Lendecke [Tue, 26 Feb 2019 11:46:39 +0000 (12:46 +0100)]
idmap_cache: Only touch "sid" on success in find_xid_to_sid

Why? This makes the negative mapping condition (is_null_sid) more
explicit in the code.

The callers in lookup_sid initialized "psid" anyway before, and the ones
in wb_xids2sids now do as well. This is more in line with other APIs we
have: Only touch output parameters if you have something to say.

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Christof Schmitt <cs@samba.org>
Bug: https://bugzilla.samba.org/show_bug.cgi?id=13813

7 weeks agolib: Make idmap_cache return negative mappings
Volker Lendecke [Mon, 25 Feb 2019 13:38:50 +0000 (14:38 +0100)]
lib: Make idmap_cache return negative mappings

Without this we'd query non-existent mappings over and over
again.

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Christof Schmitt <cs@samba.org>
Bug: https://bugzilla.samba.org/show_bug.cgi?id=13813

7 weeks agolibwbclient: Protect wbcCtxUnixIdsToSids against integer-wrap
Volker Lendecke [Tue, 26 Feb 2019 10:06:29 +0000 (11:06 +0100)]
libwbclient: Protect wbcCtxUnixIdsToSids against integer-wrap

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Christof Schmitt <cs@samba.org>
7 weeks agodocs: fix minor typo in smb.conf "log level" section
David Disseldorp [Wed, 27 Feb 2019 11:09:52 +0000 (12:09 +0100)]
docs: fix minor typo in smb.conf "log level" section

Signed-off-by: David Disseldorp <ddiss@samba.org>
Reviewed-by: Guenther Deschner <gd@samba.org>
Autobuild-User(master): David Disseldorp <ddiss@samba.org>
Autobuild-Date(master): Wed Feb 27 16:22:27 UTC 2019 on sn-devel-144

7 weeks agovfs_ceph: drop ifdef HAVE_FCHOWN/_FCHMOD
David Disseldorp [Tue, 26 Feb 2019 12:54:21 +0000 (13:54 +0100)]
vfs_ceph: drop ifdef HAVE_FCHOWN/_FCHMOD

The cephwrap_fchown() and cephwrap_fchmod() wrappers call the
corresponding libcephfs functions. It doesn't make sense to make this
logic dependent on regular fchown()/fchmod() function presence, so remove
the ifdefs.

Signed-off-by: David Disseldorp <ddiss@samba.org>
Reviewed-by: Guenther Deschner <gd@samba.org>
7 weeks agovfs_ceph: remove ceph_fallocate/ceph_ftruncate fallback
David Disseldorp [Wed, 27 Feb 2019 10:52:42 +0000 (11:52 +0100)]
vfs_ceph: remove ceph_fallocate/ceph_ftruncate fallback

Both libcephfs functions are supported and capable of extending files,
so fallback can be dropped.

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

Signed-off-by: David Disseldorp <ddiss@samba.org>
Reviewed-by: Guenther Deschner <gd@samba.org>
7 weeks agovfs_ceph: fix strict_allocate_ftruncate()
David Disseldorp [Tue, 26 Feb 2019 15:07:27 +0000 (16:07 +0100)]
vfs_ceph: fix strict_allocate_ftruncate()

The vfs_ceph "strict allocate = yes" ftruncate wrapper may attempt
*local* filesystem ftruncate(). Fix this.

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

Signed-off-by: David Disseldorp <ddiss@samba.org>
Reviewed-by: Guenther Deschner <gd@samba.org>
7 weeks agovfs_ceph: add missing fallocate hook
David Disseldorp [Tue, 26 Feb 2019 20:26:27 +0000 (21:26 +0100)]
vfs_ceph: add missing fallocate hook

SMB_VFS_FALLOCATE() calls atop a vfs_ceph share currently fall through
to vfs_default, which results in a local filesystem I/O attempt using a
libcephfs file-descriptor. Add the missing fallocate hook to vfs_ceph.

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

Signed-off-by: David Disseldorp <ddiss@samba.org>
Reviewed-by: Guenther Deschner <gd@samba.org>
7 weeks agoselftest: force running with TZ=UTC
Stefan Metzmacher [Wed, 27 Feb 2019 07:22:09 +0000 (08:22 +0100)]
selftest: force running with TZ=UTC

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
Autobuild-User(master): Stefan Metzmacher <metze@samba.org>
Autobuild-Date(master): Wed Feb 27 11:24:59 UTC 2019 on sn-devel-144

7 weeks agoautobuild: try to distribute the tasks a bit more
Stefan Metzmacher [Tue, 26 Feb 2019 21:55:05 +0000 (22:55 +0100)]
autobuild: try to distribute the tasks a bit more

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
7 weeks ago.gitlab-ci.yml: use .shared_template for samba
Stefan Metzmacher [Thu, 21 Feb 2019 08:05:18 +0000 (09:05 +0100)]
.gitlab-ci.yml: use .shared_template for samba

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
7 weeks agoautobuild: spread ad-dc tests over 6 autobuild/ci separate tasks/jobs
Stefan Metzmacher [Tue, 26 Feb 2019 14:04:14 +0000 (15:04 +0100)]
autobuild: spread ad-dc tests over 6 autobuild/ci separate tasks/jobs

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
7 weeks agoautobuild: add samba-ad-member task
Stefan Metzmacher [Tue, 26 Feb 2019 13:59:00 +0000 (14:59 +0100)]
autobuild: add samba-ad-member task

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
7 weeks agoautobuild: run ad_dc_backup tests in samba-ad-dc-backup
Stefan Metzmacher [Tue, 26 Feb 2019 14:12:36 +0000 (15:12 +0100)]
autobuild: run ad_dc_backup tests in samba-ad-dc-backup

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
7 weeks agoautobuild: move maptoguest and simpleserver to 'samba-fileserver'
Stefan Metzmacher [Thu, 21 Feb 2019 07:42:50 +0000 (08:42 +0100)]
autobuild: move maptoguest and simpleserver to 'samba-fileserver'

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
7 weeks agoautobuild: move nt4_dc_schannel out of 'samba'
Stefan Metzmacher [Thu, 21 Feb 2019 07:37:53 +0000 (08:37 +0100)]
autobuild: move nt4_dc_schannel out of 'samba'

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
7 weeks agos4:selftest: make use of ad_dc_backup
Stefan Metzmacher [Tue, 26 Feb 2019 13:04:42 +0000 (14:04 +0100)]
s4:selftest: make use of ad_dc_backup

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
7 weeks agoselftest:Samba4: add ad_dc_backup alias to ad_dc
Stefan Metzmacher [Tue, 26 Feb 2019 13:03:29 +0000 (14:03 +0100)]
selftest:Samba4: add ad_dc_backup alias to ad_dc

This will allow us to run really most tests in an isolated
autobuild/ci task later.

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
7 weeks agos4:selftest: make use of ad_dc_default
Stefan Metzmacher [Tue, 26 Feb 2019 13:04:42 +0000 (14:04 +0100)]
s4:selftest: make use of ad_dc_default

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
7 weeks agoselftest:Samba4: add ad_dc_default alias to ad_dc_ntvfs
Stefan Metzmacher [Tue, 26 Feb 2019 13:03:29 +0000 (14:03 +0100)]
selftest:Samba4: add ad_dc_default alias to ad_dc_ntvfs

This will allow us to run really most tests in an isolated
autobuild/ci task later.

This will apply to tests, which may not rely on the ntvfs backend, so
the ad_dc_default alias can point to another environment in future.

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
7 weeks agos4:selftest: make use of ad_dc_slowtests
Stefan Metzmacher [Tue, 26 Feb 2019 13:04:42 +0000 (14:04 +0100)]
s4:selftest: make use of ad_dc_slowtests

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
7 weeks agoselftest:Samba4: add ad_dc_slowtests alias to ad_dc_ntvfs
Stefan Metzmacher [Tue, 26 Feb 2019 13:03:29 +0000 (14:03 +0100)]
selftest:Samba4: add ad_dc_slowtests alias to ad_dc_ntvfs

This will allow us to run really slow tests in an isolated
autobuild/ci task later.

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
7 weeks agos4:selftest: use the fl2008dc alias when looping over all functional levels
Stefan Metzmacher [Thu, 21 Feb 2019 14:07:42 +0000 (15:07 +0100)]
s4:selftest: use the fl2008dc alias when looping over all functional levels

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
7 weeks agoselftest:Samba4: add fl2008dc as alias to ad_dc_ntvfs
Stefan Metzmacher [Tue, 26 Feb 2019 13:01:10 +0000 (14:01 +0100)]
selftest:Samba4: add fl2008dc as alias to ad_dc_ntvfs

Using aliases it will be possible to split the large amount
of tests which use ad_dc_ntvfs into multiple autobuild/ci
tasks/jobs later.

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
7 weeks agos4:selftest: move very slow tests on ad_dc_ntvfs into one location in tests.py
Stefan Metzmacher [Tue, 26 Feb 2019 12:58:31 +0000 (13:58 +0100)]
s4:selftest: move very slow tests on ad_dc_ntvfs into one location in tests.py

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
7 weeks agolibcli:auth: Remove unused header file
Andreas Schneider [Wed, 27 Feb 2019 07:00:05 +0000 (08:00 +0100)]
libcli:auth: Remove unused header file

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Volker Lendecke <vl@samba.org>
Autobuild-User(master): Volker Lendecke <vl@samba.org>
Autobuild-Date(master): Wed Feb 27 10:00:32 UTC 2019 on sn-devel-144

7 weeks agos4:torture: Remove unused header file
Andreas Schneider [Wed, 27 Feb 2019 07:09:11 +0000 (08:09 +0100)]
s4:torture: Remove unused header file

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Volker Lendecke <vl@samba.org>
7 weeks agos4:dsdb: Remove unused header file
Andreas Schneider [Wed, 27 Feb 2019 07:05:05 +0000 (08:05 +0100)]
s4:dsdb: Remove unused header file

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Volker Lendecke <vl@samba.org>
7 weeks agolibcli:samsync: Remove unused header file
Andreas Schneider [Wed, 27 Feb 2019 07:03:05 +0000 (08:03 +0100)]
libcli:samsync: Remove unused header file

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Volker Lendecke <vl@samba.org>
7 weeks agos4:dsdb: Only use the required md4 and md5 header files
Andreas Schneider [Wed, 27 Feb 2019 07:07:37 +0000 (08:07 +0100)]
s4:dsdb: Only use the required md4 and md5 header files

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Volker Lendecke <vl@samba.org>
7 weeks agos4:dsdb: Only use the required md4 header file
Andreas Schneider [Wed, 27 Feb 2019 07:06:21 +0000 (08:06 +0100)]
s4:dsdb: Only use the required md4 header file

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Volker Lendecke <vl@samba.org>
7 weeks agolibcli:auth: Only use the required md4 header
Andreas Schneider [Wed, 27 Feb 2019 07:02:24 +0000 (08:02 +0100)]
libcli:auth: Only use the required md4 header

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Volker Lendecke <vl@samba.org>
7 weeks agolibcli:auth: Only use the required md4 header
Andreas Schneider [Wed, 27 Feb 2019 06:59:18 +0000 (07:59 +0100)]
libcli:auth: Only use the required md4 header

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Volker Lendecke <vl@samba.org>
7 weeks agokrb5_wrap: Only use the required md4 header
Andreas Schneider [Wed, 27 Feb 2019 06:57:44 +0000 (07:57 +0100)]
krb5_wrap: Only use the required md4 header

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Volker Lendecke <vl@samba.org>
7 weeks agolib:crypto: Include only the required header files
Andreas Schneider [Tue, 26 Feb 2019 17:30:22 +0000 (18:30 +0100)]
lib:crypto: Include only the required header files

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Volker Lendecke <vl@samba.org>
7 weeks agolibcli:auth: Avoid explicit ZERO_STRUCT
Andreas Schneider [Fri, 26 Oct 2018 12:50:29 +0000 (14:50 +0200)]
libcli:auth: Avoid explicit ZERO_STRUCT

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
Autobuild-User(master): Jeremy Allison <jra@samba.org>
Autobuild-Date(master): Wed Feb 27 03:22:50 CET 2019 on sn-devel-144

7 weeks agoauth:gensec: Make sure we zero the checksum after use
Andreas Schneider [Tue, 30 Oct 2018 16:08:35 +0000 (17:08 +0100)]
auth:gensec: Make sure we zero the checksum after use

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
7 weeks agolibcli:smb: Zero sensitive memory after use
Andreas Schneider [Thu, 11 Oct 2018 12:33:52 +0000 (14:33 +0200)]
libcli:smb: Zero sensitive memory after use

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
7 weeks agorpc_server: Use dom_sid_str_buf
Volker Lendecke [Thu, 10 Jan 2019 20:13:36 +0000 (21:13 +0100)]
rpc_server: Use dom_sid_str_buf

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
7 weeks agolibnet: Use dom_sid_str_buf
Volker Lendecke [Mon, 7 Jan 2019 20:03:06 +0000 (21:03 +0100)]
libnet: Use dom_sid_str_buf

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
7 weeks agodsdb: Align integer types
Volker Lendecke [Thu, 25 Oct 2018 19:29:29 +0000 (21:29 +0200)]
dsdb: Align integer types

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
7 weeks agoaudit_log: Use dom_sid_str_buf
Volker Lendecke [Tue, 8 Jan 2019 08:47:40 +0000 (09:47 +0100)]
audit_log: Use dom_sid_str_buf

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
7 weeks agowinbind: Avoid a "==False"
Volker Lendecke [Mon, 12 Nov 2018 11:54:58 +0000 (12:54 +0100)]
winbind: Avoid a "==False"

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
7 weeks agowinbind: Fix an error path memleak
Volker Lendecke [Mon, 15 Oct 2018 06:32:33 +0000 (08:32 +0200)]
winbind: Fix an error path memleak

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
7 weeks agowinbind: Align integer types
Volker Lendecke [Fri, 9 Nov 2018 20:17:57 +0000 (21:17 +0100)]
winbind: Align integer types

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
7 weeks agowinbindd: Fix typos
Volker Lendecke [Tue, 30 Oct 2018 13:55:35 +0000 (14:55 +0100)]
winbindd: Fix typos

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
7 weeks agolibads: Align integer types
Volker Lendecke [Sat, 12 Jan 2019 13:59:58 +0000 (14:59 +0100)]
libads: Align integer types

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
7 weeks agolibads: Use dom_sid_str_buf
Volker Lendecke [Fri, 9 Nov 2018 20:12:51 +0000 (21:12 +0100)]
libads: Use dom_sid_str_buf

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
7 weeks agopdbtest: Use dom_sid_str_buf
Volker Lendecke [Thu, 10 Jan 2019 20:04:33 +0000 (21:04 +0100)]
pdbtest: Use dom_sid_str_buf

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
7 weeks agoaddns: Remove some unused defines
Volker Lendecke [Wed, 3 Jan 2018 15:25:41 +0000 (16:25 +0100)]
addns: Remove some unused defines

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
7 weeks agoldb: version 1.6.2
Stefan Metzmacher [Tue, 26 Feb 2019 09:19:44 +0000 (10:19 +0100)]
ldb: version 1.6.2

* Fix standalone build of ldb.

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Autobuild-User(master): Stefan Metzmacher <metze@samba.org>
Autobuild-Date(master): Tue Feb 26 12:10:40 CET 2019 on sn-devel-144

7 weeks agotevent: version 0.9.39
Stefan Metzmacher [Tue, 26 Feb 2019 09:19:44 +0000 (10:19 +0100)]
tevent: version 0.9.39

* py_tevent: add_timer takes float argument
* C99 build fixes.
* Fix standalone build of tevent.

Signed-off-by: Stefan Metzmacher <metze@samba.org>
7 weeks agotalloc: version 2.1.16
Stefan Metzmacher [Tue, 26 Feb 2019 09:19:44 +0000 (10:19 +0100)]
talloc: version 2.1.16

* Fix standalone build of talloc.

Signed-off-by: Stefan Metzmacher <metze@samba.org>
7 weeks agotdb: version 1.3.18
Stefan Metzmacher [Tue, 26 Feb 2019 09:19:44 +0000 (10:19 +0100)]
tdb: version 1.3.18

* Fix build problems with older python versions.
* C99 build fixes.
* Fix standalone build of tdb.

Signed-off-by: Stefan Metzmacher <metze@samba.org>
7 weeks agoSearch for location of waf script
David Mulder [Thu, 7 Feb 2019 17:47:47 +0000 (10:47 -0700)]
Search for location of waf script

When calling make from the ldb, talloc, tdb, and
tevent bundles, we need to first find the
location of the waf script. Currently the build
fails since it can't find waf.

Fixes regression caused by a660b7f.

Signed-off-by: David Mulder <dmulder@suse.com>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
7 weeks agoCVE-2019-3824 ldb: Release ldb 1.6.1
Gary Lockyer [Mon, 18 Feb 2019 21:16:03 +0000 (10:16 +1300)]
CVE-2019-3824 ldb: Release ldb 1.6.1

* CVE-2019-3824 out of bounds read in wildcard compare (bug 13773)

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

Signed-off-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Gary Lockyer <gary@catalyst.net.nz>
Autobuild-User(master): Gary Lockyer <gary@samba.org>
Autobuild-Date(master): Mon Feb 25 22:54:13 CET 2019 on sn-devel-144

7 weeks agoCVE-2019-3824 ldb: Add tests for ldb_wildcard_match
Gary Lockyer [Mon, 18 Feb 2019 21:24:38 +0000 (10:24 +1300)]
CVE-2019-3824 ldb: Add tests for ldb_wildcard_match

Add cmocka tests for ldb_wildcard_match.

Running test_wildcard_match under valgrind reproduces
 CVE-2019-3824 out of bounds read in wildcard compare (bug 13773)

 valgrind --suppressions=lib/ldb/tests/ldb_match_test.valgrind\
          bin/ldb_match_test

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

Signed-off-by: Gary Lockyer <gary@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
7 weeks agoCVE-2019-3824 ldb: wildcard_match end of data check
Gary Lockyer [Mon, 18 Feb 2019 21:26:56 +0000 (10:26 +1300)]
CVE-2019-3824 ldb: wildcard_match end of data check

ldb_handler_copy and ldb_val_dup over allocate by one and add a trailing '\0'
to the data, to make them safe to use the C string functions on.

However testing for the trailing '\0' is not the correct way to test for
the end of a value, the length should be checked instead.

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

Signed-off-by: Gary Lockyer <gary@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
7 weeks agoCVE-2019-3824 ldb: wildcard_match check tree operation
Gary Lockyer [Mon, 18 Feb 2019 21:26:25 +0000 (10:26 +1300)]
CVE-2019-3824 ldb: wildcard_match check tree operation

Check the operation type of the passed parse tree, and return
LDB_INAPPROPRIATE_MATCH if the operation is not LDB_OP_SUBSTRING.

A query of "attribute=*" gets parsed as LDB_OP_PRESENT, checking the
operation and failing ldb_wildcard_match should help prevent confusion
writing tests.

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

Signed-off-by: Gary Lockyer <gary@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
7 weeks agoCVE-2019-3824 ldb: ldb_parse_tree use talloc_zero
Gary Lockyer [Mon, 18 Feb 2019 21:25:24 +0000 (10:25 +1300)]
CVE-2019-3824 ldb: ldb_parse_tree use talloc_zero

Initialise the created ldb_parse_tree with talloc_zero, this ensures
that it is correctly initialised if inadvertently passed to a function
expecting a different operation type.

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

Signed-off-by: Gary Lockyer <gary@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
7 weeks agoCVE-2019-3824 ldb: Improve code style and layout in wildcard processing
Andrew Bartlett [Sun, 3 Feb 2019 22:22:50 +0000 (11:22 +1300)]
CVE-2019-3824 ldb: Improve code style and layout in wildcard processing

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

Signed-off-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Gary Lockyer <gary@catalyst.net.nz>
7 weeks agoCVE-2019-3824 ldb: Extra comments to clarify no pointer wrap in wildcard processing
Andrew Bartlett [Sun, 3 Feb 2019 22:22:34 +0000 (11:22 +1300)]
CVE-2019-3824 ldb: Extra comments to clarify no pointer wrap in wildcard processing

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

Signed-off-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Gary Lockyer <gary@catalyst.net.nz>
7 weeks agoCVE-2019-3824 ldb: Out of bound read in ldb_wildcard_compare
Lukas Slebodnik [Fri, 18 Jan 2019 15:37:24 +0000 (16:37 +0100)]
CVE-2019-3824 ldb: Out of bound read in ldb_wildcard_compare

There is valgrind error in few tests tests/test-generic.sh
 91 echo "Test wildcard match"
 92 $VALGRIND ldbadd $LDBDIR/tests/test-wildcard.ldif  || exit 1
 93 $VALGRIND ldbsearch '(cn=test*multi)'  || exit 1
 95 $VALGRIND ldbsearch '(cn=*test_multi)'  || exit 1
 97 $VALGRIND ldbsearch '(cn=test*multi*test*multi)'  || exit 1

e.g.
  ==3098== Memcheck, a memory error detector
  ==3098== Copyright (C) 2002-2017, and GNU GPL'd, by Julian Seward et al.
  ==3098== Using Valgrind-3.14.0 and LibVEX; rerun with -h for copyright info
  ==3098== Command: ./bin/ldbsearch (cn=test*multi)
  ==3098==
  ==3098== Invalid read of size 1
  ==3098==    at 0x483CEE7: memchr (vg_replace_strmem.c:890)
  ==3098==    by 0x49A9073: memmem (in /usr/lib64/libc-2.28.9000.so)
  ==3098==    by 0x485DFE9: ldb_wildcard_compare (ldb_match.c:313)
  ==3098==    by 0x485DFE9: ldb_match_substring (ldb_match.c:360)
  ==3098==    by 0x485DFE9: ldb_match_message (ldb_match.c:572)
  ==3098==    by 0x558F8FA: search_func (ldb_kv_search.c:549)
  ==3098==    by 0x48C78CA: ??? (in /usr/lib64/libtdb.so.1.3.17)
  ==3098==    by 0x48C7A60: tdb_traverse_read (in /usr/lib64/libtdb.so.1.3.17)
  ==3098==    by 0x557B7C4: ltdb_traverse_fn (ldb_tdb.c:274)
  ==3098==    by 0x558FBFA: ldb_kv_search_full (ldb_kv_search.c:594)
  ==3098==    by 0x558FBFA: ldb_kv_search (ldb_kv_search.c:854)
  ==3098==    by 0x558E497: ldb_kv_callback (ldb_kv.c:1713)
  ==3098==    by 0x48FCD58: tevent_common_invoke_timer_handler (in /usr/lib64/libtevent.so.0.9.38)
  ==3098==    by 0x48FCEFD: tevent_common_loop_timer_delay (in /usr/lib64/libtevent.so.0.9.38)
  ==3098==    by 0x48FE14A: ??? (in /usr/lib64/libtevent.so.0.9.38)
  ==3098==  Address 0x4b4ab81 is 0 bytes after a block of size 129 alloc'd
  ==3098==    at 0x483880B: malloc (vg_replace_malloc.c:309)
  ==3098==    by 0x491048B: talloc_strndup (in /usr/lib64/libtalloc.so.2.1.15)
  ==3098==    by 0x48593CA: ldb_casefold_default (ldb_utf8.c:59)
  ==3098==    by 0x485F68D: ldb_handler_fold (attrib_handlers.c:64)
  ==3098==    by 0x485DB88: ldb_wildcard_compare (ldb_match.c:257)
  ==3098==    by 0x485DB88: ldb_match_substring (ldb_match.c:360)
  ==3098==    by 0x485DB88: ldb_match_message (ldb_match.c:572)
  ==3098==    by 0x558F8FA: search_func (ldb_kv_search.c:549)
  ==3098==    by 0x48C78CA: ??? (in /usr/lib64/libtdb.so.1.3.17)
  ==3098==    by 0x48C7A60: tdb_traverse_read (in /usr/lib64/libtdb.so.1.3.17)
  ==3098==    by 0x557B7C4: ltdb_traverse_fn (ldb_tdb.c:274)
  ==3098==    by 0x558FBFA: ldb_kv_search_full (ldb_kv_search.c:594)
  ==3098==    by 0x558FBFA: ldb_kv_search (ldb_kv_search.c:854)
  ==3098==    by 0x558E497: ldb_kv_callback (ldb_kv.c:1713)
  ==3098==    by 0x48FCD58: tevent_common_invoke_timer_handler (in /usr/lib64/libtevent.so.0.9.38)
  ==3098==
  # record 1
  dn: cn=test_multi_test_multi_test_multi,o=University of Michigan,c=TEST
  cn: test_multi_test_multi_test_multi
  description: test multi wildcards matching
  objectclass: person
  sn: multi_test
  name: test_multi_test_multi_test_multi
  distinguishedName: cn=test_multi_test_multi_test_multi,o=University of Michiga
   n,c=TEST

  # returned 1 records
  # 1 entries
  # 0 referrals

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

Signed-off-by: Lukas Slebodnik <lslebodn@fedoraproject.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Gary Lockyer <gary@catalyst.net.nz>
7 weeks agolibcli: Pass buf/len to smb2_negotiate_context_add
Volker Lendecke [Mon, 11 Feb 2019 08:03:39 +0000 (09:03 +0100)]
libcli: Pass buf/len to smb2_negotiate_context_add

Every caller did a data_blob_const() right before calling
smb2_negotiate_context_add(). Avoid that.

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
Autobuild-User(master): Andreas Schneider <asn@cryptomilk.org>
Autobuild-Date(master): Mon Feb 25 21:07:22 CET 2019 on sn-devel-144

7 weeks agolibsmb: Resolve special _recv handling in cli_ntcreate
Volker Lendecke [Fri, 15 Feb 2019 20:22:18 +0000 (21:22 +0100)]
libsmb: Resolve special _recv handling in cli_ntcreate

cli_smb2_create_fnum_recv will gain output create blobs soon and thus
differ from the NT1 function.

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>