sfrench/samba-autobuild/.git
7 years agodocs: document vfs_acl_xattr|tdb enforced settings
Ralph Boehme [Fri, 26 Aug 2016 08:22:37 +0000 (10:22 +0200)]
docs: document vfs_acl_xattr|tdb enforced settings

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

Signed-off-by: Ralph Boehme <slow@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
7 years agoldb: Avoid multiple tiny allocations during full DB scan
Andrew Bartlett [Mon, 22 Aug 2016 23:38:26 +0000 (11:38 +1200)]
ldb: Avoid multiple tiny allocations during full DB scan

LDB_UNPACK_DATA_FLAG_NO_VALUES_ALLOC allows us to consolidate some of these allocations

Signed-off-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
Autobuild-User(master): Douglas Bagnall <dbagnall@samba.org>
Autobuild-Date(master): Wed Aug 31 10:53:09 CEST 2016 on sn-devel-144

7 years agoldb: Avoid cost of talloc_free() for unmatched messages
Andrew Bartlett [Thu, 25 Aug 2016 21:58:38 +0000 (09:58 +1200)]
ldb: Avoid cost of talloc_free() for unmatched messages

Instead, we pay the cost of allocating a copy of the whole message once
and we pay the cost of allocating a "struct ldb_val" that will not be used
for each element in that message.

This differes from the approach of ldb_unpack_data_only_attr_list()
in that we need not allocate each value for a message that we do not
return, so is more efficient for large multi-valued attributes and
un-indexed or poorly indexed searches

Signed-off-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
7 years agodocs: Explain that "reset on zero vc" is an SMB1 feature
Andrew Bartlett [Tue, 16 Aug 2016 00:21:59 +0000 (12:21 +1200)]
docs: Explain that "reset on zero vc" is an SMB1 feature

Signed-off-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
7 years agoautobuild: disable abi check on O3 build
Douglas Bagnall [Fri, 26 Aug 2016 00:07:34 +0000 (12:07 +1200)]
autobuild: disable abi check on O3 build

Signed-off-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
Reviewed-by: Garming Sam <garming@catalyst.net.nz>
7 years agoselftest/wscript: format perftest as json
Douglas Bagnall [Thu, 4 Aug 2016 03:35:46 +0000 (15:35 +1200)]
selftest/wscript: format perftest as json

This makes it easier to use with common web-based graphing systems.

Signed-off-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
Reviewed-by: Garming Sam <garming@catalyst.net.nz>
7 years agoselftest: add an option to specify the test list
Douglas Bagnall [Wed, 31 Aug 2016 02:56:25 +0000 (14:56 +1200)]
selftest: add an option to specify the test list

This can be used to override the default test lists used by
`make test` and `make perftest`. This tests can either be
programmatically generated (as is done for the defaults -- see
selftest/tests.py for an example), or from a static list. For the
generated lists, append a pipe symbol:

    make test TEST_LIST='/bin/sh /tmp/tests.sh|'

and omit the pipe for a static list:

    make test TEST_LIST='/tmp/tests.txt'

There are likely other useful modes of operation -- see `perldoc open`
for the wondrous details.

Signed-off-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
Reviewed-by: Garming Sam <garming@catalyst.net.nz>
7 years agomake perftest: for performance testing
Douglas Bagnall [Tue, 16 Aug 2016 22:56:50 +0000 (10:56 +1200)]
make perftest: for performance testing

This runs a selection of subunit tests and reduces the output to only
the time it takes to run each test.

The tests are listed in selftest/perf_tests.py.

Signed-off-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
Reviewed-by: Garming Sam <garming@catalyst.net.nz>
7 years agoAdd AD DC performance tests
Douglas Bagnall [Tue, 16 Aug 2016 22:56:39 +0000 (10:56 +1200)]
Add AD DC performance tests

These test a variety of simple AD DC operations.

These tests are NOT independent of each other and must be run in the
right order (alphabetically, which is guaranteed by Python's unittest
module) -- the running of each test is part of the set-up for later
modules. This means we have to subvert unittest a bit, but it saves
hours of repeated set-up.

These tests are not intended to push edge cases, but to hammer common
operations that should work on all versions of Samba. The tests have
been tested back to Samba 4.0.26.

Signed-off-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
Reviewed-by: Garming Sam <garming@catalyst.net.nz>
7 years agofilter-subunit: default to empty affixes, saving verbose checks
Douglas Bagnall [Mon, 1 Aug 2016 23:00:27 +0000 (11:00 +1200)]
filter-subunit: default to empty affixes, saving verbose checks

Signed-off-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
Reviewed-by: Garming Sam <garming@catalyst.net.nz>
7 years agosubunithelper: use set for efficient inclusion test
Douglas Bagnall [Mon, 1 Aug 2016 22:27:05 +0000 (10:27 +1200)]
subunithelper: use set for efficient inclusion test

