samba.git
7 years agoVERSION: Set version to 4.5.0... samba-4.5.0
Stefan Metzmacher [Wed, 7 Sep 2016 08:54:15 +0000 (10:54 +0200)]
VERSION: Set version to 4.5.0...

and disable git snapshots.

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
7 years agoWHATSNEW: Add release notes for Samba 4.5.0.
Stefan Metzmacher [Wed, 7 Sep 2016 08:53:11 +0000 (10:53 +0200)]
WHATSNEW: Add release notes for Samba 4.5.0.

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
7 years agos3-spoolss: fix _spoolss_GetPrinterDataEx by moving the keyname lengthcheck.
Günther Deschner [Thu, 1 Sep 2016 17:55:40 +0000 (19:55 +0200)]
s3-spoolss: fix _spoolss_GetPrinterDataEx by moving the keyname lengthcheck.

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): Wed Sep  7 03:00:14 CEST 2016 on sn-devel-144

BUG: https://bugzilla.samba.org/show_bug.cgi?id=12245
(cherry picked from commit d8b57e3828eac084ad302a90b33c35ff4e918e5a)

Autobuild-User(v4-5-test): Karolin Seeger <kseeger@samba.org>
Autobuild-Date(v4-5-test): Wed Sep  7 16:26:48 CEST 2016 on sn-devel-144

7 years agos4-torture: test GetPrinterData with server handle and 0 keylength.
Günther Deschner [Thu, 1 Sep 2016 17:54:46 +0000 (19:54 +0200)]
s4-torture: test GetPrinterData with server handle and 0 keylength.

This is what e.g. Windows 10 does a lot.

Guenther

Signed-off-by: Guenther Deschner <gd@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
BUG: https://bugzilla.samba.org/show_bug.cgi?id=12245
(cherry picked from commit 518b2a3f5f3a4814e96546505487b775b5dbca40)

7 years agoidmap_script: add missing "IDTOSID" argument to the script command line.
Björn Baumbach [Fri, 26 Aug 2016 15:16:51 +0000 (17:16 +0200)]
idmap_script: add missing "IDTOSID" argument to the script command line.

According to the documentation the commands should look like
"IDTOSID UID xxxx" instead of "UID xxxx".

This fixes changes of commit b4239ca096738f553b0f9d7fa6aaa4219b72ef7f:
    idmap_script: Parallelize script calls

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

Signed-off-by: Björn Baumbach <bb@sernet.de>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Michael Adam <obnox@samba.org>
Autobuild-User(master): Stefan Metzmacher <metze@samba.org>
Autobuild-Date(master): Tue Sep  6 19:32:57 CEST 2016 on sn-devel-144

(cherry picked from commit 4f654acad01dbb1b17e933a855bb53ea6a7bb34d)

7 years agovfs_acl_xattr|tdb: enforced settings when ignore system acls=yes
Ralph Boehme [Fri, 26 Aug 2016 08:04:53 +0000 (10:04 +0200)]
vfs_acl_xattr|tdb: enforced settings when ignore system acls=yes

When "ignore system acls" is set to "yes, we need to ensure filesystem
permission always grant access so that when doing our own access checks
we don't run into situations where we grant access but the filesystem
doesn't.

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>
Autobuild-User(master): Ralph Böhme <slow@samba.org>
Autobuild-Date(master): Wed Aug 31 18:41:20 CEST 2016 on sn-devel-144

