garming/samba-autobuild/.git
5 months 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>
5 months 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>
5 months 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>
5 months 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>
5 months 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>
5 months 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>
5 months 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>
5 months 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>
5 months 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>
5 months 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>
5 months 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>
5 months 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

5 months 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>
5 months 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>
5 months 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>
5 months 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>
5 months 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>
5 months 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>
5 months 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>
5 months 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>
5 months 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>
5 months 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

5 months 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>
5 months 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>
5 months 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>
5 months 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>
5 months 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>
5 months 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>
5 months 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>
5 months 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>
5 months 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>
5 months 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>
5 months 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>
5 months 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>
5 months 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>
5 months 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>
5 months agoldb: version 1.6.2 ldb-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

5 months agotevent: version 0.9.39 tevent-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>
5 months agotalloc: version 2.1.16 talloc-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>
5 months agotdb: version 1.3.18 tdb-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>
5 months 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>
5 months agoCVE-2019-3824 ldb: Release ldb 1.6.1 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

5 months 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>
5 months 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>
5 months 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>
5 months 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>
5 months 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>
5 months 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>
5 months 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>
5 months 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

5 months 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>
5 months agosmbd: Align integer types
Volker Lendecke [Mon, 11 Feb 2019 08:02:39 +0000 (09:02 +0100)]
smbd: Align integer types

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
5 months agotorture: Use GUID_zero()
Volker Lendecke [Fri, 8 Feb 2019 16:26:04 +0000 (17:26 +0100)]
torture: Use GUID_zero()

10 lines less...

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
5 months agos3: smbd: filenames - ensure we replace the missing '/' if we error in an intermediat...
Jeremy Allison [Sun, 24 Feb 2019 16:15:23 +0000 (08:15 -0800)]
s3: smbd: filenames - ensure we replace the missing '/' if we error in an intermediate POSIX path.

Previous regression test ensures we still return the correct
error code for POSIX pathname operations.

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

Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Volker Lendecke <vl@samba.org>
Autobuild-User(master): Volker Lendecke <vl@samba.org>
Autobuild-Date(master): Mon Feb 25 09:33:27 CET 2019 on sn-devel-144

5 months agos3: torture: Add additional POSIX mkdir tests.
Jeremy Allison [Sun, 24 Feb 2019 16:03:32 +0000 (08:03 -0800)]
s3: torture: Add additional POSIX mkdir tests.

Ensure that if POSIX_foo exists as a file
we return the correct error code NT_STATUS_OBJECT_PATH_NOT_FOUND
if we try and traverse it as a directory.

Also ensure creation/deletion of POSIX_foo/foo fails
for directories and files with NT_STATUS_OBJECT_PATH_NOT_FOUND
if the directory POSIX_foo/ doesn't exist.

knownfail is back :-).

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

Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Volker Lendecke <vl@samba.org>
5 months agoctdb-cluster-mutex: Separate out command and file handling
Martin Schwenke [Mon, 21 Jan 2019 01:16:43 +0000 (12:16 +1100)]
ctdb-cluster-mutex: Separate out command and file handling

This code is difficult to read and there really is no common code
between the 2 cases.  For example, there is no need to split a
filename into words.  Separating each of the 2 cases into its own
function makes the logic much easier to understand.

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

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): Mon Feb 25 03:40:16 CET 2019 on sn-devel-144

5 months agoctdb-tests: Add a test for configuring the recovery lock as a command
Martin Schwenke [Mon, 21 Jan 2019 01:15:33 +0000 (12:15 +1100)]
ctdb-tests: Add a test for configuring the recovery lock as a command

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

Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
5 months agoctdb-tests: Add -R option for local daemons to use recovery lock command
Martin Schwenke [Mon, 21 Jan 2019 01:13:29 +0000 (12:13 +1100)]
ctdb-tests: Add -R option for local daemons to use recovery lock command