Signed-off-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
Reviewed-by: Garming Sam <garming@catalyst.net.nz>
7 years agoselftest: allow tests.py scripts to run independently
Douglas Bagnall [Thu, 28 Jul 2016 22:57:52 +0000 (10:57 +1200)]
selftest: allow tests.py scripts to run independently

These generate lists of test commands. Usually they are run in special
environments, but they should work from the command line. This
restores the intended behaviour.

Signed-off-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
Reviewed-by: Garming Sam <garming@catalyst.net.nz>
7 years agoblackbox tests: add timestamps for subunit tests
Douglas Bagnall [Wed, 3 Aug 2016 04:03:57 +0000 (16:03 +1200)]
blackbox tests: add timestamps for subunit tests

There is the icky thing with sed because some kinds of `date` don't
have sub-second resolution, which we really want.

Another way to do it would be:

   python -c "import datetime; print datetime.datetime.utcnow().strftime('time: %Y-%m-%d %H:%M:%S.%fZ')"

which should be universal, but is a little slower.

Signed-off-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Garming Sam <garming@catalyst.net.nz>
7 years agoautobuild --restrict-tests to test a restricted set
Douglas Bagnall [Wed, 27 Jul 2016 02:28:04 +0000 (14:28 +1200)]
autobuild --restrict-tests to test a restricted set

This allows autobuild to be used as a test framework for running
particular Samba tests in a cloud environment.

Signed-off-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
Reviewed-by: Garming Sam <garming@catalyst.net.nz>
7 years agoautobuild: remove unused argument
Douglas Bagnall [Wed, 27 Jul 2016 02:09:08 +0000 (14:09 +1200)]
autobuild: remove unused argument

The "tasklist" parameter is the same as the global "tasks" variable,
but only the latter is used.

Signed-off-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
Reviewed-by: Garming Sam <garming@catalyst.net.nz>
7 years agos3: modules: vfs_acl_common - Add Ralph's copyright.
Jeremy Allison [Tue, 30 Aug 2016 19:01:00 +0000 (12:01 -0700)]
s3: modules: vfs_acl_common - Add Ralph's copyright.

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): Wed Aug 31 01:06:43 CEST 2016 on sn-devel-144

7 years agovfs_acl_common: use DBG_LEVEL and remove function prefixes in DEBUG statements
Ralph Boehme [Sat, 27 Aug 2016 08:11:14 +0000 (10:11 +0200)]
vfs_acl_common: use DBG_LEVEL and remove function prefixes in DEBUG statements

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

Signed-off-by: Ralph Boehme <slow@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
7 years agos4/torture: tests for vfs_acl_xattr default ACL styles
Ralph Boehme [Thu, 25 Aug 2016 14:30:24 +0000 (16:30 +0200)]
s4/torture: tests for vfs_acl_xattr default ACL styles

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

Signed-off-by: Ralph Boehme <slow@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
7 years agovfs_acl_common: Windows style default ACL
Ralph Boehme [Thu, 25 Aug 2016 05:45:34 +0000 (07:45 +0200)]
vfs_acl_common: Windows style default ACL

Reintroduce Windows style default ACL, but this time as an optional
feature, not changing default behaviour.

Original bugreport that got reverted because it changed the default
behaviour: https://bugzilla.samba.org/show_bug.cgi?id=12028

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

Signed-off-by: Ralph Boehme <slow@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
7 years agovfs_acl_xattr|tdb: add option to control default ACL style
Ralph Boehme [Wed, 24 Aug 2016 18:31:00 +0000 (20:31 +0200)]
vfs_acl_xattr|tdb: add option to control default ACL style

Existing behaviour is "posix" style. Next commit will (re)add the
"windows" style. This commit doesn't change behaviour in any way.

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

Signed-off-by: Ralph Boehme <slow@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
7 years agovfs_acl_common: check for ignore_system_acls before fetching filesystem ACL
Ralph Boehme [Wed, 24 Aug 2016 08:43:47 +0000 (10:43 +0200)]
vfs_acl_common: check for ignore_system_acls before fetching filesystem ACL

If ignore_system_acls is set and we're synthesizing a default ACL, we
were fetching the filesystem ACL just to free it again. This change
avoids this.

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

Signed-off-by: Ralph Boehme <slow@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
7 years agovfs_acl_common: move stat stuff to a helper function
Ralph Boehme [Wed, 24 Aug 2016 08:30:15 +0000 (10:30 +0200)]
vfs_acl_common: move stat stuff to a helper function

Will be reused in the next commit when moving the
make_default_filesystem_acl() stuff to a different place.

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

