Nadezhda Ivanova [Mon, 14 Oct 2013 09:38:10 +0000 (12:38 +0300)]
s4-samldb: Do not allow deletion of objects with RID < 1000
According to [MS-SAMR] 3.1.5.7 Delete Pattern we should not allow deletion
of security objects with RID < 1000. This patch will prevent deletion of
well-known accounts and groups.
Signed-off-by: Nadezhda Ivanova <nivanova@symas.com>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Autobuild-User(master): Nadezhda Ivanova <nivanova@samba.org>
Autobuild-Date(master): Mon Oct 14 13:31:50 CEST 2013 on sn-devel-104
Volker Lendecke [Sun, 13 Oct 2013 10:20:29 +0000 (12:20 +0200)]
libcli4: Remove an unused variable
Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
Autobuild-User(master): Stefan Metzmacher <metze@samba.org>
Autobuild-Date(master): Sun Oct 13 17:58:23 CEST 2013 on sn-devel-104
Volker Lendecke [Thu, 26 Sep 2013 21:42:59 +0000 (14:42 -0700)]
smbd: Remove unused create_options from open_mode_check
Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
Autobuild-User(master): Stefan Metzmacher <metze@samba.org>
Autobuild-Date(master): Sun Oct 13 14:35:26 CEST 2013 on sn-devel-104
Volker Lendecke [Thu, 26 Sep 2013 21:35:15 +0000 (14:35 -0700)]
smbd: Remove name_hash param from open_mode_check
This came from delete_on_close handling which was factored out.
Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
Christof Schmitt [Fri, 11 Oct 2013 22:24:53 +0000 (15:24 -0700)]
s3/time_audit: Add offline and durable functions
Signed-off-by: Christof Schmitt <cs@samba.org>
Reviewed-by: Volker Lendecke <vl@samba.org>
Autobuild-User(master): Volker Lendecke <vl@samba.org>
Autobuild-Date(master): Sat Oct 12 13:00:02 CEST 2013 on sn-devel-104
Christof Schmitt [Fri, 11 Oct 2013 22:22:13 +0000 (15:22 -0700)]
vfs: Fix parentheses in SMB_VFS_NEXT_DURABLE_COOKIE
Signed-off-by: Christof Schmitt <cs@samba.org>
Reviewed-by: Volker Lendecke <vl@samba.org>
Volker Lendecke [Thu, 26 Sep 2013 01:41:07 +0000 (18:41 -0700)]
smbd: Fix the extended *.oplock.doc1 tests
We need to check for DELETE_PENDING before the first oplock break
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): Sat Oct 12 01:56:18 CEST 2013 on sn-devel-104
Volker Lendecke [Thu, 26 Sep 2013 06:04:50 +0000 (23:04 -0700)]
torture: Extend the smb2.oplock.doc1 test
If delete_on_close is set, there is no oplock break. Check that.
Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
Volker Lendecke [Thu, 26 Sep 2013 02:00:57 +0000 (19:00 -0700)]
torture: Extend the raw.oplock.doc1 test
If delete_on_close is set, there is no oplock break. Check that.
Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
Andreas Schneider [Thu, 10 Oct 2013 16:23:42 +0000 (18:23 +0200)]
ntdb: Make sure variables passed by value are initialized.
This fixes a GCC warning.
Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Alexander Bokovoy <ab@samba.org>
Autobuild-User(master): Andreas Schneider <asn@cryptomilk.org>
Autobuild-Date(master): Fri Oct 11 18:05:19 CEST 2013 on sn-devel-104
Volker Lendecke [Fri, 11 Oct 2013 09:59:25 +0000 (11:59 +0200)]
pidl: fix an error message typo
Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
Andreas Schneider [Thu, 10 Oct 2013 08:03:32 +0000 (10:03 +0200)]
s3-winbind: Send online/offline message of the domain to the parent.
https://bugzilla.samba.org/show_bug.cgi?id=10194
Signed-off-by: Andreas Schneider <asn@cryptomilk.org>
Reviewed-by: Volker Lendecke <vl@samba.org>
Autobuild-User(master): Volker Lendecke <vl@samba.org>
Autobuild-Date(master): Fri Oct 11 13:37:56 CEST 2013 on sn-devel-104
Andreas Schneider [Thu, 10 Oct 2013 08:02:27 +0000 (10:02 +0200)]
s3-winbind: Register handlers for domain online/offline messages.
BUG: https://bugzilla.samba.org/show_bug.cgi?id=10194
Signed-off-by: Andreas Schneider <asn@cryptomilk.org>
Reviewed-by: Volker Lendecke <vl@samba.org>
Andreas Schneider [Thu, 10 Oct 2013 08:01:40 +0000 (10:01 +0200)]
s3-winbind: Add functions for domain online/offline handling.
BUG: https://bugzilla.samba.org/show_bug.cgi?id=10194
Signed-off-by: Andreas Schneider <asn@cryptomilk.org>
Reviewed-by: Volker Lendecke <vl@samba.org>
Andreas Schneider [Thu, 10 Oct 2013 07:15:57 +0000 (09:15 +0200)]
idl: Add a new message for winbind domain states.
BUG: https://bugzilla.samba.org/show_bug.cgi?id=10194
Signed-off-by: Andreas Schneider <asn@cryptomilk.org>
Reviewed-by: Volker Lendecke <vl@samba.org>
Andrew Bartlett [Sun, 8 Sep 2013 23:54:23 +0000 (11:54 +1200)]
samba-tool domain join subdomain: Rework sambadns.py to allow setup of DomainDNSZone only
This skips handling the ForestDNSZone when we are setting up a subdomain.
Andrew Bartlett
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): Fri Oct 11 10:27:49 CEST 2013 on sn-devel-104
Andrew Bartlett [Thu, 26 Sep 2013 00:09:30 +0000 (17:09 -0700)]
join.py: Reconnect to the DC based on the DC name in dnsHostName to allow connection to IPC$
The treeConnect&X of the GUID name fails against Windows 2003.
Andrew Bartlett
Signed-off-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
Andrew Bartlett [Thu, 10 Oct 2013 20:47:29 +0000 (09:47 +1300)]
join.py: Remove special full_ncs handling, we only need to updateRefs on an NC we replicate
Signed-off-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
Andrew Bartlett [Thu, 10 Oct 2013 20:37:41 +0000 (09:37 +1300)]
join.py: Use ctx.forestdns_zone variable
Signed-off-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
Andrew Bartlett [Thu, 10 Oct 2013 20:36:53 +0000 (09:36 +1300)]
join.py: Correct ctx.forestdns_zone and so remove the need for duplicate repl.replicate() call
Signed-off-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
Andrew Bartlett [Thu, 26 Sep 2013 17:19:18 +0000 (10:19 -0700)]
provision: Remove --username and --password options from samba-tool domain provision
This avoids confusion, because the LDAP backend does not use these,
and they do not set the password for the administrator account either!
This may break support for the 'existing' backend LDAP backend, but
that is nothing more than a stub for future development anyway, and
new work in this area should use EXTERNAL in any case.
Signed-off-by: Andrew Bartlett <abartlet@samba.org>
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
Stefan Metzmacher [Wed, 9 Oct 2013 07:37:52 +0000 (09:37 +0200)]
provision/sambadns: CN=MicrosoftDNS,CN=System, is relative to DOMAINDN
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Autobuild-User(master): Stefan Metzmacher <metze@samba.org>
Autobuild-Date(master): Thu Oct 10 10:24:55 CEST 2013 on sn-devel-104
Andrew Bartlett [Thu, 26 Sep 2013 03:28:42 +0000 (20:28 -0700)]
provision: Fix comment to refer to correct file (krb5.conf)
Signed-off-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
Andrew Bartlett [Thu, 26 Sep 2013 00:09:58 +0000 (17:09 -0700)]
dsdb: Provide a clearer error when we fail to store the sequence number in metadata.tdb
Signed-off-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
Stefan Metzmacher [Tue, 24 Sep 2013 23:30:23 +0000 (01:30 +0200)]
ldb:rdn_name: reject 'distinguishedName' depending of the MOD flags
This is what Windows 2008 R2 returns:
LDB_MOD_ADD => LDB_ERR_UNWILLING_TO_PERFORM
LDB_MOD_REPLACE => LDB_ERR_CONSTRAINT_VIOLATION
LDB_MOD_DEL => LDB_ERR_UNWILLING_TO_PERFORM
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Stefan Metzmacher [Mon, 23 Sep 2013 01:39:58 +0000 (03:39 +0200)]
dsdb/tests/ldap: fix test_distinguished_name against w2k8r2
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Stefan Metzmacher [Tue, 24 Sep 2013 22:49:19 +0000 (00:49 +0200)]
s4:dsdb/rootdse: report 'dnsHostName' instead of 'dNSHostName'
The attribute on the RootDSE object is called 'dnsHostName'
instead of 'dNSHostName' (which is used in the schema and on
all other directory objects).
Bug: https://bugzilla.samba.org/show_bug.cgi?id=10193
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Stefan Metzmacher [Sun, 22 Sep 2013 21:40:12 +0000 (23:40 +0200)]
dsdb/tests/ldap: fix test_ldapServiceName against w2k8r2
Bug: https://bugzilla.samba.org/show_bug.cgi?id=10193
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Günther Deschner [Wed, 9 Oct 2013 15:47:29 +0000 (17:47 +0200)]
libndr: Avoid ommitting display of unset bitmap flags.
In
816e68f94fe500b9d68fd29021d432b84d3139b7 the display of unset bits has been
effectively disabled while only the check for 0 bits was supposed to be avoided
(because it creates the infite loop).
Guenther
Signed-off-by: Günther Deschner <gd@samba.org>
Reviewed-by: Volker Lendecke <vl@samba.org>
Autobuild-User(master): Günther Deschner <gd@samba.org>
Autobuild-Date(master): Wed Oct 9 19:56:39 CEST 2013 on sn-devel-104
Matthieu Patou [Tue, 8 Oct 2013 19:23:21 +0000 (12:23 -0700)]
pidl-wireshark: fix the trailling white space in the generated headers
Signed-off-by: Matthieu Patou <mat@matws.net>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
Autobuild-User(master): Stefan Metzmacher <metze@samba.org>
Autobuild-Date(master): Wed Oct 9 10:31:25 CEST 2013 on sn-devel-104
Matthieu Patou [Tue, 8 Oct 2013 19:22:18 +0000 (12:22 -0700)]
pidl-wireshark: fix trailing white space in the HF definition
Signed-off-by: Matthieu Patou <mat@matws.net>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
Jeremy Allison [Tue, 8 Oct 2013 22:01:38 +0000 (15:01 -0700)]
Fix bug #10187 - Missing talloc_free can leak stackframe in error path.
Fix error path.
Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: David Disseldorp <ddiss@samba.org>
Autobuild-User(master): David Disseldorp <ddiss@samba.org>
Autobuild-Date(master): Wed Oct 9 03:50:56 CEST 2013 on sn-devel-104
Volker Lendecke [Mon, 7 Oct 2013 20:13:28 +0000 (20:13 +0000)]
smbd: Fix an error path in open_directory
In open_file_ntcreate we do the del_share_mode on error. We should do
it here as well.
Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
Autobuild-User(master): Jeremy Allison <jra@samba.org>
Autobuild-Date(master): Wed Oct 9 01:58:55 CEST 2013 on sn-devel-104
Volker Lendecke [Mon, 16 Sep 2013 21:02:48 +0000 (14:02 -0700)]
smbd: Simplify set_share_mode
With the find_share_mode simplification we don't need fill_share_mode anymore.
So this coalesces add_share_mode as well.
Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
Volker Lendecke [Mon, 16 Sep 2013 20:58:54 +0000 (13:58 -0700)]
smbd: Simplify find_share_mode_entry callers
All callers used fill_share_mode_entry before calling
find_share_mode_entry. Remove that requirement.
Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
Volker Lendecke [Sat, 14 Sep 2013 11:49:14 +0000 (13:49 +0200)]
smbd: Convert set_share_mode to return bool for success
Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
Volker Lendecke [Sat, 14 Sep 2013 11:48:03 +0000 (13:48 +0200)]
smbd: Make add_share_mode return bool
Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
Volker Lendecke [Thu, 26 Sep 2013 01:39:27 +0000 (18:39 -0700)]
smbd: Change parameter from unsigned to uint32_t
share_mode_stale_pid internally only has to deal with uint32_t. Make
the parameter match this.
Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
Günther Deschner [Tue, 8 Oct 2013 12:52:57 +0000 (14:52 +0200)]
lib/util: remove unused (and not even compiled) lib/util/capability.c.
Guenther
Signed-off-by: Günther Deschner <gd@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
Autobuild-User(master): Andreas Schneider <asn@cryptomilk.org>
Autobuild-Date(master): Tue Oct 8 17:32:59 CEST 2013 on sn-devel-104
Matthieu Patou [Sun, 6 Oct 2013 08:31:35 +0000 (01:31 -0700)]
Remove check_col from generated DCE/RPC dissectors.
This is a backport of
http://anonsvn.wireshark.org/viewvc?view=revision&revision=52313
Bug 8804 (https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=8804).
Signed-off-by: Matthieu Patou <mat@matws.net>
Reviewed-by: Andrew Bartlett <abartlett@samba.org>
Autobuild-User(master): Matthieu Patou <mat@samba.org>
Autobuild-Date(master): Mon Oct 7 08:09:51 CEST 2013 on sn-devel-104
Volker Lendecke [Wed, 11 Sep 2013 11:54:37 +0000 (11:54 +0000)]
smbd: Remove byte_range_lock->read_only
With the rewritten brl_get_lock_readonly we only set the destructor for
r/w lock records anyway.
Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
Autobuild-User(master): Stefan Metzmacher <metze@samba.org>
Autobuild-Date(master): Sun Oct 6 22:20:05 CEST 2013 on sn-devel-104
Volker Lendecke [Wed, 11 Sep 2013 11:53:26 +0000 (11:53 +0000)]
smbd: Remove the brl_get_locks wrapper
Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
Volker Lendecke [Wed, 11 Sep 2013 11:51:44 +0000 (11:51 +0000)]
smbd: brl_get_locks_internal is always called r/w now
Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
Volker Lendecke [Wed, 11 Sep 2013 11:36:54 +0000 (11:36 +0000)]
smbd: Restructure brl_get_locks_readonly
This is step 1 to get rid of brl_get_locks_internal with its complex readonly
business. It also optimizes 2 things: First, it uses dbwrap_parse_record to
avoid a talloc and memcpy, and second it uses talloc_pooled_object.
And -- hopefully it is easier to understand the caching logic with
fsp->brlock_rec and the clustering escape.
Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
Volker Lendecke [Wed, 11 Sep 2013 10:17:05 +0000 (10:17 +0000)]
smbd: Avoid an if-statement per read/write in the non-clustered case
Without clustering, fsp->brlock_rec will never be set anyway. In the
clustering case we can't use the seqnum trick, so this is slow enough
that the additional if-statement does not matter in this case anyway. In
the non-clustered case it might. Have not measured it, but every little
bit helps I guess.
Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
Volker Lendecke [Wed, 11 Sep 2013 09:31:36 +0000 (09:31 +0000)]
smbd: Remove unused "brl->key" struct element
Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
Autobuild-User(master): Stefan Metzmacher <metze@samba.org>
Autobuild-Date(master): Sun Oct 6 15:49:43 CEST 2013 on sn-devel-104
Volker Lendecke [Mon, 16 Sep 2013 02:18:41 +0000 (19:18 -0700)]
smbd: Convert some dbgtxt to DEBUG
Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
Volker Lendecke [Fri, 27 Sep 2013 04:27:42 +0000 (21:27 -0700)]
torture: Remove an unused variable
Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
Volker Lendecke [Fri, 27 Sep 2013 04:21:21 +0000 (21:21 -0700)]
torture: Continue buffer check after NOT_IMPLEMENTED infolevels
Patch from the SDC plugfest. Not every implementation supports every
infolevel, and we want to be able to test buffersize error behaviour
for all supported infolevels
Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
Volker Lendecke [Fri, 27 Sep 2013 00:10:50 +0000 (17:10 -0700)]
libcli: Correct smb2_lease_pull
We don't really use leases yet, so so far this went by unnoticed. It's
the V2 lease requests that hold the parent lease key, not the V1 ones.
Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
Volker Lendecke [Wed, 21 Aug 2013 10:27:43 +0000 (10:27 +0000)]
libcli: Add const to smb2_lease_pull
Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
Volker Lendecke [Mon, 23 Sep 2013 00:19:09 +0000 (17:19 -0700)]
torture: Fix a typo
Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
Volker Lendecke [Wed, 2 Oct 2013 15:20:16 +0000 (15:20 +0000)]
smbd: Fix a comment
This has been converted from a timed event to an immediate one in
e7dab403c0ca6f6
Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
Volker Lendecke [Tue, 3 Sep 2013 13:31:27 +0000 (13:31 +0000)]
smbd: Fix confusing comments
The brlock-check is done in grant_fsp_oplock_type
Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
Volker Lendecke [Mon, 23 Sep 2013 02:16:56 +0000 (19:16 -0700)]
smbd: Avoid calling serverid_exists twice
Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
Michael Adam [Fri, 4 Oct 2013 10:39:57 +0000 (12:39 +0200)]
smbd:smb2: clarify and comment code treating dh2c blob check.
This makes the code that checks for extra create blobs in the
case of the dh2c blob look very similar to the corresponding
(slightly mode complex) code for the dhnc blob.
With this preparation it will be easier and more obvious how
to add proper treatment of the lease request blobs when leases
get implemented.
Signed-off-by: Michael Adam <obnox@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
Autobuild-User(master): Stefan Metzmacher <metze@samba.org>
Autobuild-Date(master): Sat Oct 5 15:56:11 CEST 2013 on sn-devel-104
Michael Adam [Thu, 26 Sep 2013 05:48:42 +0000 (07:48 +0200)]
smbd:smb2: ignore an dhnq blob along with a dhnc in create
This is according to MS-SMB2, 3.3.5.9.7
"Handling the SMB2_CREATE_DURABLE_HANDLE_RECONNECT Create Context"
Signed-off-by: Michael Adam <obnox@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
Michael Adam [Wed, 25 Sep 2013 18:39:17 +0000 (20:39 +0200)]
smbd:smb2_create: fix return code for durable handle create blob combinations
According to MS-SMB2:
3.3.5.9.7 Handling the SMB2_CREATE_DURABLE_HANDLE_RECONNECT Create Context
3.3.5.9.12 Handling the SMB2_CREATE_DURABLE_HANDLE_RECONNECT_V2 Create Context
and verified by test results.
Signed-off-by: Michael Adam <obnox@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
Michael Adam [Thu, 26 Sep 2013 05:00:33 +0000 (07:00 +0200)]
s4:torture:smb2: add durable-v2-open.reopen2c
- create durable with v1 request
- reconnect with v2 reconnect request
==> fails
Signed-off-by: Michael Adam <obnox@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
Michael Adam [Thu, 26 Sep 2013 04:06:01 +0000 (06:06 +0200)]
s4:torture:smb2: add durable-v2-open.reopen2b
- connect with durable v2
- reconnect with durable v1
=> succeeds
Signed-off-by: Michael Adam <obnox@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
Michael Adam [Thu, 26 Sep 2013 03:47:47 +0000 (05:47 +0200)]
s4:torture:smb2: add durable-v2-open.create-blob
test various combinations of durable create and reconnect
request blobs, according to
MS-SMB2, 3.3.5.9.12:
"Handling the SMB2_CREATE_DURABLE_HANDLE_RECONNECT_V2 Create Context"
Signed-off-by: Michael Adam <obnox@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
Michael Adam [Thu, 26 Sep 2013 03:35:19 +0000 (05:35 +0200)]
s4:torture:smb2: extend the durable-open.reopen2 test
Add tests for:
- filename and many other things don't matter in reconnect
- additionally specified DHnQ request blob is ignored.
Signed-off-by: Michael Adam <obnox@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
Michael Adam [Thu, 26 Sep 2013 03:12:02 +0000 (05:12 +0200)]
s4:torture:smb2: extend the durable-v2-open.reopen2 test
Signed-off-by: Michael Adam <obnox@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
Michael Adam [Wed, 25 Sep 2013 21:20:18 +0000 (23:20 +0200)]
smbd:smb2: successfully answer a DHnC request when the initial create was DH2Q
I.e. the durable reconnect attempt is v1 while the original create was durable
v2 including the create guid.
Implement this by skipping the create_guid verification when
the reconnect request is v1.
Signed-off-by: Michael Adam <obnox@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
Michael Adam [Wed, 25 Sep 2013 18:40:11 +0000 (20:40 +0200)]
smbd:smb2_create: add comment about validity of check reconnect blob being only one
With leases this will not be true any more.
Signed-off-by: Michael Adam <obnox@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
Michael Adam [Wed, 25 Sep 2013 16:31:10 +0000 (18:31 +0200)]
s4:torture:smb2: add a durable-open.reopen-lease-v2 test
like durable-open.reopen2-lease but with v2 lease requets
Signed-off-by: Michael Adam <obnox@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
Michael Adam [Tue, 24 Sep 2013 21:21:37 +0000 (23:21 +0200)]
s4:torture:smb2: add durable-v2-open.reopen2-lease-v2
lease v2 variant of the reopen2 test.
Test various success and failure cases.
Signed-off-by: Michael Adam <obnox@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
Michael Adam [Tue, 24 Sep 2013 21:09:18 +0000 (23:09 +0200)]
s4:torture:smb2: add smb2_lease_v2_create() wrapper to smb2_lease_v2_create_share()
that sets share all. similar to smb2_lease_create()
Signed-off-by: Michael Adam <obnox@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
Michael Adam [Tue, 24 Sep 2013 21:20:39 +0000 (23:20 +0200)]
s4:torture:smb2: add durable-v2-open.reopen2-lease
lease v1 variant of the reopen2 test
Signed-off-by: Michael Adam <obnox@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
Michael Adam [Tue, 24 Sep 2013 21:08:24 +0000 (23:08 +0200)]
s4:torture:smb2: add durable-open.reopen2-lease test
lease-variant of the reopen2 test
Signed-off-by: Michael Adam <obnox@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
Michael Adam [Tue, 24 Sep 2013 23:25:49 +0000 (01:25 +0200)]
s4:torture:smb2: fix durable-open lease tests to pass against windows.
Fix is: reconnect with same client-guid as on the first connection.
Signed-off-by: Michael Adam <obnox@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
Michael Adam [Wed, 25 Sep 2013 05:20:30 +0000 (07:20 +0200)]
s4:torture:smb2: add smbcli_options argument to torture_smb2_connection_ext()
Signed-off-by: Michael Adam <obnox@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
Michael Adam [Wed, 25 Sep 2013 05:16:39 +0000 (07:16 +0200)]
s4:libcli:smb2: make smbcli_options argument to smb2_connect_(send|ext) const
Signed-off-by: Michael Adam <obnox@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
Michael Adam [Wed, 25 Sep 2013 04:57:23 +0000 (06:57 +0200)]
s4:libcli:smb2: add the smb2_capabilities to the smbcli_options
and initialize them in lpcfg_smbcli_options() instead of
in smb2_transport_init() as previously.
This will allow us to control them from callers later.
Signed-off-by: Michael Adam <obnox@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
Michael Adam [Wed, 25 Sep 2013 04:46:47 +0000 (06:46 +0200)]
s4:libcli:smb2: add the client_guid to the smbcli_options
and initialize it in lpcfg_smbcli_options() instead of
in smb2_transport_init() as previously.
Having the client guid in the smbcli_options will allow
us to control them from callers later.
Signed-off-by: Michael Adam <obnox@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
Michael Adam [Wed, 25 Sep 2013 04:21:38 +0000 (06:21 +0200)]
s4:torture:spoolss: use smb2_connect() instead of smb2_connet_ext()
in print_test_smbd: we don't need to pass the previous_session_id.
Signed-off-by: Michael Adam <obnox@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
Michael Adam [Mon, 23 Sep 2013 20:55:55 +0000 (22:55 +0200)]
s4:torture:smb2: fix a comment in the durable-open.lock-oplock test
Signed-off-by: Michael Adam <obnox@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
Brian Martin [Thu, 26 Sep 2013 00:01:24 +0000 (17:01 -0700)]
samba_backup: fix bug, add command line parameter, improve error messages
Also remove .bak suffix from tdb/ldb backups for more consistent restore procedures
Reviewed-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Matthieu Patou <mat@matws.net>
Autobuild-User(master): Andrew Bartlett <abartlet@samba.org>
Autobuild-Date(master): Sat Oct 5 13:51:34 CEST 2013 on sn-devel-104
Michael Adam [Thu, 30 May 2013 22:46:01 +0000 (00:46 +0200)]
shadow_copy2: use stored mount_point instead of recalculating.
In the case of snapdirseverywhere but NOT crossmountpoints.
This spares stat calls.
And is the only correct thing to do if the mount point was
specified in the configuration.
Signed-off-by: Michael Adam <obnox@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Michael Adam [Thu, 30 May 2013 22:45:16 +0000 (00:45 +0200)]
shadow_copy2: improve debug in shadow_copy2_convert() in snapdirseverywhere mode
Signed-off-by: Michael Adam <obnox@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Michael Adam [Thu, 23 May 2013 14:23:03 +0000 (16:23 +0200)]
shadow_copy2: fix shadow_copy2_convert() in the classical case.
I.e. the non-snapdirseverywhere case.
This in particular fixes the case of a snapdir hierarchy
that is parallel to the share or mountpoint and not subordinate.
Signed-off-by: Michael Adam <obnox@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Michael Adam [Wed, 29 May 2013 13:06:22 +0000 (15:06 +0200)]
shadow_copy2: add some blank lines for visual separation to shadow_copy2_convert()
Signed-off-by: Michael Adam <obnox@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Michael Adam [Tue, 28 May 2013 14:59:25 +0000 (16:59 +0200)]
shadow_copy2: initialize "converted" string to null in shadow_copy2_convert()
Signed-off-by: Michael Adam <obnox@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Michael Adam [Wed, 29 May 2013 15:16:23 +0000 (17:16 +0200)]
shadow_copy2: fix shadow_copy2_strip_snapshot() in the classical case
I.e., fix detection of already converted names.
This is done by using the shadow_copy2_snapshot_path() function
and comparing if the input string starts with that.
Signed-off-by: Michael Adam <obnox@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Michael Adam [Wed, 29 May 2013 21:57:30 +0000 (23:57 +0200)]
shadow_copy2: add some debug to shadow_copy2_strip_snapshot()
Signed-off-by: Michael Adam <obnox@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Michael Adam [Wed, 29 May 2013 15:14:49 +0000 (17:14 +0200)]
shadow_copy2: add comments explaining decisions in shadow_copy2_strip_snapshot()
This should make it more easy to understand what the cases are.
Signed-off-by: Michael Adam <obnox@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Michael Adam [Thu, 30 May 2013 22:18:52 +0000 (00:18 +0200)]
shadow_copy2: introduce shadow_copy2_snapshot_path()
This builds the posix snapshot path for the connection
at the provided timestamp. For the non-snapdirseverywhere case.
Signed-off-by: Michael Adam <obnox@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Michael Adam [Thu, 30 May 2013 21:51:02 +0000 (23:51 +0200)]
shadow_copy2: factor shadow_copy2_posix_gmt_string() out of shadow_copy2_insert_string()
for re-use..
Signed-off-by: Michael Adam <obnox@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Michael Adam [Wed, 29 May 2013 15:12:21 +0000 (17:12 +0200)]
shadow_copy2: shadow_copy2_insert_string(): do not prepend a "/" in absolute mode
Signed-off-by: Michael Adam <obnox@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Michael Adam [Tue, 28 May 2013 15:01:20 +0000 (17:01 +0200)]
shadow_copy2: make shadow_copy2_find_snapdir() return const char *
instead of char *. This eliminates compiler warnings.
snapdir is a const string in all occasions.
Signed-off-by: Michael Adam <obnox@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Michael Adam [Thu, 23 May 2013 14:21:46 +0000 (16:21 +0200)]
shadow_copy2: in the classical case, use configured path in shadow_copy2_find_snapdir()
There is no point in searching for snapdir if not in snapdirseverywhere mode.
Signed-off-by: Michael Adam <obnox@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Michael Adam [Sat, 1 Jun 2013 00:14:41 +0000 (02:14 +0200)]
shadow_copy2: implement disk_free
Signed-off-by: Michael Adam <obnox@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Michael Adam [Fri, 31 May 2013 15:17:27 +0000 (17:17 +0200)]
shadow_copy2: log resulting config at the end of shadow_copy2_connect()
Signed-off-by: Michael Adam <obnox@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Michael Adam [Thu, 3 Oct 2013 22:07:15 +0000 (00:07 +0200)]
shadow_copy2: add snapshot_basepath to the config.
This is the absolute version of snapdir.
Signed-off-by: Michael Adam <obnox@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Michael Adam [Thu, 3 Oct 2013 22:04:06 +0000 (00:04 +0200)]
shadow_copy2: add rel_connectpath to config.
This is the share root, relative to the basedir.
Signed-off-by: Michael Adam <obnox@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Michael Adam [Fri, 31 May 2013 14:36:33 +0000 (16:36 +0200)]
shadow_copy2: introduce "shadow:mountpoint" option
Possiblity to explicitly set the share's mount point.
This is useful mainly for debugging and testing purposes.
Signed-off-by: Michael Adam <obnox@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Michael Adam [Thu, 30 May 2013 15:26:44 +0000 (17:26 +0200)]
shadow_copy2: re-add the basedir option.
Disable basedir if it is not an absolute path or if
snapdirseverywhere or crossmountpoints is enabled.
Pair-Programmed-With: Björn Baumbach <bb@sernet.de>
Signed-off-by: Michael Adam <obnox@samba.org>
Signed-off-by: Björn Baumbach <bb@sernet.de>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Michael Adam [Thu, 30 May 2013 11:19:50 +0000 (13:19 +0200)]
shadow_copy2: disable "snapdir:crossmountpoints" if the snapdir is absolute.
Signed-off-by: Michael Adam <obnox@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Michael Adam [Wed, 29 May 2013 15:10:51 +0000 (17:10 +0200)]
shadow_copy2: introduce the bool "snapdir_absolute" in the config.
Not exposed but to be used internally.
Signed-off-by: Michael Adam <obnox@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Michael Adam [Thu, 23 May 2013 23:35:44 +0000 (01:35 +0200)]
shadow_copy2: introduce config struct and function shadow_copy2_connect()
This moves the parsing of the config to a central place.
So users of configuation don't need to call lp_parm_... all the time.
Signed-off-by: Michael Adam <obnox@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>