(cherry picked from commit b72287514cc78c9019db7385af4c9b9d94f60894)

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>
(cherry picked from commit cbe8f0d63b90e4380da35e9f9f5a05d8ccc2058b)

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>
(cherry picked from commit 11dddd59aa01195152199443bc26e3141f162c8f)

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>
(cherry picked from commit 946b93d0e3f6f23fa2325d7aaba4dc6f4cc17cb6)

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>
(cherry picked from commit 0730cb7e1ce33dbc5fc48a7363204c1220400c68)

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>
(cherry picked from commit 26a9867ae1a9c69659252ce03c280c7c18a6c58f)

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>
(cherry picked from commit f46179ef7310959af095b0ea6234df7523d15457)

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>
(cherry picked from commit 10959698e20de381beec7ab532c8bdc32fa6401c)

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>
(cherry picked from commit 61c3d2124fb1a180fae4c8c0b5ab5b32bd56c8ad)

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>
(cherry picked from commit 0de5a128cee90694979d074c2590ddbca0071e82)

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>
(cherry picked from commit 335527c647331148927feea2a7ae2f2c88986bc6)

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>
(cherry picked from commit e6f1254a00a6bf85b8d95bfbafef7d3e39ce1dde)

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>
(cherry picked from commit 9f79084f166208820f586c8e43e1e315d32cd5ce)

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>
(cherry picked from commit 2367eea928593f12f8914f7e7ba613b1b15516de)

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>
(cherry picked from commit 590b80490c00587b5a4035856891e10defb654f6)

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>
(cherry picked from commit 58889e04bd545d7420d1193e134351bd0ccb8430)

7 years agogensec/spnego: work around missing server mechListMIC in SMB servers
Stefan Metzmacher [Thu, 1 Sep 2016 06:08:23 +0000 (08:08 +0200)]
gensec/spnego: work around missing server mechListMIC in SMB servers

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

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Christian Ambach <ambi@samba.org>
Autobuild-User(master): Christian Ambach <ambi@samba.org>
Autobuild-Date(master): Fri Sep  2 18:10:44 CEST 2016 on sn-devel-144

(cherry picked from commit 9b45ba5cd53bd513eb777590815a0b8408af64e2)

7 years agoMerge tag 'samba-4.5.0rc3' into v4-5-test
Stefan Metzmacher [Wed, 7 Sep 2016 07:52:04 +0000 (09:52 +0200)]
Merge tag 'samba-4.5.0rc3' into v4-5-test

samba: tag release samba-4.5.0rc3

7 years agoctdb-tests: Add a test to ensure that CTDB works with no eventscripts
Martin Schwenke [Mon, 29 Aug 2016 06:52:45 +0000 (16:52 +1000)]
ctdb-tests: Add a test to ensure that CTDB works with no eventscripts

This only tests something on local daemons, since the configuration
can't be easily manipulated on a real cluster.

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

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): Thu Sep  1 17:15:06 CEST 2016 on sn-devel-144

(cherry picked from commit 625f080f213d03fd4b08e1b6ff9f1415f77ee73b)

Autobuild-User(v4-5-test): Stefan Metzmacher <metze@samba.org>
Autobuild-Date(v4-5-test): Tue Sep  6 12:18:42 CEST 2016 on sn-devel-144

7 years agoctdb-tests: Conditionally use temporary config file for local daemons
Martin Schwenke [Mon, 29 Aug 2016 06:49:07 +0000 (16:49 +1000)]
ctdb-tests: Conditionally use temporary config file for local daemons

If there's configuration in the environment then daemons_start()
should use a temporary configuration file with that appended.

This means that global overrides don't (harmlessly) build up in the
configuration file during each test and individual tests can override
configuration when calling daemons_start() directly.

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

Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
(cherry picked from commit 7885b9652fcb3b30361a8b2e0b4688c261b55065)

7 years agoctdb-tests: Factor out function config_from_environment()
Martin Schwenke [Mon, 29 Aug 2016 06:05:33 +0000 (16:05 +1000)]
ctdb-tests: Factor out function config_from_environment()

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

Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
(cherry picked from commit a2bbf71ad67e5c3a6287cf62f54ff13389bf2143)

7 years agoctdb-daemon: Don't steal control structure before synchronous reply
Martin Schwenke [Tue, 30 Aug 2016 22:29:13 +0000 (08:29 +1000)]
ctdb-daemon: Don't steal control structure before synchronous reply

If *async_reply isn't set then the calling code will reply to the
control and free the control structure.  In some places the control
structure pointer is stolen onto state before a synchronous exit due
to an error condition.  The error handling then frees state and
returns an error.  The calling code will access-after-free when trying
to reply to the control.

To make this easier to understand, the convention is that any
(immediate) error results in a synchronous reply to the control via an
error return code AND *async_reply not being set.  In this case the
control structure pointer should never be stolen onto state.  State is
never used for a synchronous reply, it is only ever used by a
callback.

