bbaumbach/samba-autobuild/.git
6 years agopackaging: Remove SWAT references from Solaris
Andreas Schneider [Tue, 9 May 2017 14:33:49 +0000 (16:33 +0200)]
packaging: Remove SWAT references from Solaris

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: David Disseldorp <ddiss@samba.org>
6 years agopackaging: Remove SWAT references from RHEL
Andreas Schneider [Tue, 9 May 2017 14:03:43 +0000 (16:03 +0200)]
packaging: Remove SWAT references from RHEL

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: David Disseldorp <ddiss@samba.org>
6 years agopackaging: Remove SWAT references from RHEL-CTDB
Andreas Schneider [Tue, 9 May 2017 13:51:08 +0000 (15:51 +0200)]
packaging: Remove SWAT references from RHEL-CTDB

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: David Disseldorp <ddiss@samba.org>
6 years agopackaging: Remove LSB packaging
Andreas Schneider [Tue, 9 May 2017 13:48:09 +0000 (15:48 +0200)]
packaging: Remove LSB packaging

This hasn't been touched since 2001.

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: David Disseldorp <ddiss@samba.org>
6 years agopackaging: Remove setup script for SWAT
Andreas Schneider [Tue, 9 May 2017 13:47:19 +0000 (15:47 +0200)]
packaging: Remove setup script for SWAT

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: David Disseldorp <ddiss@samba.org>
6 years agodbwrap_ctdb: Fix a typo
Volker Lendecke [Mon, 8 May 2017 10:16:16 +0000 (12:16 +0200)]
dbwrap_ctdb: Fix a typo

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): Wed May 10 03:25:40 CEST 2017 on sn-devel-144

6 years agos3-gpo: Fix CID #1405972 Resource leak
Günther Deschner [Tue, 9 May 2017 12:31:15 +0000 (14:31 +0200)]
s3-gpo: Fix CID #1405972 Resource leak

Guenther

Signed-off-by: Guenther Deschner <gd@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
6 years agos4:tls: Do not use deprecated GnuTLS types
Andreas Schneider [Tue, 9 May 2017 11:17:13 +0000 (13:17 +0200)]
s4:tls: Do not use deprecated GnuTLS types

Those have been deprecated with GnuTLS 1.0.20 in 2004. I think it is
safe to use them now ;)

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
6 years agos3-spoolss: add winreg_del_driver_package_internal()
Günther Deschner [Wed, 2 Nov 2016 17:17:58 +0000 (18:17 +0100)]
s3-spoolss: add winreg_del_driver_package_internal()

Guenther

Signed-off-by: Guenther Deschner <gd@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
Autobuild-User(master): Günther Deschner <gd@samba.org>
Autobuild-Date(master): Tue May  9 20:44:17 CEST 2017 on sn-devel-144

6 years agos3-rpc_cli: add winreg_del_driver_package()
Günther Deschner [Wed, 2 Nov 2016 17:17:37 +0000 (18:17 +0100)]
s3-rpc_cli: add winreg_del_driver_package()

Guenther

Signed-off-by: Guenther Deschner <gd@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
6 years agos3-spoolss: add winreg_get_driver_package_internal()
Günther Deschner [Wed, 2 Nov 2016 13:37:02 +0000 (14:37 +0100)]
s3-spoolss: add winreg_get_driver_package_internal()

Guenther

Signed-off-by: Guenther Deschner <gd@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
6 years agos3-rpc_cli: add winreg_get_driver_package()
Günther Deschner [Wed, 2 Nov 2016 13:36:45 +0000 (14:36 +0100)]
s3-rpc_cli: add winreg_get_driver_package()

Guenther

Signed-off-by: Guenther Deschner <gd@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
6 years agos3-spoolss: add winreg_add_driver_package_internal()
Günther Deschner [Wed, 2 Nov 2016 12:43:34 +0000 (13:43 +0100)]
s3-spoolss: add winreg_add_driver_package_internal()

Guenther

Signed-off-by: Guenther Deschner <gd@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
6 years agos3-rpc_cli: add winreg_add_driver_package()
Günther Deschner [Wed, 2 Nov 2016 12:40:00 +0000 (13:40 +0100)]
s3-rpc_cli: add winreg_add_driver_package()

Guenther

Signed-off-by: Guenther Deschner <gd@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
6 years agos3-spoolss: add winreg_add_core_driver_internal()
Günther Deschner [Mon, 31 Oct 2016 17:07:50 +0000 (18:07 +0100)]
s3-spoolss: add winreg_add_core_driver_internal()

Guenther

Signed-off-by: Guenther Deschner <gd@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
6 years agos3-rpc_cli: add winreg_add_core_driver()
Günther Deschner [Mon, 31 Oct 2016 17:07:33 +0000 (18:07 +0100)]
s3-rpc_cli: add winreg_add_core_driver()