Signed-off-by: Ralph Boehme <slow@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
7 years agovfs_acl_tdb|xattr: use a config handle
Ralph Boehme [Wed, 24 Aug 2016 08:01:17 +0000 (10:01 +0200)]
vfs_acl_tdb|xattr: use a config handle

Better for performance and a subsequent commit will add one more option
where this will pay off.

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

Signed-off-by: Ralph Boehme <slow@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
7 years agovfs_acl_common: move the ACL blob validation to a helper function
Ralph Boehme [Tue, 23 Aug 2016 20:32:57 +0000 (22:32 +0200)]
vfs_acl_common: move the ACL blob validation to a helper function

No change in behaviour.

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

Signed-off-by: Ralph Boehme <slow@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
7 years agovfs_acl_common: simplify ACL logic, cleanup and talloc hierarchy
Ralph Boehme [Tue, 23 Aug 2016 15:07:20 +0000 (17:07 +0200)]
vfs_acl_common: simplify ACL logic, cleanup and talloc hierarchy

No change in behaviour (hopefully! :-). This paves the way for moving
the ACL blob validation to a helper function in the next commit.

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

Signed-off-by: Ralph Boehme <slow@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
7 years agovfs_acl_common: remove redundant NULL assignment
Ralph Boehme [Tue, 23 Aug 2016 11:14:50 +0000 (13:14 +0200)]
vfs_acl_common: remove redundant NULL assignment

The variables are already set to NULL by TALLOC_FREE.

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

Signed-off-by: Ralph Boehme <slow@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
7 years agovfs_acl_common: rename pdesc_next to psd_fs
Ralph Boehme [Tue, 23 Aug 2016 11:11:24 +0000 (13:11 +0200)]
vfs_acl_common: rename pdesc_next to psd_fs

In most realistic cases the "next" VFS op will return the permissions
from the filesystem. This rename makes it explicit where the SD is
originating from. No change in behaviour.

This just paves the way for a later change that will simplify the whole
logic and talloc hierarchy.

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

Signed-off-by: Ralph Boehme <slow@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
7 years agovfs_acl_common: rename psd to psd_blob in get_nt_acl_internal()
Ralph Boehme [Tue, 23 Aug 2016 11:08:12 +0000 (13:08 +0200)]
vfs_acl_common: rename psd to psd_blob in get_nt_acl_internal()

This makes it explicit where the SD is originating from. No change in
behaviour.

This just paves the way for a later change that will simplify the whole
logic and talloc hierarchy, therefor this also strictly renames the
occurences after the out label.

Logically, behind the out label, we're dealing with a variable that
points to what we're going to return, so the name psd_blob is
misleading, but I'm desperately trying to avoid logic changes in this
commit and therefor I'm just strictly renaming.

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

Signed-off-by: Ralph Boehme <slow@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
7 years agoRevert "vfs_acl_xattr: objects without NT ACL xattr"
Ralph Boehme [Wed, 24 Aug 2016 08:04:24 +0000 (10:04 +0200)]
Revert "vfs_acl_xattr: objects without NT ACL xattr"

This reverts commit 961c4b591bb102751079d9cc92d7aa1c37f1958c.

Subsequent commits will add the same functionality as an optional
feature.

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

Signed-off-by: Ralph Boehme <slow@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
7 years agogensec_krb5: Use get_krb5_smb_session_key() in gensec_krb5_session_key()
Andreas Schneider [Thu, 11 Aug 2016 13:18:14 +0000 (15:18 +0200)]
gensec_krb5: Use get_krb5_smb_session_key() in gensec_krb5_session_key()

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Autobuild-User(master): Andrew Bartlett <abartlet@samba.org>
Autobuild-Date(master): Tue Aug 30 15:24:02 CEST 2016 on sn-devel-144

7 years agogensec_krb5: Use implementation idependent krb5_mk_req_extended()
Andreas Schneider [Thu, 11 Aug 2016 13:04:42 +0000 (15:04 +0200)]
gensec_krb5: Use implementation idependent krb5_mk_req_extended()

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
7 years agogensec_krb5: Use kerberos_free_data_contents() to free krb5 data
Andreas Schneider [Thu, 11 Aug 2016 13:10:33 +0000 (15:10 +0200)]
gensec_krb5: Use kerberos_free_data_contents() to free krb5 data

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
7 years agogensec_krb5: Only set the event context with Heimdal
Andreas Schneider [Thu, 11 Aug 2016 09:22:41 +0000 (11:22 +0200)]
gensec_krb5: Only set the event context with Heimdal

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
7 years agogensec_krb5: Use krb5_wrap setup_kaddr() to convert address
Andreas Schneider [Thu, 11 Aug 2016 09:20:42 +0000 (11:20 +0200)]
gensec_krb5: Use krb5_wrap setup_kaddr() to convert address

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
7 years agogensec_krb5: Rename smb_rd_req_return_stuff()
Andreas Schneider [Fri, 12 Aug 2016 12:41:05 +0000 (14:41 +0200)]
gensec_krb5: Rename smb_rd_req_return_stuff()

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
7 years agogensec_krb5: Rename gensec_krb5_util to gensec_krb5_heimdal
Andreas Schneider [Fri, 12 Aug 2016 12:37:51 +0000 (14:37 +0200)]
gensec_krb5: Rename gensec_krb5_util to gensec_krb5_heimdal

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
7 years agos4-kdc: pac-glue: Add support for MIT pkinit
Andreas Schneider [Wed, 10 Aug 2016 13:57:05 +0000 (15:57 +0200)]
s4-kdc: pac-glue: Add support for MIT pkinit