Also initialise state->c to NULL so that any premature call to a
callback (e.g. in an immediate error path) is more obvious.

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

Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
(cherry picked from commit 9d975b860d52030a702723c70791c6a2829107c0)

7 years agoctdb-daemon: Handle failure immediately, do housekeeping later
Martin Schwenke [Fri, 26 Aug 2016 06:38:56 +0000 (16:38 +1000)]
ctdb-daemon: Handle failure immediately, do housekeeping later

The callback should never be called before an immediate return.  The
callback might reply to a control and the caller of
ctdb_event_script_callback_v() may not have assigned/stolen the
pointer to control structure into the private data.  Therefore,
calling the callback can dereference an uninitialised pointer to the
control structure when attempting to reply.

An event script isn't being run until the child has been forked.  So
update relevant state and set the destructor after this.

If the child can't be forked then free the state and return with an
error.  The callback will not be called and the caller will process
the error correctly.

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

Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
(cherry picked from commit 582518c7e89b279e34147bdb0b04b73056fac048)

7 years agoctdb-daemon: Schedule running of callback if there are no event scripts
Martin Schwenke [Fri, 26 Aug 2016 06:29:47 +0000 (16:29 +1000)]
ctdb-daemon: Schedule running of callback if there are no event scripts

The callback should never be called before an immediate return.  The
callback might reply to a control and the caller of
ctdb_event_script_callback_v() may not have assigned/stolen the
pointer to control structure into the private data.  Therefore,
calling the callback can dereference an uninitialised pointer to the
control structure when attempting to reply.

ctdb_event_script_callback_v() must succeed when there are no event
scripts.  On success the caller will mark the call as asynchronous and
expect the callback to be called.  Given that it can't be called
before return then it needs to be scheduled.

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

Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
(cherry picked from commit 9076c44f35bf309b9e183bae98829f7154b93f33)

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

(cherry picked from commit db32a0e5ea8f652857e45480cc31ecb1ef884c1a)

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>
(cherry picked from commit 9d0c869e36ba2f43fd2ed4cd090b48102d499bc8)

7 years agoscript/release.sh: use 8 byte gpg key ids
Stefan Metzmacher [Fri, 2 Sep 2016 06:47:56 +0000 (08:47 +0200)]
script/release.sh: use 8 byte gpg key ids

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
Autobuild-User(master): Jeremy Allison <jra@samba.org>
Autobuild-Date(master): Fri Sep  2 22:05:33 CEST 2016 on sn-devel-144

(cherry picked from commit e0ef054fa94b0dd56ec7bf92ffea0a6d7609da56)

Autobuild-User(v4-5-test): Stefan Metzmacher <metze@samba.org>
Autobuild-Date(v4-5-test): Mon Sep  5 15:07:40 CEST 2016 on sn-devel-144

7 years agoWHATSNEW: Start release notes for Samba 4.5.0rc4.
Stefan Metzmacher [Mon, 29 Aug 2016 06:19:04 +0000 (08:19 +0200)]
WHATSNEW: Start release notes for Samba 4.5.0rc4.

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Autobuild-User(v4-5-test): Stefan Metzmacher <metze@samba.org>
Autobuild-Date(v4-5-test): Mon Aug 29 12:15:37 CEST 2016 on sn-devel-144

7 years agoVERSION: Bump version up to 4.5.0rc4...
Stefan Metzmacher [Mon, 29 Aug 2016 06:17:57 +0000 (08:17 +0200)]
VERSION: Bump version up to 4.5.0rc4...

and re-enable git snapshots.

Signed-off-by: Stefan Metzmacher <metze@samba.org>
7 years agoVERSION: Disable git snapshots for the 4.5.0rc3 release.
Stefan Metzmacher [Mon, 29 Aug 2016 06:17:12 +0000 (08:17 +0200)]
VERSION: Disable git snapshots for the 4.5.0rc3 release.

Signed-off-by: Stefan Metzmacher <metze@samba.org>
7 years agoWHATSNEW: Release notes for Samba 4.5.0rc3.
Stefan Metzmacher [Mon, 29 Aug 2016 05:34:01 +0000 (07:34 +0200)]
WHATSNEW: Release notes for Samba 4.5.0rc3.