Under the covers, a command is always used.  However, there is no way
of testing of the code path where a command is explicitly configured.

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

Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
5 months agoctdb-tests: Force test failure if local daemon setup fails
Martin Schwenke [Mon, 21 Jan 2019 01:13:08 +0000 (12:13 +1100)]
ctdb-tests: Force test failure if local daemon setup fails

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

Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
5 months agoctdb-recoverd: Time out attempt to take recovery lock after 120s
Martin Schwenke [Fri, 22 Feb 2019 04:09:33 +0000 (15:09 +1100)]
ctdb-recoverd: Time out attempt to take recovery lock after 120s

Currently this will wait forever.  It really needs a timeout in case
the cluster filesystem (or other lock mechanism) is completely wedged.

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

Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
5 months agoctdb-recoverd: Ban node on unknown error when taking recovery lock
Martin Schwenke [Thu, 10 Jan 2019 03:01:57 +0000 (14:01 +1100)]
ctdb-recoverd: Ban node on unknown error when taking recovery lock

We really shouldn't see unknown errors.  They probably represent a
misconfigured recovery lock or similar.

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

Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
5 months agoctdb-recoverd: Make recoverd context available in recovery lock handle
Martin Schwenke [Thu, 10 Jan 2019 02:24:34 +0000 (13:24 +1100)]
ctdb-recoverd: Make recoverd context available in recovery lock handle

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

Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
5 months agoctdb-recoverd: Clean up logging on failure to take recovery lock
Martin Schwenke [Mon, 21 Jan 2019 05:36:13 +0000 (16:36 +1100)]
ctdb-recoverd: Clean up logging on failure to take recovery lock

Add an explicit case for a timeout and clean up the other messages.

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

Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
5 months agoctdb-recoverd: Free cluster mutex handler on failure to take lock
Martin Schwenke [Mon, 21 Jan 2019 05:28:28 +0000 (16:28 +1100)]
ctdb-recoverd: Free cluster mutex handler on failure to take lock

If nested events occur while the file descriptor handler is still
active then chaos can ensue.  For example, if a node is banned and the
lock is explicitly cancelled (e.g. due to election loss) then
double-talloc-free()s abound.

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

Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
5 months agoctdb-config: Change example recovery lock setting to one that fails
Martin Schwenke [Thu, 10 Jan 2019 03:15:18 +0000 (14:15 +1100)]
ctdb-config: Change example recovery lock setting to one that fails

ctdbd will start without a recovery lock configured.  It will log a
message saying that this is not optimal.  However, a careless user may
overlook both this message and the importance of setting a recovery
lock.  If the existing example configuration is uncommented then the
directory containing it will be created (by 01.reclock.script) and the
failure (i.e. multiple nodes able to take the lock) will be confusing.

Instead, change the example setting to one that will result in banned
nodes, encouraging users to consciously configure (or deconfigure) the
recovery lock.  Tweak the corresponding comment.

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

Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
5 months agosmbd: unix_convert: Ensure we don't call get_real_filename on POSIX paths.
Jeremy Allison [Sat, 23 Feb 2019 20:24:31 +0000 (12:24 -0800)]
smbd: unix_convert: Ensure we don't call get_real_filename on POSIX paths.

For posix_pathnames don't blunder into the name_has_wildcard OR
get_real_filename() codepaths as they may be doing case insensitive lookups.
So when creating a new POSIX directory 'Foo' they might
match on name 'foo'.

Remove POSIX-MKDIR from knownfail.

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

Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Volker Lendecke <vl@samba.org>
Autobuild-User(master): Volker Lendecke <vl@samba.org>
Autobuild-Date(master): Sun Feb 24 14:04:14 CET 2019 on sn-devel-144

5 months agosmbd: SMB1-POSIX: Add missing info-level SMB_POSIX_PATH_OPEN for UCF_UNIX_NAME_LOOKUP...
Jeremy Allison [Sat, 23 Feb 2019 20:26:01 +0000 (12:26 -0800)]
smbd: SMB1-POSIX: Add missing info-level SMB_POSIX_PATH_OPEN for UCF_UNIX_NAME_LOOKUP flag.

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

Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Volker Lendecke <vl@samba.org>
5 months agos3: smbtorture3: Add POSIX-MKDIR test for posix_mkdir case sensitive bug.
Jeremy Allison [Sun, 24 Feb 2019 01:52:34 +0000 (17:52 -0800)]
s3: smbtorture3: Add POSIX-MKDIR test for posix_mkdir case sensitive bug.