This only makes sure the code compiles again. I'm not able to test this
yet.

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
7 years agomit_samba: Add missing copyright
Andreas Schneider [Thu, 9 Jun 2016 14:02:23 +0000 (16:02 +0200)]
mit_samba: Add missing copyright

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
7 years agomit_samba: Add missing argument passed to authsam_make_user_info_dc()
Andreas Schneider [Thu, 30 Jun 2016 14:25:41 +0000 (16:25 +0200)]
mit_samba: Add missing argument passed to authsam_make_user_info_dc()

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
7 years agotests/samba-tool/user.py: replace deprecated 'add' subcommand with 'create'
Rowland Penny [Sun, 28 Aug 2016 08:29:33 +0000 (09:29 +0100)]
tests/samba-tool/user.py: replace deprecated 'add' subcommand with 'create'

Signed-off-by: Rowland Penny <rpenny@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
Autobuild-User(master): Jeremy Allison <jra@samba.org>
Autobuild-Date(master): Tue Aug 30 09:21:09 CEST 2016 on sn-devel-144

7 years agos3/rpc_server: shared rpc modules directory may not exist
Ralph Boehme [Sat, 27 Aug 2016 15:56:56 +0000 (17:56 +0200)]
s3/rpc_server: shared rpc modules directory may not exist

A shared rpc modules directory may not exist if all RPC modules are built
static.

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

Signed-off-by: Ralph Boehme <slow@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
7 years agopthreadpool: Signal job completion without the pool mutex
Volker Lendecke [Mon, 29 Aug 2016 09:35:39 +0000 (11:35 +0200)]
pthreadpool: Signal job completion without the pool mutex

This essentially reverts 1c4284c7395f23. We now call an alien function from
within pthreadpool, and we should not hold a mutex during that call. The alien
function could (and pthreadpool_tevent_job_signal actually does) lock a mutex.
We can't guarantee proper lock ordering here, so in theory we could deadlock. I
haven't seen it in the wild yet, but I could imagine that both _parent pieces
in pthreadpool and tevent could trigger such a deadlock.

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): Tue Aug 30 04:06:20 CEST 2016 on sn-devel-144

7 years agopthreadpool: We always want asserts to abort()
Volker Lendecke [Mon, 29 Aug 2016 09:35:20 +0000 (11:35 +0200)]
pthreadpool: We always want asserts to abort()

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
7 years agopthreadpool: Fix formatting
Volker Lendecke [Fri, 26 Aug 2016 09:34:02 +0000 (11:34 +0200)]
pthreadpool: Fix formatting

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
7 years agolib: Use tdb_storev in gencache
Volker Lendecke [Fri, 12 Aug 2016 18:57:26 +0000 (20:57 +0200)]
lib: Use tdb_storev in gencache

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
Autobuild-User(master): Ralph Böhme <slow@samba.org>
Autobuild-Date(master): Mon Aug 29 22:51:34 CEST 2016 on sn-devel-144

7 years agodbwrap: Use tdb_storev in dbwrap_ctdb
Volker Lendecke [Wed, 10 Aug 2016 19:12:06 +0000 (21:12 +0200)]
dbwrap: Use tdb_storev in dbwrap_ctdb

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
7 years agotdb: Use tdb_storev in tdb_append tdb-1.3.11
Volker Lendecke [Wed, 10 Aug 2016 18:57:42 +0000 (20:57 +0200)]
tdb: Use tdb_storev in tdb_append

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
7 years agotdb: Add tdb_storev
Volker Lendecke [Wed, 10 Aug 2016 18:46:07 +0000 (20:46 +0200)]
tdb: Add tdb_storev

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
7 years agotdb: Add tdb_trace_1plusn_rec_flag_ret
Volker Lendecke [Wed, 10 Aug 2016 18:45:10 +0000 (20:45 +0200)]
tdb: Add tdb_trace_1plusn_rec_flag_ret