Signed-off-by: Stefan Metzmacher <metze@samba.org>
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

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

(cherry picked from commit cb243d86d892cb148d01dd87f29f86f3e2c1ebd0)

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>
BUG: https://bugzilla.samba.org/show_bug.cgi?id=12187

(cherry picked from commit 1a96f9329e718acac195e75a5156b1c147ad54ff)

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>
BUG: https://bugzilla.samba.org/show_bug.cgi?id=12187

(cherry picked from commit 36df826154ed90e92f877e6f36269893c44a2a16)

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>
BUG: https://bugzilla.samba.org/show_bug.cgi?id=12187

(cherry picked from commit e495d1b2ed9aca45ce696dd8cc54458002ca0c3a)

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>
BUG: https://bugzilla.samba.org/show_bug.cgi?id=12187

(cherry picked from commit 1f4ea1686ff1575406b5e8e488feb7b900db12ef)

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>
BUG: https://bugzilla.samba.org/show_bug.cgi?id=12187

(cherry picked from commit 7f3ef150751452411db1e0c5b2ca6d8af2769d5c)

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>
BUG: https://bugzilla.samba.org/show_bug.cgi?id=12187

(cherry picked from commit 1673590e8ec3001c6909a78e004f64433060a624)

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>
BUG: https://bugzilla.samba.org/show_bug.cgi?id=12187

(cherry picked from commit 0ea126c63c1d5a0081b90a914c9ad7227cf7b748)

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>
BUG: https://bugzilla.samba.org/show_bug.cgi?id=12187

(cherry picked from commit 317bbc4d0528dca03d94d61c38b038d314f8cad8)

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>
BUG: https://bugzilla.samba.org/show_bug.cgi?id=12187

(cherry picked from commit 216c0319c744c39848ae5da7d15dccb6769ea20a)

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>
BUG: https://bugzilla.samba.org/show_bug.cgi?id=12187

(cherry picked from commit 9563dab562cb2dfe4c226f03156bec0bf6eef847)

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>
BUG: https://bugzilla.samba.org/show_bug.cgi?id=12187

(cherry picked from commit fd49b44e0296348c835168f336297fd969e63c50)

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

(cherry picked from commit 38696630552d449ec3c8e1fbdf6fb8212a96d2c9)

7 years agoAdded Wiki link to replPropertyMetaData Changes section
Marc Muehlfeld [Fri, 26 Aug 2016 12:16:37 +0000 (14:16 +0200)]
Added Wiki link to replPropertyMetaData Changes section

In the Wiki we give more details and describe what the user needs to
do to fix the attributes.

Signed-off-by: Marc Muehlfeld <mmuehlfeld@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
7 years agoVERSION: Disable git snapshots for the 4.5.0rc3 release. samba-4.5.0rc3
Stefan Metzmacher [Mon, 29 Aug 2016 06:17:12 +0000 (08:17 +0200)]
VERSION: Disable git snapshots for the 4.5.0rc3 release.

Signed-off-by: Stefan Metzmacher <metze@samba.org>
7 years agoWHATSNEW: Release notes for Samba 4.5.0rc3.
Stefan Metzmacher [Mon, 29 Aug 2016 05:34:01 +0000 (07:34 +0200)]
WHATSNEW: Release notes for Samba 4.5.0rc3.

Signed-off-by: Stefan Metzmacher <metze@samba.org>
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

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

(cherry picked from commit cb243d86d892cb148d01dd87f29f86f3e2c1ebd0)

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>
BUG: https://bugzilla.samba.org/show_bug.cgi?id=12187

(cherry picked from commit 1a96f9329e718acac195e75a5156b1c147ad54ff)

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>
BUG: https://bugzilla.samba.org/show_bug.cgi?id=12187

(cherry picked from commit 36df826154ed90e92f877e6f36269893c44a2a16)

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>
BUG: https://bugzilla.samba.org/show_bug.cgi?id=12187

(cherry picked from commit e495d1b2ed9aca45ce696dd8cc54458002ca0c3a)

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>
BUG: https://bugzilla.samba.org/show_bug.cgi?id=12187