Test does:

mkdir POSIX_foo
mkdir POSIX_Foo
mkdir POSIX_foo/Foo
mkdir POSIX_foo/foo
mkdir POSIX_Foo/Foo
mkdir POSIX_Foo/foo

Which should pass a SMB1 POSIX extensions server
as posix mkdir should always be case sensitive
no matter what the share is set to.

Mark as knownfail for now.

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

Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Volker Lendecke <vl@samba.org>
5 months agowinbindd: set idmap cache entries as the last step in async wb_xids2sids
Ralph Boehme [Thu, 21 Feb 2019 15:55:09 +0000 (16:55 +0100)]
winbindd: set idmap cache entries as the last step in async wb_xids2sids

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

Signed-off-by: Ralph Boehme <slow@samba.org>
Reviewed-by: Volker Lendecke <vl@samba.org>
Autobuild-User(master): Volker Lendecke <vl@samba.org>
Autobuild-Date(master): Sat Feb 23 09:23:22 CET 2019 on sn-devel-144

5 months agowinbindd: track whether a result from xid2sid was coming from the cache
Ralph Boehme [Fri, 22 Feb 2019 10:00:00 +0000 (11:00 +0100)]
winbindd: track whether a result from xid2sid was coming from the cache

This is needed in preparation of moving the step to update the idmap
cache from the per-idmap-domain callback wb_xids2sids_dom_done() to the
top-level callback wb_xids2sids_done().

Currently the sequence of action is:

* check cache, if not found:
  * ask backends
  * cache result from backend
* return results

Iow, if we got something from the cache, we don't write the cache.

The next commit defers updating the cache to the top-level callback, so
the sequence becomes

* check cache, if not found:
  * ask backends
* cache results
* return results

This has two problems:

* it needlessly writes to the cache what we just got from it

* it possibly overwrites the ID_TYPE_BOTH for a SID-to-xid mapping in
  the following case:

  - existing ID_TYPE_BOTH mapping in the cache, eg:

    IDMAP/SID2XID/S-1-5-21-2180672342-2513613279-2566592647-512 -> Value: 3000000:B

  - someone calls wb_xids2sids_send() with xid.id=3000000,xid.type=ID_TYPE_GID

  - cache lookup with idmap_cache_find_gid2sid() succeeds

  - when caching results we'd call idmap_cache_set_sid2unixid() with the
    callers xid.type=ID_TYPE_GID, so idmap_cache_set_sid2unixid() will
    overwrite the SID-to-xid mapping with ID_TYPE_GID

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

Signed-off-by: Ralph Boehme <slow@samba.org>
Reviewed-by: Volker Lendecke <vl@samba.org>
5 months agowinbindd: switch send-next/done order
Ralph Boehme [Thu, 21 Feb 2019 15:52:21 +0000 (16:52 +0100)]
winbindd: switch send-next/done order

In preparation of adding more logic to the done step. No change in
behaviour.

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

Signed-off-by: Ralph Boehme <slow@samba.org>
Reviewed-by: Volker Lendecke <vl@samba.org>
5 months agowinbindd: update xid in wb_xids2sids_state->xids with what we got
Ralph Boehme [Thu, 21 Feb 2019 17:40:20 +0000 (18:40 +0100)]
winbindd: update xid in wb_xids2sids_state->xids with what we got

In preparation of priming the idmap cache in the top-level
wb_xids2sids_done(), not in the per-idmap-domain callback
wb_xids2sids_dom_done().

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