Needed for tdb_storev

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
7 years agotdb: Vectorize _tdb_store
Volker Lendecke [Wed, 10 Aug 2016 12:11:03 +0000 (14:11 +0200)]
tdb: Vectorize _tdb_store

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
7 years agotdb: Vectorize tdb_update_hash
Volker Lendecke [Wed, 10 Aug 2016 11:47:49 +0000 (13:47 +0200)]
tdb: Vectorize tdb_update_hash

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
7 years agotdb: Allow _v variant in tdb_update_hash_cmp
Volker Lendecke [Wed, 10 Aug 2016 10:37:13 +0000 (12:37 +0200)]
tdb: Allow _v variant in tdb_update_hash_cmp

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
7 years agotdb: Remove unnecessary checks
Volker Lendecke [Wed, 10 Aug 2016 09:31:44 +0000 (11:31 +0200)]
tdb: Remove unnecessary checks

This has already been done in tdb_find()

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
7 years agotdb: Do an overflow check
Volker Lendecke [Wed, 10 Aug 2016 08:49:04 +0000 (10:49 +0200)]
tdb: Do an overflow check

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
7 years agotdb: Fix a signed/unsigned hickup
Volker Lendecke [Wed, 10 Aug 2016 08:16:05 +0000 (10:16 +0200)]
tdb: Fix a signed/unsigned hickup

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
7 years agodbwrap_watch: Add dsize to DEBUG, avoid casts
Volker Lendecke [Mon, 25 Jul 2016 10:59:46 +0000 (12:59 +0200)]
dbwrap_watch: Add dsize to DEBUG, avoid casts

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
7 years agodbcheck: Abandon dbcheck if we get an error during a transaction
Andrew Bartlett [Fri, 26 Aug 2016 03:53:19 +0000 (15:53 +1200)]
dbcheck: Abandon dbcheck if we get an error during a transaction

Otherwise, anything that the transaction has already done to the DB will be left in the DB
even despite the failure.  For example, if a fix wrote to the DB, but then failed a post-write
check, then the fix will not be unrolled.

This is because we do not have nested transactions in TDB.

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

Signed-off-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
Autobuild-User(master): Stefan Metzmacher <metze@samba.org>
Autobuild-Date(master): Mon Aug 29 12:46:21 CEST 2016 on sn-devel-144

7 years agodsdb: Allow missing a mandatory attribute from a dbcheck fix
Andrew Bartlett [Fri, 26 Aug 2016 03:54:35 +0000 (15:54 +1200)]
dsdb: Allow missing a mandatory attribute from a dbcheck fix

dbcheck of the rid pool (CN=RID Set) for another server will otherwise fail because
rIDNextRid is not replicated, and so it not present

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

Signed-off-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
7 years agosamba_upgradedns: Check for both accounts in BIND_DLZ upgrade
Garming Sam [Tue, 26 Jul 2016 09:13:56 +0000 (11:13 +0200)]
samba_upgradedns: Check for both accounts in BIND_DLZ upgrade

Signed-off-by: Garming Sam <garming@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
BUG: https://bugzilla.samba.org/show_bug.cgi?id=10882

Autobuild-User(master): Garming Sam <garming@samba.org>
Autobuild-Date(master): Mon Aug 29 08:53:14 CEST 2016 on sn-devel-144

7 years agoRemoved upgrading-samba4.txt
Marc Muehlfeld [Fri, 26 Aug 2016 11:42:15 +0000 (13:42 +0200)]
Removed upgrading-samba4.txt

This file was about updating early Samba AD alpha versions.

We describe all important things related to the update process in the Wiki:
https://wiki.samba.org/index.php/Updating_Samba

Signed-off-by: Marc Muehlfeld <mmuehlfeld@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
Autobuild-User(master): Stefan Metzmacher <metze@samba.org>
Autobuild-Date(master): Mon Aug 29 03:28:11 CEST 2016 on sn-devel-144

7 years agos3-util: Fix asking for username and password in smbget.
Andreas Schneider [Thu, 25 Aug 2016 12:24:08 +0000 (14:24 +0200)]
s3-util: Fix asking for username and password in smbget.

If the user specified the username in the URI with with:

  smb://DOMAIN;user:secret@server/share

the tool should not prompt for the username nor the password.

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

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 Aug 26 04:22:27 CEST 2016 on sn-devel-144

7 years agotests/getnc_exop: Ensure that attribute list sorting is correct
Bob Campbell [Mon, 22 Aug 2016 02:43:41 +0000 (14:43 +1200)]
tests/getnc_exop: Ensure that attribute list sorting is correct

With a binary search, this can only be tested on 3+ elements.

Pair-programmed-with: Garming Sam <garming@catalyst.net.nz>