(cherry picked from commit 1f4ea1686ff1575406b5e8e488feb7b900db12ef)

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>
BUG: https://bugzilla.samba.org/show_bug.cgi?id=12187

(cherry picked from commit 7f3ef150751452411db1e0c5b2ca6d8af2769d5c)

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>
BUG: https://bugzilla.samba.org/show_bug.cgi?id=12187

(cherry picked from commit 1673590e8ec3001c6909a78e004f64433060a624)

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>
BUG: https://bugzilla.samba.org/show_bug.cgi?id=12187

(cherry picked from commit 0ea126c63c1d5a0081b90a914c9ad7227cf7b748)

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>
BUG: https://bugzilla.samba.org/show_bug.cgi?id=12187

(cherry picked from commit 317bbc4d0528dca03d94d61c38b038d314f8cad8)

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>
BUG: https://bugzilla.samba.org/show_bug.cgi?id=12187

(cherry picked from commit 216c0319c744c39848ae5da7d15dccb6769ea20a)

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>
BUG: https://bugzilla.samba.org/show_bug.cgi?id=12187

(cherry picked from commit 9563dab562cb2dfe4c226f03156bec0bf6eef847)

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>
BUG: https://bugzilla.samba.org/show_bug.cgi?id=12187

(cherry picked from commit fd49b44e0296348c835168f336297fd969e63c50)

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

(cherry picked from commit 38696630552d449ec3c8e1fbdf6fb8212a96d2c9)

7 years agoAdded Wiki link to replPropertyMetaData Changes section
Marc Muehlfeld [Fri, 26 Aug 2016 12:16:37 +0000 (14:16 +0200)]
Added Wiki link to replPropertyMetaData Changes section

In the Wiki we give more details and describe what the user needs to
do to fix the attributes.

Signed-off-by: Marc Muehlfeld <mmuehlfeld@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
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>
(cherry picked from commit f5401ff3146aabc5fb2dac25e4856c6c3756c8f7)

Autobuild-User(v4-5-test): Stefan Metzmacher <metze@samba.org>
Autobuild-Date(v4-5-test): Sun Aug 28 22:02:12 CEST 2016 on sn-devel-144

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>
(cherry picked from commit d37545538ca0274feb18f04ba120ed013ac2321a)

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

(cherry picked from commit f41f439335efb352d03a842c370212a0af77262a)

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>
(cherry picked from commit 22c3982100a1d6bf67979a0659604942ef6f11f0)

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>
(cherry picked from commit 495b8177363bf1930f3afb373ad73caac022f353)

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>
(cherry picked from commit 523046080dd65607eacb901d58ee3b6e54de865e)

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>
(cherry picked from commit c695faa7f94feb8c0a02a9e2f0472af20047bf65)

7 years agos3: libsmb: Add the capability to find a @GMT- path in an SMB2 create and transform...
Jeremy Allison [Sat, 20 Aug 2016 00:00:25 +0000 (17:00 -0700)]
s3: libsmb: Add the capability to find a @GMT- path in an SMB2 create and transform to a timewarp token.

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

Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Uri Simchoni <uri@samba.org>
Autobuild-User(master): Jeremy Allison <jra@samba.org>
Autobuild-Date(master): Mon Aug 22 22:59:22 CEST 2016 on sn-devel-144

(cherry picked from commit 272f5c95cfb3d8035939dada7bd473058c7b6517)

7 years agos3: libsmb: Plumb new SMB2 shadow copy call into cli_shadow_copy_data().
Jeremy Allison [Tue, 16 Aug 2016 22:27:55 +0000 (15:27 -0700)]
s3: libsmb: Plumb new SMB2 shadow copy call into cli_shadow_copy_data().

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

Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Uri Simchoni <uri@samba.org>
(cherry picked from commit 03bf1f858d1c474f9522cb0f5b264c4f6c2ca5b9)

7 years agos3: libsmb: Add cli_smb2_shadow_copy_data() function that gets shadow copy info over...
Jeremy Allison [Tue, 16 Aug 2016 22:26:53 +0000 (15:26 -0700)]
s3: libsmb: Add cli_smb2_shadow_copy_data() function that gets shadow copy info over SMB2.

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

Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Uri Simchoni <uri@samba.org>
(cherry picked from commit 0c6329bc152fcf08fcef385d2f7ee829485eb1a6)