Guenther

Signed-off-by: Guenther Deschner <gd@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
6 years agos3-spoolss: add winreg_get_core_driver_internal()
Günther Deschner [Mon, 31 Oct 2016 16:43:58 +0000 (17:43 +0100)]
s3-spoolss: add winreg_get_core_driver_internal()

Guenther

Signed-off-by: Guenther Deschner <gd@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
6 years agos3-rpc_cli: add winreg_get_core_driver()
Günther Deschner [Mon, 31 Oct 2016 16:43:28 +0000 (17:43 +0100)]
s3-rpc_cli: add winreg_get_core_driver()

Guenther

Signed-off-by: Guenther Deschner <gd@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
6 years agos3: popt: Change to NULL from talloc_autofree_context() now we correctly free on...
Jeremy Allison [Wed, 26 Apr 2017 00:09:18 +0000 (17:09 -0700)]
s3: popt: Change to NULL from talloc_autofree_context() now we correctly free on exit.

Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
Autobuild-User(master): Andreas Schneider <asn@cryptomilk.org>
Autobuild-Date(master): Tue May  9 14:00:40 CEST 2017 on sn-devel-144

6 years agos3: client tools: Call popt_free_cmdline_auth_info() on all normal exits.
Jeremy Allison [Wed, 26 Apr 2017 00:08:30 +0000 (17:08 -0700)]
s3: client tools: Call popt_free_cmdline_auth_info() on all normal exits.

Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
6 years agos3: client tools. Remove direct access to struct user_auth_info *cmdline_auth_info.
Jeremy Allison [Wed, 26 Apr 2017 00:03:10 +0000 (17:03 -0700)]
s3: client tools. Remove direct access to struct user_auth_info *cmdline_auth_info.

Only access through utility functions. Remove all the local pointer aliases
that were just being set to cmdline_auth_info in the client tools.

Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
6 years agos3: popt: Add utility functions popt_get_cmdline_auth_info(), popt_free_cmdline_auth_...
Jeremy Allison [Wed, 26 Apr 2017 00:01:25 +0000 (17:01 -0700)]
s3: popt: Add utility functions popt_get_cmdline_auth_info(), popt_free_cmdline_auth_info().

Leave the global cmdline_auth_info still exposed, we will make it static
once the users have been converted to the utility functions.

Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
6 years agos3: popt: When using a global variable, don't hide it by helper locals.
Jeremy Allison [Tue, 25 Apr 2017 23:32:05 +0000 (16:32 -0700)]
s3: popt: When using a global variable, don't hide it by helper locals.

That makes it very unclear when you're using a global.

Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
6 years agos3-gpo: Build scripts, security and registry CSE with --enable-developer
Günther Deschner [Thu, 4 May 2017 13:07:14 +0000 (15:07 +0200)]
s3-gpo: Build scripts, security and registry CSE with --enable-developer

Guenther

Signed-off-by: Guenther Deschner <gd@samba.org>
Reviewed-by: Volker Lendecke <vl@samba.org>
Autobuild-User(master): Volker Lendecke <vl@samba.org>
Autobuild-Date(master): Tue May  9 05:18:52 CEST 2017 on sn-devel-144

6 years agos3-gpo: Fix build of scripts CSE
Günther Deschner [Thu, 4 May 2017 13:06:39 +0000 (15:06 +0200)]
s3-gpo: Fix build of scripts CSE

Guenther

Signed-off-by: Guenther Deschner <gd@samba.org>
Reviewed-by: Volker Lendecke <vl@samba.org>
6 years agoWHATSNEW: Add new 'net tdb locking' command
Christof Schmitt [Mon, 20 Feb 2017 18:52:58 +0000 (11:52 -0700)]
WHATSNEW: Add new 'net tdb locking' command

Signed-off-by: Christof Schmitt <cs@samba.org>
Reviewed-by: Volker Lendecke <vl@samba.org>
Autobuild-User(master): Christof Schmitt <cs@samba.org>
Autobuild-Date(master): Tue May  9 01:14:25 CEST 2017 on sn-devel-144

6 years agoselftest: Add test for 'net tdb' command
Christof Schmitt [Thu, 16 Feb 2017 23:23:47 +0000 (16:23 -0700)]
selftest: Add test for 'net tdb' command

Signed-off-by: Christof Schmitt <cs@samba.org>
Reviewed-by: Volker Lendecke <vl@samba.org>
6 years agoselftest: Make lockdir available in test environment
Christof Schmitt [Thu, 16 Feb 2017 23:23:43 +0000 (16:23 -0700)]
selftest: Make lockdir available in test environment

Signed-off-by: Christof Schmitt <cs@samba.org>
Reviewed-by: Volker Lendecke <vl@samba.org>
6 years agodocs-xml: Document net tdb command
Christof Schmitt [Thu, 16 Feb 2017 23:23:34 +0000 (16:23 -0700)]
docs-xml: Document net tdb command