Signed-off-by: Bob Campbell <bobcampbell@catalyst.net.nz>
Signed-off-by: Garming Sam <garming@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Autobuild-User(master): Garming Sam <garming@samba.org>
Autobuild-Date(master): Thu Aug 25 14:22:25 CEST 2016 on sn-devel-144

7 years agogetncchanges: Compute the partial attribute set from the remote schema
Garming Sam [Mon, 15 Aug 2016 02:10:38 +0000 (14:10 +1200)]
getncchanges: Compute the partial attribute set from the remote schema

This doesn't fix the partialAttrSetEx case, so the test is left in the
knownfail file.

Signed-off-by: Bob Campbell <bobcampbell@catalyst.net.nz>
Signed-off-by: Garming Sam <garming@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
7 years agotests/getnc_exop: PartialAttrSetEx test (passes Windows, fails us)
Garming Sam [Thu, 18 Aug 2016 03:20:06 +0000 (15:20 +1200)]
tests/getnc_exop: PartialAttrSetEx test (passes Windows, fails us)

This has an odd behaviour where PartialAttrSetEx does not respect the
incoming mapping. PartialAttrSetEx is not respected in Samba at all.

Signed-off-by: Garming Sam <garming@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
7 years agotests/getnc_exop: Ensure the remote prefixmap is always used (name attr)
Garming Sam [Wed, 17 Aug 2016 04:36:58 +0000 (16:36 +1200)]
tests/getnc_exop: Ensure the remote prefixmap is always used (name attr)

Signed-off-by: Garming Sam <garming@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
7 years agotests/getnc_exop: Ensure the remote prefixmap is always used (secret attrs)
Garming Sam [Wed, 17 Aug 2016 04:04:49 +0000 (16:04 +1200)]
tests/getnc_exop: Ensure the remote prefixmap is always used (secret attrs)

Signed-off-by: Garming Sam <garming@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
7 years agotests/getnc_exop: Ensure that all attids are valid in a given PAS
Garming Sam [Wed, 17 Aug 2016 02:26:55 +0000 (14:26 +1200)]
tests/getnc_exop: Ensure that all attids are valid in a given PAS

On Windows this does not seem to fail, but causes silent errors.

Pair-programmed-with: Garming Sam <garming@catalyst.net.nz>

Signed-off-by: Garming Sam <garming@catalyst.net.nz>
Signed-off-by: Bob Campbell <bobcampbell@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
7 years agotests/getnc_exop: Ensure we do the fallback if not given a PAS
Bob Campbell [Mon, 15 Aug 2016 04:19:09 +0000 (16:19 +1200)]
tests/getnc_exop: Ensure we do the fallback if not given a PAS

This will cause silent errors in the translation, but as far as we know,
Windows will accept it just fine.

Pair-programmed-with: Garming Sam <garming@catalyst.net.nz>

Signed-off-by: Garming Sam <garming@catalyst.net.nz>
Signed-off-by: Bob Campbell <bobcampbell@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
7 years agodrepl_out: Send the prefix map alongside the global catalog partial attribute set
Garming Sam [Thu, 18 Aug 2016 01:18:28 +0000 (13:18 +1200)]
drepl_out: Send the prefix map alongside the global catalog partial attribute set

Signed-off-by: Garming Sam <garming@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
7 years agodrepl_out: Send the prefix map alongside the RODC partial attribute set
Garming Sam [Thu, 11 Aug 2016 02:28:27 +0000 (14:28 +1200)]
drepl_out: Send the prefix map alongside the RODC partial attribute set

Signed-off-by: Garming Sam <garming@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
7 years agoreplicated_objects: Add missing newline for debug
Garming Sam [Mon, 15 Aug 2016 22:53:39 +0000 (10:53 +1200)]
replicated_objects: Add missing newline for debug

Signed-off-by: Garming Sam <garming@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
7 years agogetncchanges: Fix some whitespace
Bob Campbell [Mon, 15 Aug 2016 04:19:20 +0000 (16:19 +1200)]
getncchanges: Fix some whitespace

Pair-programmed-with: Garming Sam <garming@catalyst.net.nz>

Signed-off-by: Bob Campbell <bobcampbell@catalyst.net.nz>
Signed-off-by: Garming Sam <garming@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
7 years agotests/schemainfo: run dsdb schema info tests with proper URI
Garming Sam [Wed, 24 Aug 2016 23:33:16 +0000 (11:33 +1200)]
tests/schemainfo: run dsdb schema info tests with proper URI

Signed-off-by: Garming Sam <garming@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
7 years agoselftest: skip client_etypes tests if tshark or sha1sum is not installed
Uri Simchoni [Tue, 23 Aug 2016 04:50:35 +0000 (07:50 +0300)]
selftest: skip client_etypes tests if tshark or sha1sum is not installed

That was the original plan - not to fail existing envs, but for subunit
not to fail, it is not sufficient to just return 0 from the script.