7 years agos3: libsmb: Add return args to clistr_is_previous_version_path().
Jeremy Allison [Fri, 19 Aug 2016 00:15:01 +0000 (17:15 -0700)]
s3: libsmb: Add return args to clistr_is_previous_version_path().

Not yet used - we will use these to construct the SMB2 TWrp blob.

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

Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Uri Simchoni <uri@samba.org>
(cherry picked from commit 14fd6dca4ef33ee85a2f8578f1ad608d6056da1f)

7 years agos3: libsmb: Correctly align create contexts in a create call.
Jeremy Allison [Fri, 19 Aug 2016 23:58:39 +0000 (16:58 -0700)]
s3: libsmb: Correctly align create contexts in a create call.

SMB2 shadow copy requests are the first time we've used
create contexts in anger in this codepath. This took me
longer than I'd like to admit to find :-).

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

Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Uri Simchoni <uri@samba.org>
(cherry picked from commit f8caadfc78a15fa3aefc9ef6249195767c47aa8f)

7 years agos3: smbclient. Ensure we don't crash by freeing uninitialized *snapshots.
Jeremy Allison [Fri, 19 Aug 2016 23:57:27 +0000 (16:57 -0700)]
s3: smbclient. Ensure we don't crash by freeing uninitialized *snapshots.

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

Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Uri Simchoni <uri@samba.org>
(cherry picked from commit cb687a6af0a498676268874ab25b19a6b0764915)

7 years agos3: smbclient: In order to get shadow copy data over SMB1 we must call cli_shadow_cop...
Jeremy Allison [Thu, 18 Aug 2016 21:36:50 +0000 (14:36 -0700)]
s3: smbclient: In order to get shadow copy data over SMB1 we must call cli_shadow_copy_data() twice.

Once with 'get_names = false' to get the size, then again with 'get_names = true'
to get the data or a Windows server fails to return valid info. Samba doesn't have this bug.

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

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

(cherry picked from commit 57a54af66f414708d5c02f346f08bc4bfd55349d)

7 years agos3: libsmb: Do some hardening in the receive processing of cli_shadow_copy_data_recv().
Jeremy Allison [Thu, 18 Aug 2016 19:06:23 +0000 (12:06 -0700)]
s3: libsmb: Do some hardening in the receive processing of cli_shadow_copy_data_recv().

Protect against malicious servers.

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

Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Uri Simchoni <uri@samba.org>
(cherry picked from commit 336da637541fba13586af6fc2cb9d143d656e87e)

7 years agos3: libsmb: Correctly set max_setup_size in FSCTL_GET_SHADOW_COPY_DATA nttrans ioctl.
Jeremy Allison [Thu, 18 Aug 2016 21:33:01 +0000 (14:33 -0700)]
s3: libsmb: Correctly set max_setup_size in FSCTL_GET_SHADOW_COPY_DATA nttrans ioctl.

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

Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Uri Simchoni <uri@samba.org>
(cherry picked from commit a9fe27e17ce55461946037bb25a432da340095ab)

7 years agos3: libsmb: Plumb in additional_flags2 = FLAGS2_REPARSE_PATH to cli_list_trans_send().
Jeremy Allison [Thu, 18 Aug 2016 21:26:20 +0000 (14:26 -0700)]
s3: libsmb: Plumb in additional_flags2 = FLAGS2_REPARSE_PATH to cli_list_trans_send().

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

Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Uri Simchoni <uri@samba.org>
(cherry picked from commit 0b252d7c6fdd963308fff8938a8be185892afbbe)

7 years agos3: libsmb: Make a comment note that cli_set_ea() needs some internal changes before...
Jeremy Allison [Thu, 18 Aug 2016 21:20:11 +0000 (14:20 -0700)]
s3: libsmb: Make a comment note that cli_set_ea() needs some internal changes before cli_set_ea_path() can use previous path versions.

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

Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Uri Simchoni <uri@samba.org>
(cherry picked from commit e4a261c6c826a2be75bcd9d6af8232f043acc5f1)