Signed-off-by: Christof Schmitt <cs@samba.org>
Reviewed-by: Volker Lendecke <vl@samba.org>
6 years agonet: Add net tdb command to print information from tdb records
Christof Schmitt [Thu, 16 Feb 2017 23:22:38 +0000 (16:22 -0700)]
net: Add net tdb command to print information from tdb records

The main purpose is to debug "hot" records from ctdb. ctdb tracks
contended records and identifies them by key in the dbstatistics:

DB Statistics: locking.tdb
[...]
 Num Hot Keys:     1
     Count:3 Key:6a4128e3ced4681b02a00000000000000000000000000000

This command allows querying additional information for the associated
key to identify the affected file. For now this only adds a subcommand
for the locking.tdb, but could be extended to others:

net tdb locking 6a4128e3ced4681b02a00000000000000000000000000000
Share path:            /test/share
Name:                  testfile
Number of share modes: 2

Signed-off-by: Christof Schmitt <cs@samba.org>
Reviewed-by: Volker Lendecke <vl@samba.org>
6 years agoctdb: Print key as hex string instead of just the hash in hot record message
Christof Schmitt [Thu, 16 Feb 2017 23:23:39 +0000 (16:23 -0700)]
ctdb: Print key as hex string instead of just the hash in hot record message

Signed-off-by: Christof Schmitt <cs@samba.org>
Reviewed-by: Volker Lendecke <vl@samba.org>
6 years agoidmap_rfc2307: Test unix-ids-to-sids with 35 groups
Volker Lendecke [Thu, 6 Apr 2017 10:50:08 +0000 (12:50 +0200)]
idmap_rfc2307: Test unix-ids-to-sids with 35 groups

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

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Christof Schmitt <cs@samba.org>
6 years agoselftest: Avoid idmap caching when testing idmap_rfc2307
Volker Lendecke [Tue, 4 Apr 2017 15:15:10 +0000 (17:15 +0200)]
selftest: Avoid idmap caching when testing idmap_rfc2307

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

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Christof Schmitt <cs@samba.org>
6 years agoidmap_rfc2307: "ldap_next_entry" needs the previous entry, not the start
Volker Lendecke [Fri, 31 Mar 2017 15:23:39 +0000 (15:23 +0000)]
idmap_rfc2307: "ldap_next_entry" needs the previous entry, not the start

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

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Christof Schmitt <cs@samba.org>
6 years agoidmap_rfc2307: Don't stop after 30 entries
Volker Lendecke [Fri, 31 Mar 2017 15:20:07 +0000 (15:20 +0000)]
idmap_rfc2307: Don't stop after 30 entries

We start over again and again, so we need to search in the whole list.
This is a quick hack generating a bad O(n^2). The real fix is to
call idmap_rfc2307_find_map with "maps" starting at the right offset,
but that's an optimization for later when it's restructured

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

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Christof Schmitt <cs@samba.org>
6 years agotest_idmap_rfc2307: Test wbinfo -r for 35 supplementary group memberships
Volker Lendecke [Tue, 4 Apr 2017 13:28:36 +0000 (15:28 +0200)]
test_idmap_rfc2307: Test wbinfo -r for 35 supplementary group memberships

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

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Christof Schmitt <cs@samba.org>
6 years agotest_idmap_rfc2307: Do a recursive delete in ou=idmap
Volker Lendecke [Tue, 4 Apr 2017 13:12:02 +0000 (15:12 +0200)]
test_idmap_rfc2307: Do a recursive delete in ou=idmap

We'll create more posix objects soon

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

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Christof Schmitt <cs@samba.org>
6 years agotest_idmap_rfc2307: Correct usage
Volker Lendecke [Tue, 4 Apr 2017 12:59:45 +0000 (14:59 +0200)]
test_idmap_rfc2307: Correct usage

We already have 13 args at this point, and growing

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

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Christof Schmitt <cs@samba.org>
6 years agotest_idmap_rfc2307: Avoid a tmpfile
Volker Lendecke [Tue, 4 Apr 2017 12:15:26 +0000 (14:15 +0200)]
test_idmap_rfc2307: Avoid a tmpfile

We can << directly into ldbadd

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

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Christof Schmitt <cs@samba.org>
6 years agotest_idmap_rfc2307: Remove the correct file
Volker Lendecke [Tue, 4 Apr 2017 12:15:26 +0000 (14:15 +0200)]
test_idmap_rfc2307: Remove the correct file

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

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Christof Schmitt <cs@samba.org>
6 years agoidmap_rfc2307: "ldap_next_entry" needs the previous entry, not the start
Volker Lendecke [Fri, 31 Mar 2017 15:23:39 +0000 (15:23 +0000)]
idmap_rfc2307: "ldap_next_entry" needs the previous entry, not the start

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

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Christof Schmitt <cs@samba.org>
6 years agoidmap_rfc2307: Don't stop after 30 entries
Volker Lendecke [Fri, 31 Mar 2017 15:20:07 +0000 (15:20 +0000)]
idmap_rfc2307: Don't stop after 30 entries