Signed-off-by: Uri Simchoni <uri@samba.org>
Reviewed-by: Garming Sam <garming@catalyst.net.nz>
Autobuild-User(master): Garming Sam <garming@samba.org>
Autobuild-Date(master): Thu Aug 25 09:39:43 CEST 2016 on sn-devel-144

7 years agovfs_shadow_copy: handle non-existant files and wildcards
Uri Simchoni [Wed, 24 Aug 2016 11:42:23 +0000 (14:42 +0300)]
vfs_shadow_copy: handle non-existant files and wildcards

During path checking, the vfs connectpath_fn is called to
determine the share's root, relative to the file being
queried (for example, in snapshot file this may be other
than the share's "usual" root directory). connectpath_fn
must be able to answer this question even if the path does
not exist and its parent does exist. The convention in this
case is that this refers to a yet-uncreated file under the parent
and all queries are relative to the parent.

This also serves as a workaround for the case where connectpath_fn
has to handle wildcards, as with the case of SMB1 trans2 findfirst.

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

Signed-off-by: Uri Simchoni <uri@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
Autobuild-User(master): Jeremy Allison <jra@samba.org>
Autobuild-Date(master): Thu Aug 25 05:35:29 CEST 2016 on sn-devel-144

7 years agoselftest: test listing directories inside snapshots
Uri Simchoni [Tue, 23 Aug 2016 11:29:39 +0000 (14:29 +0300)]
selftest: test listing directories inside snapshots

Verify that directories are also listable.

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

Signed-off-by: Uri Simchoni <uri@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
7 years agoselftest: check file readability in shadow_copy2 test
Uri Simchoni [Tue, 23 Aug 2016 11:03:30 +0000 (14:03 +0300)]
selftest: check file readability in shadow_copy2 test

Add tests which verify that a snapshot file is readable
if and only if it its metadata can be retrieved. Also
verify (in most tests) that file is retrieved from the
correct snapshot.

Together with the existing test for number of previous
versions we can stat, this test checks that we can read
those files, and also that we cannot break out of a snapshot
if wide links are not allowed.

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

Signed-off-by: Uri Simchoni <uri@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
7 years agoselftest: add content to files created during shadow_copy2 test
Uri Simchoni [Tue, 23 Aug 2016 08:33:52 +0000 (11:33 +0300)]
selftest: add content to files created during shadow_copy2 test

This will allow reading them and verifying we got the right version

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

Signed-off-by: Uri Simchoni <uri@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
7 years agos2-selftest: run shadow_copy2 test both in NT1 and SMB3 modes
Uri Simchoni [Tue, 16 Aug 2016 04:19:04 +0000 (07:19 +0300)]
s2-selftest: run shadow_copy2 test both in NT1 and SMB3 modes

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

Signed-off-by: Uri Simchoni <uri@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
7 years agos3: vfs: Fix compilation error on Solaris.
Jeremy Allison [Wed, 24 Aug 2016 17:32:32 +0000 (10:32 -0700)]
s3: vfs: Fix compilation error on Solaris.

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

Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Uri Simchoni <uri@samba.org>
7 years agolibrpc/tools: support ndr64 in the validate path of ndrdump
Günther Deschner [Tue, 23 Aug 2016 13:54:26 +0000 (15:54 +0200)]
librpc/tools: support ndr64 in the validate path of ndrdump

Guenther

Signed-off-by: Guenther Deschner <gd@samba.org>
Reviewed-by: Alexander Bokovoy <ab@samba.org>
7 years agodocs: Fix a typo
Volker Lendecke [Wed, 24 Aug 2016 15:42:48 +0000 (17:42 +0200)]
docs: Fix a typo

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Guenther Deschner <gd@samba.org>
Autobuild-User(master): Volker Lendecke <vl@samba.org>
Autobuild-Date(master): Wed Aug 24 21:55:29 CEST 2016 on sn-devel-144

7 years agorpc_server: Fix a typo
Volker Lendecke [Wed, 24 Aug 2016 15:42:48 +0000 (17:42 +0200)]
rpc_server: Fix a typo

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Guenther Deschner <gd@samba.org>
7 years agolib/util: Fix format strings and argument data types
Amitay Isaacs [Sun, 21 Aug 2016 16:53:00 +0000 (02:53 +1000)]
lib/util: Fix format strings and argument data types

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

Signed-off-by: Amitay Isaacs <amitay@gmail.com>
Reviewed-by: Jeremy Allison <jra@samba.org>
Autobuild-User(master): Jeremy Allison <jra@samba.org>
Autobuild-Date(master): Wed Aug 24 05:32:15 CEST 2016 on sn-devel-144

7 years agotorture: Fix format-nonliteral warning
Amitay Isaacs [Mon, 8 Aug 2016 07:59:08 +0000 (17:59 +1000)]
torture: Fix format-nonliteral warning

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

Signed-off-by: Amitay Isaacs <amitay@gmail.com>
Reviewed-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
7 years agopassdb: Fix format-nonliteral warning
Amitay Isaacs [Mon, 8 Aug 2016 07:40:51 +0000 (17:40 +1000)]
passdb: Fix format-nonliteral warning

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

Signed-off-by: Amitay Isaacs <amitay@gmail.com>
Reviewed-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
7 years agowibindd: Fix format-nonliteral warning
Amitay Isaacs [Mon, 8 Aug 2016 04:22:30 +0000 (14:22 +1000)]
wibindd: Fix format-nonliteral warning

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

Signed-off-by: Amitay Isaacs <amitay@gmail.com>
Reviewed-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
7 years agoregedit: Fix format-nonliteral warning
Amitay Isaacs [Mon, 8 Aug 2016 04:21:14 +0000 (14:21 +1000)]
regedit: Fix format-nonliteral warning

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

Signed-off-by: Amitay Isaacs <amitay@gmail.com>
Reviewed-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
7 years agos3-libnet: Fix format-nonliteral warning
Amitay Isaacs [Mon, 8 Aug 2016 04:18:31 +0000 (14:18 +1000)]
s3-libnet: Fix format-nonliteral warning

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

Signed-off-by: Amitay Isaacs <amitay@gmail.com>
Reviewed-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
7 years agos3-netapi: Fix format-nonliteral warning
Amitay Isaacs [Mon, 8 Aug 2016 04:17:18 +0000 (14:17 +1000)]
s3-netapi: Fix format-nonliteral warning

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

Signed-off-by: Amitay Isaacs <amitay@gmail.com>
Reviewed-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
7 years agos3-include: Fix format-nonliteral warning
Amitay Isaacs [Mon, 8 Aug 2016 04:16:29 +0000 (14:16 +1000)]
s3-include: Fix format-nonliteral warning

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

Signed-off-by: Amitay Isaacs <amitay@gmail.com>
Reviewed-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
7 years agos3-lib: Fix format-nonliteral warning
Amitay Isaacs [Sun, 7 Aug 2016 08:14:31 +0000 (18:14 +1000)]
s3-lib: Fix format-nonliteral warning

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

Signed-off-by: Amitay Isaacs <amitay@gmail.com>
Reviewed-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
7 years agoldb: Fix format-nonliteral warning
Amitay Isaacs [Tue, 2 Aug 2016 14:44:24 +0000 (00:44 +1000)]
ldb: Fix format-nonliteral warning

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

Signed-off-by: Amitay Isaacs <amitay@gmail.com>
Reviewed-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
7 years agolib/util: Fix format-nonliteral warning
Amitay Isaacs [Tue, 2 Aug 2016 08:11:17 +0000 (18:11 +1000)]
lib/util: Fix format-nonliteral warning

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

Signed-off-by: Amitay Isaacs <amitay@gmail.com>
Reviewed-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
7 years agotdb: Fix format-nonliteral warning
Amitay Isaacs [Tue, 2 Aug 2016 08:17:34 +0000 (18:17 +1000)]
tdb: Fix format-nonliteral warning

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

Signed-off-by: Amitay Isaacs <amitay@gmail.com>
Reviewed-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
7 years agotalloc: Fix format-nonliteral warning
Amitay Isaacs [Tue, 2 Aug 2016 08:05:14 +0000 (18:05 +1000)]
talloc: Fix format-nonliteral warning

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

Signed-off-by: Amitay Isaacs <amitay@gmail.com>
Reviewed-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
7 years agos3-lib: Remove unused function sprintf_append
Amitay Isaacs [Tue, 23 Aug 2016 05:05:08 +0000 (15:05 +1000)]
s3-lib: Remove unused function sprintf_append

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

Signed-off-by: Amitay Isaacs <amitay@gmail.com>
Reviewed-by: Jeremy Allison <jra@samba.org>
7 years agolib: Remove unused source3/lib/asys
Volker Lendecke [Sun, 7 Aug 2016 14:03:00 +0000 (16:03 +0200)]
lib: Remove unused source3/lib/asys

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
7 years agovfs: Remove link to asys_
Volker Lendecke [Sun, 7 Aug 2016 13:59:10 +0000 (15:59 +0200)]
vfs: Remove link to asys_

No longer needed after conversion to pthreadpool_tevent

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
7 years agovfs: Convert vfs_fsync_send to pthreadpool_tevent
Volker Lendecke [Sun, 7 Aug 2016 13:53:12 +0000 (15:53 +0200)]
vfs: Convert vfs_fsync_send to pthreadpool_tevent

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>