7 years agos3: libsmb: Plumb in additional_flags2 = FLAGS2_REPARSE_PATH to cli_ctemp_send().
Jeremy Allison [Thu, 18 Aug 2016 21:07:17 +0000 (14:07 -0700)]
s3: libsmb: Plumb in additional_flags2 = FLAGS2_REPARSE_PATH to cli_ctemp_send().

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

Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Uri Simchoni <uri@samba.org>
(cherry picked from commit 97cde5dc92185f188868ddd71287d43ddae30516)

7 years agos3: libsmb: Plumb in additional_flags2 = FLAGS2_REPARSE_PATH to cli_chkpath_send().
Jeremy Allison [Thu, 18 Aug 2016 21:05:33 +0000 (14:05 -0700)]
s3: libsmb: Plumb in additional_flags2 = FLAGS2_REPARSE_PATH to cli_chkpath_send().

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

Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Uri Simchoni <uri@samba.org>
(cherry picked from commit e2d70551e1ba13119d53afaa00f05e70897484f0)

7 years agos3: libsmb: Plumb in additional_flags2 = FLAGS2_REPARSE_PATH to cli_setatr_send().
Jeremy Allison [Thu, 18 Aug 2016 21:04:05 +0000 (14:04 -0700)]
s3: libsmb: Plumb in additional_flags2 = FLAGS2_REPARSE_PATH to cli_setatr_send().

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

Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Uri Simchoni <uri@samba.org>
(cherry picked from commit 00551d73063b46d3dd2740951a2a8f1b2e351f79)

7 years agos3: libsmb: Plumb in additional_flags2 = FLAGS2_REPARSE_PATH to cli_getatr_send().
Jeremy Allison [Thu, 18 Aug 2016 21:02:24 +0000 (14:02 -0700)]
s3: libsmb: Plumb in additional_flags2 = FLAGS2_REPARSE_PATH to cli_getatr_send().

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

Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Uri Simchoni <uri@samba.org>
(cherry picked from commit 461000c8812a99a81a9f3fc87f93c1b7c67f42bd)

7 years agos3: libsmb: Plumb in additional_flags2 = FLAGS2_REPARSE_PATH to cli_openx_create().
Jeremy Allison [Thu, 18 Aug 2016 20:59:52 +0000 (13:59 -0700)]
s3: libsmb: Plumb in additional_flags2 = FLAGS2_REPARSE_PATH to cli_openx_create().

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

Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Uri Simchoni <uri@samba.org>
(cherry picked from commit 47c1314429cdf516358d5e00ca24c313ddab67b0)

7 years agos3: libsmb: Plumb in additional_flags2 = FLAGS2_REPARSE_PATH to cli_nttrans_create_se...
Jeremy Allison [Thu, 18 Aug 2016 20:40:23 +0000 (13:40 -0700)]
s3: libsmb: Plumb in additional_flags2 = FLAGS2_REPARSE_PATH to cli_nttrans_create_send().

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

Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Uri Simchoni <uri@samba.org>
(cherry picked from commit d7ee917b165da2695433b7b115363223f2bd214f)

7 years agos3: libsmb: Plumb in additional_flags2 = FLAGS2_REPARSE_PATH to cli_ntcreate1_send().
Jeremy Allison [Thu, 18 Aug 2016 20:37:22 +0000 (13:37 -0700)]
s3: libsmb: Plumb in additional_flags2 = FLAGS2_REPARSE_PATH to cli_ntcreate1_send().

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

Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Uri Simchoni <uri@samba.org>
(cherry picked from commit cd4a60bb1f84891763617f96de148068e0492773)

7 years agos3: libsmb: Plumb in additional_flags2 = FLAGS2_REPARSE_PATH to cli_rmdir_send()
Jeremy Allison [Thu, 18 Aug 2016 20:34:44 +0000 (13:34 -0700)]
s3: libsmb: Plumb in additional_flags2 = FLAGS2_REPARSE_PATH to cli_rmdir_send()

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

Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Uri Simchoni <uri@samba.org>
(cherry picked from commit 17d1f19eda2c735fcb10a389c3681ccd385bb9c7)