We start over again and again, so we need to search in the whole list.
This is a quick hack generating a bad O(n^2). The real fix is to
call idmap_rfc2307_find_map with "maps" starting at the right offset,
but that's an optimization for later when it's restructured

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

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Christof Schmitt <cs@samba.org>
6 years agoctdb-logging: Initialize DEBUGLEVEL before changing the value
Amitay Isaacs [Fri, 5 May 2017 16:08:50 +0000 (02:08 +1000)]
ctdb-logging: Initialize DEBUGLEVEL before changing the value

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

DEBUGLEVEL is defined as a const array reference at compile time.
debug_init() converts that to an allocated array reference at run time.
Since debug_init() is a static function, initialize DEBUGLEVEL via
setup_logging().

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 May  8 00:12:25 CEST 2017 on sn-devel-144

6 years agos3/dbwrap_ctdb: free resources in an error code path
Ralph Boehme [Fri, 5 May 2017 20:31:54 +0000 (22:31 +0200)]
s3/dbwrap_ctdb: free resources in an error code path

Signed-off-by: Ralph Boehme <slow@samba.org>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
Autobuild-User(master): Ralph Böhme <slow@samba.org>
Autobuild-Date(master): Sun May  7 16:40:19 CEST 2017 on sn-devel-144

6 years agos3/dbwrap_ctdb: set async_ctx to initialized
Ralph Boehme [Fri, 5 May 2017 20:30:32 +0000 (22:30 +0200)]
s3/dbwrap_ctdb: set async_ctx to initialized

After initializing the async connection to ctdb we must set initialized
to true.

Signed-off-by: Ralph Boehme <slow@samba.org>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
6 years agos3-rpcclient: Fix enumdata spoolss display of REG_DWORD
Günther Deschner [Wed, 3 May 2017 09:31:20 +0000 (11:31 +0200)]
s3-rpcclient: Fix enumdata spoolss display of REG_DWORD

One should not assume a REG_DWORD is always 4 byte long.

In an enumdata(ex) context, the first reply will return with content
in a buffer that can fill the largest entry in the array of attributes.
All subsequent queries then reuse this buffer even if the key/value
pair in question then is just a 4 byte DWORD. The remaining buffer
will be just empty and of no interest.

Signed-off-by: Guenther Deschner <gd@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
Autobuild-User(master): Jeremy Allison <jra@samba.org>
Autobuild-Date(master): Sun May  7 03:28:21 CEST 2017 on sn-devel-144

6 years agos3/smbd: update exclusive oplock optimisation to the lease area
Ralph Boehme [Thu, 4 May 2017 09:52:16 +0000 (11:52 +0200)]
s3/smbd: update exclusive oplock optimisation to the lease area

Update an optimisation in update_num_read_oplocks() that checks for
exclusive oplocks to the lease area.

The idea of the optimisation is to avoid expensive db queries in
brlock.tdb if we *know* we're the only open.

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

Signed-off-by: Ralph Boehme <slow@samba.org>
Signed-off-by: Jeremy Allison <jra@samba.org>
Autobuild-User(master): Ralph Böhme <slow@samba.org>
Autobuild-Date(master): Sat May  6 22:58:47 CEST 2017 on sn-devel-144

6 years agos3/smbd: update exclusive oplock optimisation to the lease area
Ralph Boehme [Thu, 20 Apr 2017 19:37:37 +0000 (21:37 +0200)]
s3/smbd: update exclusive oplock optimisation to the lease area

This is similar to 9533a55ee5ffe430589dcea845851b84876ef656 but this
time in the contend_level2_oplocks_begin_default() function.

The idea of the optimisation is to avoid expensive db queries in
locking.tdb if we *know* we're the only open.

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

Signed-off-by: Ralph Boehme <slow@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
6 years agos3/locking: helper functions for lease types
Ralph Boehme [Thu, 4 May 2017 09:50:56 +0000 (11:50 +0200)]
s3/locking: helper functions for lease types

Add some helper functions that will be used to update a bunch of checks
for exclusive oplocks to the lease area.

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

Signed-off-by: Ralph Boehme <slow@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
6 years agos3/locking: add const to fsp_lease_type
Ralph Boehme [Thu, 4 May 2017 09:50:01 +0000 (11:50 +0200)]
s3/locking: add const to fsp_lease_type

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

Signed-off-by: Ralph Boehme <slow@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
6 years agopidl: Fix Coverity warnings from duplicate NULL checks.
Jeremy Allison [Tue, 2 May 2017 15:10:40 +0000 (08:10 -0700)]
pidl: Fix Coverity warnings from duplicate NULL checks.