Signed-off-by: Ralph Boehme <slow@samba.org>
Reviewed-by: Volker Lendecke <vl@samba.org>
5 months agowinbindd: convert id to a pointer in wb_xids2sids_dom_done()
Ralph Boehme [Thu, 21 Feb 2019 17:39:46 +0000 (18:39 +0100)]
winbindd: convert id to a pointer in wb_xids2sids_dom_done()

No change in behaviour.

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

Signed-off-by: Ralph Boehme <slow@samba.org>
Reviewed-by: Volker Lendecke <vl@samba.org>
5 months agowinbindd: make xids a const argument to wb_xids2sids_send()
Ralph Boehme [Fri, 22 Feb 2019 15:29:07 +0000 (16:29 +0100)]
winbindd: make xids a const argument to wb_xids2sids_send()

The previous commit made an internal copy of xids, this commit makes it
more obvious that we must not mess with the xids argument but treat it as
an in-parameter and don't write to it.

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

Signed-off-by: Ralph Boehme <slow@samba.org>
Reviewed-by: Volker Lendecke <vl@samba.org>
5 months agowinbindd: make a copy of xid's in wb_xids2sids_send()
Ralph Boehme [Thu, 21 Feb 2019 17:34:51 +0000 (18:34 +0100)]
winbindd: make a copy of xid's in wb_xids2sids_send()

This is in preparation of setting the result of the mapping in the top-
level callback wb_xids2sids_done(), not in the per-idmap-domain callback
wb_xids2sids_dom_done().

When caching the mapping we need the id-type from the backend, so we
need a way to pass up that information from wb_xids2sids_dom_done() up
to wb_xids2sids_done()

The xids array copy gets passed from wb_xids2sids_send() to
wb_xids2sids_dom_send(), so wb_xids2sids_dom_done() can then directly
update the top-level copy.

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

Signed-off-by: Ralph Boehme <slow@samba.org>
Reviewed-by: Volker Lendecke <vl@samba.org>
5 months agos3:winbindd: Remove unused arcfour.h from PAM handling
Andreas Schneider [Fri, 22 Feb 2019 12:10:30 +0000 (13:10 +0100)]
s3:winbindd: Remove unused arcfour.h from PAM handling

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): Fri Feb 22 23:16:40 CET 2019 on sn-devel-144

5 months agos3:rpc_server: Remove unused arcfour.h from netlogon
Andreas Schneider [Fri, 22 Feb 2019 12:09:40 +0000 (13:09 +0100)]
s3:rpc_server: Remove unused arcfour.h from netlogon

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
5 months agos3:auth: Remove unused arcfour.h from auth_util.c
Andreas Schneider [Fri, 22 Feb 2019 12:07:15 +0000 (13:07 +0100)]
s3:auth: Remove unused arcfour.h from auth_util.c

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
5 months agos3:auth: Remove unused arcfour.h header from server_info.c
Andreas Schneider [Fri, 22 Feb 2019 12:03:04 +0000 (13:03 +0100)]
s3:auth: Remove unused arcfour.h header from server_info.c

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
5 months agos4:dns_crypto: Remove unused include of hmac_md5.h
Andreas Schneider [Tue, 6 Nov 2018 16:36:31 +0000 (17:36 +0100)]
s4:dns_crypto: Remove unused include of hmac_md5.h

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
5 months agolibsmb: Fix a resource leak in cli_posix_mkdir
Volker Lendecke [Wed, 20 Feb 2019 10:55:01 +0000 (11:55 +0100)]
libsmb: Fix a resource leak in cli_posix_mkdir

smbd does posix_mkdir if the wire flags are exactly

if (wire_open_mode == (SMB_O_CREAT|SMB_O_DIRECTORY))

open_flags_to_wire however adds a SMB_O_RDONLY, so that we enter the
normal open routine which happens to create a directory as well. The
main difference is that posix_mkdir does *NOT* return an open
handle. As we did not enter this code path due to the SMB_O_RDONLY we
leak a SMB1 fd per cli_posix_mkdir call.