7 years agos3: libsmb: s3: libsmb: Plumb in additional_flags2 = FLAGS2_REPARSE_PATH to cli_mkdir...
Jeremy Allison [Thu, 18 Aug 2016 20:33:30 +0000 (13:33 -0700)]
s3: libsmb: s3: libsmb: Plumb in additional_flags2 = FLAGS2_REPARSE_PATH to cli_mkdir_send().

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

Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Uri Simchoni <uri@samba.org>
(cherry picked from commit 3081604734a9531cefa71d0417a6fbfee9a6a8b6)

7 years agos3: libsmb: s3: libsmb: Plumb in additional_flags2 = FLAGS2_REPARSE_PATH to cli_unlin...
Jeremy Allison [Thu, 18 Aug 2016 20:32:03 +0000 (13:32 -0700)]
s3: libsmb: s3: libsmb: Plumb in additional_flags2 = FLAGS2_REPARSE_PATH to cli_unlink_send().

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

Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Uri Simchoni <uri@samba.org>
(cherry picked from commit 3242a0b9f0ae0d51110dc6542195af1be91aeece)

7 years agos3: libsmb: s3: libsmb: Plumb in additional_flags2 = FLAGS2_REPARSE_PATH to cli_ntren...
Jeremy Allison [Thu, 18 Aug 2016 20:29:01 +0000 (13:29 -0700)]
s3: libsmb: s3: libsmb: Plumb in additional_flags2 = FLAGS2_REPARSE_PATH to cli_ntrename_internal_send().

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

Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Uri Simchoni <uri@samba.org>
(cherry picked from commit c2a1905abd5d8756dd4afdd3116d311b1dec1246)

7 years agos3: libsmb: s3: libsmb: Plumb in additional_flags2 = FLAGS2_REPARSE_PATH to cli_renam...
Jeremy Allison [Thu, 18 Aug 2016 20:26:59 +0000 (13:26 -0700)]
s3: libsmb: s3: libsmb: Plumb in additional_flags2 = FLAGS2_REPARSE_PATH to cli_rename_send().

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

Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Uri Simchoni <uri@samba.org>
(cherry picked from commit ae7047923e756d7ee1d760b7495560c25c71b523)

7 years agos3: libsmb: Plumb in additional_flags2 = FLAGS2_REPARSE_PATH to cli_qpathinfo_send()
Jeremy Allison [Thu, 18 Aug 2016 20:17:49 +0000 (13:17 -0700)]
s3: libsmb: Plumb in additional_flags2 = FLAGS2_REPARSE_PATH to cli_qpathinfo_send()

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

Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Uri Simchoni <uri@samba.org>
(cherry picked from commit 21a7bf428bb8ed5b5634b87896bf0aa6c095d7f6)

7 years agos3: libsmb: Plumb in additional_flags2 = FLAGS2_REPARSE_PATH to cli_setpathinfo_send().
Jeremy Allison [Thu, 18 Aug 2016 20:12:22 +0000 (13:12 -0700)]
s3: libsmb: Plumb in additional_flags2 = FLAGS2_REPARSE_PATH to cli_setpathinfo_send().

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

Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Uri Simchoni <uri@samba.org>
(cherry picked from commit 75e4290b6055cf95fc4730c4fa431bcc91eed203)

7 years agos3: libsmb: Add clistr_is_previous_version_path()
Jeremy Allison [Thu, 18 Aug 2016 20:06:54 +0000 (13:06 -0700)]
s3: libsmb: Add clistr_is_previous_version_path()

Looks for @GMT- token in pathname.

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

Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Uri Simchoni <uri@samba.org>
(cherry picked from commit 19696f3494bd944ac9226aeebebb7a00df6f53b4)

7 years agos3: libsmb: Add uint16_t addtional_flags2 to cli_smb_req_create().
Jeremy Allison [Thu, 18 Aug 2016 20:45:35 +0000 (13:45 -0700)]
s3: libsmb: Add uint16_t addtional_flags2 to cli_smb_req_create().

Not yet used.

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

Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Uri Simchoni <uri@samba.org>
(cherry picked from commit 79c8b756715d021f12474a12eca1efb596f92a84)