Pair-Programmed-With: Stefan Metzmacher <metze@samba.org>

Signed-off-by: Jeremy Allison <jra@samba.org>
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Autobuild-User(master): Andrew Bartlett <abartlet@samba.org>
Autobuild-Date(master): Sat May  6 16:03:17 CEST 2017 on sn-devel-144

6 years agoldb: Do not use mktemp() nor leak files into /tmp during api.py test
Andrew Bartlett [Tue, 25 Apr 2017 08:14:33 +0000 (20:14 +1200)]
ldb: Do not use mktemp() nor leak files into /tmp during api.py test

Signed-off-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Garming Sam <garming@catalyst.net.nz>
6 years agoldb: Add test for transaction deadlock detected when waiting for a search
Andrew Bartlett [Thu, 6 Apr 2017 23:38:11 +0000 (11:38 +1200)]
ldb: Add test for transaction deadlock detected when waiting for a search

This was the original intent of 7dd31288a701d772e45b1960ac4ce4cc1be782ed
but was broken in 251aaafe3a9213118ac3a92def9ab2104c40d12a and
hidden by 4bb2958f16cc6af43d113528407d53f0d78b0486.

Signed-off-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Garming Sam <garming@catalyst.net.nz>
6 years agoldb: Add some tests to clarify the current iterator behaviour
Andrew Bartlett [Thu, 6 Apr 2017 21:32:05 +0000 (09:32 +1200)]
ldb: Add some tests to clarify the current iterator behaviour

search_iterator() is no more memory efficient than search() because all the results
come back at the first res.next() call

Signed-off-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Garming Sam <garming@catalyst.net.nz>
6 years agotestprogs: Ignore escape characters when printing test name
Christof Schmitt [Thu, 4 May 2017 23:10:56 +0000 (01:10 +0200)]
testprogs: Ignore escape characters when printing test name

Long story: This was triggered by the addition of the test_trust_ntlm.sh
script in commits 3caca9b and 2de1994. test_trust_ntlm.sh creates a
variable CREDS="$REALM\\$USERNAME%$PASSWORD" that is then used as part
of the test name. subunit.sh uses echo to print the name that is then
picked up by subunithelper.py. test_trust_ntlm.sh also uses /bin/sh as
shell which can be a POSIX compliant shell like dash.

This combination broke 'make test' for any username starting with the
letter c. In this case CREDS contains the escape sequence \c that is
defined to stop producing further output at this point. dash implements
this feature and the echo in subunit.sh as a result skips the output
after \c, including skipping the newline. This means that the data
received by subunithelper.py contains the timestamp from the next line
in the test name, which then breaks the testcase tracking.

Fix this by replacing the echo in subunit.sh with a printf that does not
trigger the special handling of escape characters.

Signed-off-by: Christof Schmitt <cs@samba.org>
Reviewed-by: Volker Lendecke <vl@samba.org>
Autobuild-User(master): Volker Lendecke <vl@samba.org>
Autobuild-Date(master): Fri May  5 23:44:16 CEST 2017 on sn-devel-144