Pretty hard to test automatically, this would be an interaction with
smbstatus.

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
5 months agolibsmb: Pull up wire_flags calculation from open_internal
Volker Lendecke [Wed, 20 Feb 2019 10:41:42 +0000 (11:41 +0100)]
libsmb: Pull up wire_flags calculation from open_internal

This avoids passing down a boolean

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
5 months agolibsmb: Convert cli_posix_open to normal tevent_req pattern
Volker Lendecke [Fri, 15 Feb 2019 19:14:47 +0000 (20:14 +0100)]
libsmb: Convert cli_posix_open to normal tevent_req pattern

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
5 months agoset caller allocation units in statvfs f_bavail
Mark Niggemann [Thu, 8 Jun 2017 16:20:46 +0000 (11:20 -0500)]
set caller allocation units in statvfs f_bavail

Signed-off-by: Mark Niggemann <mark.niggemann@ge.com>
Reviewed-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Bjoern Jacke <bjacke@samba.org>
Autobuild-User(master): Björn Jacke <bjacke@samba.org>
Autobuild-Date(master): Fri Feb 22 15:04:55 CET 2019 on sn-devel-144

5 months agonotifyd: Fix SIGBUS on sparc
Jiří Šašek [Thu, 6 Dec 2018 13:10:53 +0000 (14:10 +0100)]
notifyd: Fix SIGBUS on sparc

Problem is the structure "struct notify_instance" can lay in message buffer on
address not dividable by 8 but this structure begins by uint_64 (secs in
time-stamp). Structure should be re-packed to standalone buffer before the use.

Bug: https://bugzilla.samba.org/show_bug.cgi?id=13704
Signed-off-by: jiri.sasek@oracle.com
Reviewed-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
Autobuild-User(master): Björn Jacke <bjacke@samba.org>
Autobuild-Date(master): Fri Feb 22 12:30:11 CET 2019 on sn-devel-144

5 months agoctdb-tests: Add test for ctdb_io.c
Christof Schmitt [Tue, 19 Feb 2019 20:59:05 +0000 (13:59 -0700)]
ctdb-tests: Add test for ctdb_io.c

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

Signed-off-by: Christof Schmitt <cs@samba.org>
Reviewed-by: Martin Schwenke <martin@meltin.net>
Autobuild-User(master): Martin Schwenke <martins@samba.org>
Autobuild-Date(master): Fri Feb 22 03:51:37 CET 2019 on sn-devel-144

5 months agoctdb: buffer write beyond limits
Swen Schillig [Fri, 15 Feb 2019 13:34:05 +0000 (14:34 +0100)]
ctdb: buffer write beyond limits

In order to calculate the number of bytes correctly which
are to be read into the buffer, the buffer.offset must be taken
into account.

This patch fixes a regression introduced by 382705f495dd.

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

Signed-off-by: Swen Schillig <swen@linux.ibm.com>
Reviewed-by: Christof Schmitt <cs@samba.org>
Reviewed-by: Martin Schwenke <martin@meltin.net>
5 months agoselftest: Confirm new and old SDDL strings differ after a samba-tool dsacl set
Andrew Bartlett [Thu, 21 Feb 2019 02:53:07 +0000 (15:53 +1300)]
selftest: Confirm new and old SDDL strings differ after a samba-tool dsacl set

Signed-off-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
Autobuild-User(master): Andrew Bartlett <abartlet@samba.org>
Autobuild-Date(master): Thu Feb 21 05:37:31 CET 2019 on sn-devel-144

5 months agoselftest: Add test for samba-tool dsacl get, cross-checked with samba-tool dsacl set
Andrew Bartlett [Thu, 21 Feb 2019 02:49:25 +0000 (15:49 +1300)]
selftest: Add test for samba-tool dsacl get, cross-checked with samba-tool dsacl set

Signed-off-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
5 months agosamba-tool dsacl: Mark old and new descriptor output correctly
Andrew Bartlett [Thu, 21 Feb 2019 02:33:01 +0000 (15:33 +1300)]
samba-tool dsacl: Mark old and new descriptor output correctly

Signed-off-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
5 months agoAdd command "samba-tool dsacl get" This code is very equal to "samba-tool dsacl set...
Martin Krämer [Wed, 9 Jan 2019 15:13:58 +0000 (15:13 +0000)]
Add command "samba-tool dsacl get" This code is very equal to "samba-tool dsacl set", except it only prints out the current sddl of an object.

Signed-off-by: Martin Krämer <mk.maddin@gmail.com>
Reviewed-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
5 months agoUpdate dsacl.py - add_ace to handle/verify sddl parameter correct
Martin Krämer [Sat, 26 Jan 2019 09:17:25 +0000 (09:17 +0000)]
Update dsacl.py - add_ace to handle/verify sddl parameter correct

Test for samba-tool dsacl set --sddl parmeter

Update tests.py - add dsacl (dsacl.py / samba-tool dsacl set) test

Signed-off-by: <Martin Krämer mk.maddin@gmail.com>
Reviewed-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
5 months agobootstrap/README.md: add README.md
Joe Guo [Fri, 8 Feb 2019 03:28:18 +0000 (16:28 +1300)]
bootstrap/README.md: add README.md

Signed-off-by: Joe Guo <joeg@catalyst.net.nz>
Reviewed-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
5 months agobootstrap/dists: add rendered files for dists
Joe Guo [Tue, 12 Feb 2019 00:01:17 +0000 (13:01 +1300)]
bootstrap/dists: add rendered files for dists

Add these into repo, then we can link it to samba wiki,
for people to get a latest and precise pkg list

Signed-off-by: Joe Guo <joeg@catalyst.net.nz>
Reviewed-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
5 months agobootstrap/docker.py: add cli to build/tag/push docker images
Joe Guo [Sun, 17 Feb 2019 23:47:50 +0000 (12:47 +1300)]
bootstrap/docker.py: add cli to build/tag/push docker images

Signed-off-by: Joe Guo <joeg@catalyst.net.nz>
Reviewed-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
5 months agobootstrap/template.py: add cli to render templates
Joe Guo [Sun, 17 Feb 2019 23:31:28 +0000 (12:31 +1300)]
bootstrap/template.py: add cli to render templates

- bootstrap for each dist
- Dockerfile for each dist
- Vagrantfile all in one

Signed-off-by: Joe Guo <joeg@catalyst.net.nz>
Reviewed-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
5 months agobootstrap/config.py: define package lists and templates
Joe Guo [Thu, 7 Feb 2019 01:07:33 +0000 (14:07 +1300)]
bootstrap/config.py: define package lists and templates

Define default pkg list, and allow to override for each dist.
Also define bootstrap/Dockerfile/Vagrantfile templates.

Signed-off-by: Joe Guo <joeg@catalyst.net.nz>
Reviewed-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
5 months agoselftest/tests: add smoketests for dbcheck --quick-membership-checks
Joe Guo [Fri, 15 Feb 2019 09:55:51 +0000 (22:55 +1300)]
selftest/tests: add smoketests for dbcheck --quick-membership-checks

Signed-off-by: Joe Guo <joeg@catalyst.net.nz>
Reviewed-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
5 months agoselftest/tests: add helper method to simplify plantestsuite
Joe Guo [Fri, 15 Feb 2019 09:15:23 +0000 (22:15 +1300)]
selftest/tests: add helper method to simplify plantestsuite

Signed-off-by: Joe Guo <joeg@catalyst.net.nz>
Reviewed-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
5 months agodbcheck: skip reverse member link checks when cli option specified
Joe Guo [Thu, 3 Jan 2019 02:55:16 +0000 (15:55 +1300)]
dbcheck: skip reverse member link checks when cli option specified

currently dbcheck cmd tooks about 1 day to finish on a 100k user database.
We can skip member reverse link checks to speed it up dramatically.
A new cli option is added to enable the skipping.

Signed-off-by: Joe Guo <joeg@catalyst.net.nz>
Reviewed-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>