6 years agos4: torture: Remove the last talloc_autofree_context() from source4/torture/*.c
Jeremy Allison [Mon, 24 Apr 2017 23:40:37 +0000 (16:40 -0700)]
s4: torture: Remove the last talloc_autofree_context() from source4/torture/*.c

Allocate the saved packets off the NULL context instead, and
use a new function free_received_packets() to clear out the
received_packets list.

Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Ralph Böhme <slow@samba.org>
Autobuild-User(master): Jeremy Allison <jra@samba.org>
Autobuild-Date(master): Fri May  5 19:47:50 CEST 2017 on sn-devel-144

6 years agos4: torture: Remove talloc_autofree_context() from gentest.
Jeremy Allison [Mon, 24 Apr 2017 23:20:28 +0000 (16:20 -0700)]
s4: torture: Remove talloc_autofree_context() from gentest.

Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Ralph Böhme <slow@samba.org>
6 years agos4: torture: Remove talloc_autofree_context() from locktest.
Jeremy Allison [Mon, 24 Apr 2017 23:18:16 +0000 (16:18 -0700)]
s4: torture: Remove talloc_autofree_context() from locktest.

Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Ralph Böhme <slow@samba.org>
6 years agos4: torture: Use a named TALLOC_CTX in masktest instead of talloc_autofree_context().
Jeremy Allison [Mon, 24 Apr 2017 23:11:22 +0000 (16:11 -0700)]
s4: torture: Use a named TALLOC_CTX in masktest instead of talloc_autofree_context().

Move all talloc_free()'s back to main from the function call.

Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Ralph Böhme <slow@samba.org>
6 years agos4: torture: Add a TALLOC_CTX * to torture_smb2_getinfo_init().
Jeremy Allison [Mon, 24 Apr 2017 23:04:10 +0000 (16:04 -0700)]
s4: torture: Add a TALLOC_CTX * to torture_smb2_getinfo_init().

Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Ralph Böhme <slow@samba.org>
6 years agos4: torture: Add a TALLOC_CTX * to torture_test_delete().
Jeremy Allison [Mon, 24 Apr 2017 23:02:46 +0000 (16:02 -0700)]
s4: torture: Add a TALLOC_CTX * to torture_test_delete().

Reviewed-by: Ralph Böhme <slow@samba.org>
Signed-off-by: Jeremy Allison <jra@samba.org>
6 years agos4: torture: Add a TALLOC_CTX * to torture_winbind_struct_init().
Jeremy Allison [Mon, 24 Apr 2017 22:50:37 +0000 (15:50 -0700)]
s4: torture: Add a TALLOC_CTX * to torture_winbind_struct_init().

Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Ralph Böhme <slow@samba.org>
6 years agos4: torture: Add a TALLOC_CTX * to torture_vfs_fruit(), torture_vfs_fruit_netatalk...
Jeremy Allison [Mon, 24 Apr 2017 22:48:42 +0000 (15:48 -0700)]
s4: torture: Add a TALLOC_CTX * to torture_vfs_fruit(), torture_vfs_fruit_netatalk(), torture_vfs_fruit_file_id()

Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Ralph Böhme <slow@samba.org>
6 years agos4: torture: Add a TALLOC_CTX * to torture_acl_xattr().
Jeremy Allison [Mon, 24 Apr 2017 22:46:47 +0000 (15:46 -0700)]
s4: torture: Add a TALLOC_CTX * to torture_acl_xattr().

Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Ralph Böhme <slow@samba.org>
6 years agos4: torture: Add a TALLOC_CTX * to torture_smb2_streams_init().
Jeremy Allison [Mon, 24 Apr 2017 22:45:02 +0000 (15:45 -0700)]
s4: torture: Add a TALLOC_CTX * to torture_smb2_streams_init().

Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Ralph Böhme <slow@samba.org>
6 years agos4: torture: Add a TALLOC_CTX * to torture_smb2_session_init().
Jeremy Allison [Mon, 24 Apr 2017 22:43:27 +0000 (15:43 -0700)]
s4: torture: Add a TALLOC_CTX * to torture_smb2_session_init().

Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Ralph Böhme <slow@samba.org>
6 years agos4: torture: Add a TALLOC_CTX * to torture_smb2_scan_init().
Jeremy Allison [Mon, 24 Apr 2017 22:42:20 +0000 (15:42 -0700)]
s4: torture: Add a TALLOC_CTX * to torture_smb2_scan_init().

Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Ralph Böhme <slow@samba.org>
6 years agos4: torture: Add a TALLOC_CTX * to torture_smb2_replay_init().
Jeremy Allison [Mon, 24 Apr 2017 22:41:18 +0000 (15:41 -0700)]
s4: torture: Add a TALLOC_CTX * to torture_smb2_replay_init().

Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Ralph Böhme <slow@samba.org>
6 years agos4: torture: Add a TALLOC_CTX * to torture_smb2_rename_init().
Jeremy Allison [Mon, 24 Apr 2017 22:40:16 +0000 (15:40 -0700)]
s4: torture: Add a TALLOC_CTX * to torture_smb2_rename_init().

Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Ralph Böhme <slow@samba.org>
6 years agos4: torture: Add a TALLOC_CTX * to torture_smb2_read_init().
Jeremy Allison [Mon, 24 Apr 2017 22:38:38 +0000 (15:38 -0700)]
s4: torture: Add a TALLOC_CTX * to torture_smb2_read_init().

Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Ralph Böhme <slow@samba.org>
6 years agos4: torture: Add a TALLOC_CTX * to torture_smb2_oplocks_init(), torture_smb2_kernel_o...
Jeremy Allison [Mon, 24 Apr 2017 22:37:12 +0000 (15:37 -0700)]
s4: torture: Add a TALLOC_CTX * to torture_smb2_oplocks_init(), torture_smb2_kernel_oplocks_init().

Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Ralph Böhme <slow@samba.org>
6 years agos4: torture: Add a TALLOC_CTX * to torture_smb2_notify_disabled_init().
Jeremy Allison [Mon, 24 Apr 2017 22:35:18 +0000 (15:35 -0700)]
s4: torture: Add a TALLOC_CTX * to torture_smb2_notify_disabled_init().

Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Ralph Böhme <slow@samba.org>
6 years agos4: torture: Add a TALLOC_CTX * to torture_smb2_notify_init().
Jeremy Allison [Mon, 24 Apr 2017 22:33:53 +0000 (15:33 -0700)]
s4: torture: Add a TALLOC_CTX * to torture_smb2_notify_init().

Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Ralph Böhme <slow@samba.org>
6 years agos4: torture: Add a TALLOC_CTX * to torture_smb2_lock_init().
Jeremy Allison [Mon, 24 Apr 2017 22:32:26 +0000 (15:32 -0700)]
s4: torture: Add a TALLOC_CTX * to torture_smb2_lock_init().

Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Ralph Böhme <slow@samba.org>
6 years agos4: torture: Add a TALLOC_CTX * to torture_smb2_lease_init().
Jeremy Allison [Mon, 24 Apr 2017 22:31:25 +0000 (15:31 -0700)]
s4: torture: Add a TALLOC_CTX * to torture_smb2_lease_init().

Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Ralph Böhme <slow@samba.org>
6 years agos4: tortute: Add a TALLOC_CTX * to torture_smb2_ioctl_init().
Jeremy Allison [Mon, 24 Apr 2017 22:30:14 +0000 (15:30 -0700)]
s4: tortute: Add a TALLOC_CTX * to torture_smb2_ioctl_init().

Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Ralph Böhme <slow@samba.org>
6 years agos4: torture: Add TALLOC_CTX * to torture_smb2_durable_v2_open_init().
Jeremy Allison [Mon, 24 Apr 2017 22:27:01 +0000 (15:27 -0700)]
s4: torture: Add TALLOC_CTX * to torture_smb2_durable_v2_open_init().

Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Ralph Böhme <slow@samba.org>
6 years agos4: torture: Add TALLOC_CTX * to torture_smb2_durable_open_disconnect_init(), torture...
Jeremy Allison [Mon, 24 Apr 2017 22:25:38 +0000 (15:25 -0700)]
s4: torture: Add TALLOC_CTX * to torture_smb2_durable_open_disconnect_init(), torture_smb2_durable_open_init()

Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Ralph Böhme <slow@samba.org>
6 years agos4: torture: Add a TALLOC_CTX * to torture_smb2_dir_init().
Jeremy Allison [Mon, 24 Apr 2017 22:22:37 +0000 (15:22 -0700)]
s4: torture: Add a TALLOC_CTX * to torture_smb2_dir_init().

Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Ralph Böhme <slow@samba.org>
6 years agos4: torture: Add a TALLOC_CTX * to torture_smb2_doc_init().
Jeremy Allison [Mon, 24 Apr 2017 22:20:58 +0000 (15:20 -0700)]
s4: torture: Add a TALLOC_CTX * to torture_smb2_doc_init().

Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Ralph Böhme <slow@samba.org>
6 years agos4: torture: Add a TALLOC_CTX * to torture_smb2_crediting_init().
Jeremy Allison [Mon, 24 Apr 2017 22:19:12 +0000 (15:19 -0700)]
s4: torture: Add a TALLOC_CTX * to torture_smb2_crediting_init().

Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Ralph Böhme <slow@samba.org>
6 years agos4: torture: Add a TALLOC_CTX * to torture_smb2_create_init().
Jeremy Allison [Mon, 24 Apr 2017 22:17:45 +0000 (15:17 -0700)]
s4: torture: Add a TALLOC_CTX * to torture_smb2_create_init().

Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Ralph Böhme <slow@samba.org>
6 years agos4: torture: Add TALLOC_CTX * to torture_smb2_compound_find_init() and torture_smb2_c...
Jeremy Allison [Mon, 24 Apr 2017 22:13:10 +0000 (15:13 -0700)]
s4: torture: Add TALLOC_CTX * to torture_smb2_compound_find_init() and torture_smb2_compound_init().

Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Ralph Böhme <slow@samba.org>
6 years agos4: torture: Add TALLOC_CTX * to torture_smb2_acls_init().
Jeremy Allison [Mon, 24 Apr 2017 22:11:19 +0000 (15:11 -0700)]
s4: torture: Add TALLOC_CTX * to torture_smb2_acls_init().

Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Ralph Böhme <slow@samba.org>
6 years agos4: torture: Add TALLOC_CTX * to torture_winbind_init().
Jeremy Allison [Mon, 24 Apr 2017 22:09:36 +0000 (15:09 -0700)]
s4: torture: Add TALLOC_CTX * to torture_winbind_init().

Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Ralph Böhme <slow@samba.org>
6 years agos4: torture: Pass TALLOC_CTX * to torture_delay_write().
Jeremy Allison [Mon, 24 Apr 2017 22:07:49 +0000 (15:07 -0700)]
s4: torture: Pass TALLOC_CTX * to torture_delay_write().

Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Ralph Böhme <slow@samba.org>
6 years agos4: torture: Change torture_register_suite() to add a TALLOC_CTX *.
Jeremy Allison [Mon, 24 Apr 2017 21:41:26 +0000 (14:41 -0700)]
s4: torture: Change torture_register_suite() to add a TALLOC_CTX *.

Change callers to use the passed in TALLOC_CTX *
instead of talloc_autofree_context().

Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Ralph Böhme <slow@samba.org>
6 years agos4: torture: Pass the new talloc context into torture_init().
Jeremy Allison [Mon, 24 Apr 2017 21:27:36 +0000 (14:27 -0700)]
s4: torture: Pass the new talloc context into torture_init().

Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Ralph Böhme <slow@samba.org>
6 years agos4: torture: Add a TALLOC_CTX * to torture_parse_target().
Jeremy Allison [Mon, 24 Apr 2017 23:00:17 +0000 (16:00 -0700)]
s4: torture: Add a TALLOC_CTX * to torture_parse_target().

Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Ralph Böhme <slow@samba.org>
6 years agos4: torture: Create a top level talloc contxt.
Jeremy Allison [Mon, 24 Apr 2017 21:24:15 +0000 (14:24 -0700)]
s4: torture: Create a top level talloc contxt.

Use it to replace some talloc_autofree_contexts.

Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Ralph Böhme <slow@samba.org>
6 years agosamba-tool: Rename Samba4 to Samba AD
Andreas Schneider [Fri, 5 May 2017 09:21:03 +0000 (11:21 +0200)]
samba-tool: Rename Samba4 to Samba AD

We should stop talking about Samba4 and use the terms Samba AD and
Samba FS.

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Guenther Deschner <gd@samba.org>
Autobuild-User(master): Andreas Schneider <asn@cryptomilk.org>
Autobuild-Date(master): Fri May  5 15:51:54 CEST 2017 on sn-devel-144

6 years agosmbtorture:spoolss: Add a 32bit test for copy_from_directory
Andreas Schneider [Fri, 5 May 2017 09:12:02 +0000 (11:12 +0200)]
smbtorture:spoolss: Add a 32bit test for copy_from_directory

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

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Guenther Deschner <gd@samba.org>
6 years agosmbtorture:spoolss: Rename the copy_from_directory test for 64bit
Andreas Schneider [Fri, 5 May 2017 09:11:25 +0000 (11:11 +0200)]
smbtorture:spoolss: Rename the copy_from_directory test for 64bit

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

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Guenther Deschner <gd@samba.org>
6 years agos3:printing: Change to GUID dir if we deal with COPY_FROM_DIRECTORY
Andreas Schneider [Thu, 4 May 2017 15:48:42 +0000 (17:48 +0200)]
s3:printing: Change to GUID dir if we deal with COPY_FROM_DIRECTORY

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

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Guenther Deschner <gd@samba.org>
6 years agovfs_fruit: Fix the 32-bit build
Volker Lendecke [Sat, 29 Apr 2017 10:01:41 +0000 (12:01 +0200)]
vfs_fruit: Fix the 32-bit build

On debian 32-bit, size_t is an 32 bit, but off_t is 64 bit.

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 May  5 11:50:55 CEST 2017 on sn-devel-144

6 years agopam_wrapper: Add PAM_STRERROR_CONST configure check
Volker Lendecke [Mon, 1 May 2017 15:56:50 +0000 (17:56 +0200)]
pam_wrapper: Add PAM_STRERROR_CONST configure check

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
6 years agosamba-tool: fix log message of 'samba-tool user syncpasswords'
Stefan Metzmacher [Tue, 25 Apr 2017 11:25:10 +0000 (13:25 +0200)]
samba-tool: fix log message of 'samba-tool user syncpasswords'

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

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): Fri May  5 01:37:45 CEST 2017 on sn-devel-144

6 years agosamba-tool: let 'samba-tool user syncpasswords' report deletions immediately
Stefan Metzmacher [Tue, 25 Apr 2017 11:25:57 +0000 (13:25 +0200)]
samba-tool: let 'samba-tool user syncpasswords' report deletions immediately

We need to use the show-recycled control in addition to the
notification control in order to get notifications about deletions.

There's no real problem as the next modification will report the deletion.
But it might be delayed a few minutes.

Note that show-recycled is a superset of show-deleted, so we only need one.

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

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
6 years agos3:smbcacls add prompt for password
Christian Ambach [Thu, 4 May 2017 10:21:45 +0000 (12:21 +0200)]
s3:smbcacls add prompt for password

if no password was given, ask for one

BUG: https://bugzilla.samba.org/show_bug.cgi?id=12765
Signed-off-by: Christian Ambach <ambi@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
Autobuild-User(master): Christian Ambach <ambi@samba.org>
Autobuild-Date(master): Thu May  4 20:36:50 CEST 2017 on sn-devel-144

6 years agolib: Fix a comment
Volker Lendecke [Sun, 23 Apr 2017 16:47:25 +0000 (18:47 +0200)]
lib: Fix a comment

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): Wed May  3 20:00:25 CEST 2017 on sn-devel-144