IF YOU WOULD LIKE TO GET AN ACCOUNT, please write an
email to Administrator. User accounts are meant only to access repo
and report issues and/or generate pull requests.
This is a purpose-specific Git hosting for
BaseALT
projects. Thank you for your understanding!
Только зарегистрированные пользователи имеют доступ к сервису!
Для получения аккаунта, обратитесь к администратору.
Pair-Programmed-With: Stefan Metzmacher <metze@samba.org>
Signed-off-by: Anubhav Rakshit <anubhav.rakshit@gmail.com>
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Michael Adam <obnox@samba.org>
Pair-Programmed-With: Stefan Metzmacher <metze@samba.org>
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Signed-off-by: Anubhav Rakshit <anubhav.rakshit@gmail.com>
Reviewed-by: Michael Adam <obnox@samba.org>
Attempt to punch holes in a file using FSCTL_SET_ZERO_DATA. Check that
the resulting data is zeroed. Also confirm that when the file is marked
sparse, the zeroed range is no longer allocated.
Finally, check that removing the sparse flag causes any holes to be
unsparsed.
Signed-off-by: David Disseldorp <ddiss@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
Autobuild-User(master): Jeremy Allison <jra@samba.org>
Autobuild-Date(master): Mon Sep 8 21:40:34 CEST 2014 on sn-devel-104
Add a test and helper function for FSCTL_QUERY_ALLOCATED_RANGES
requests.
Signed-off-by: David Disseldorp <ddiss@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
This allows for patterned writes after file creation, as needed for
sparse file integrity testing.
Signed-off-by: David Disseldorp <ddiss@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
This test checks for the following MS-FSCC 2.3.63 behaviour:
If there is no data element, the sparse flag for the file is set,
exactly as if the FILE_SET_SPARSE_BUFFER element was supplied and had a
SetSparse value of TRUE.
Signed-off-by: David Disseldorp <ddiss@samba.org>
Reviewed-by: Jeremy Allson <jra@samba.org>
Expect STATUS_INVALID_PARAMETER, as is returned by Windows Server 2012
and 2008. Samba is currently broken, in that it currently processes the
request and sets the sparse DOS attribute on the directory - fix to
follow.
Signed-off-by: David Disseldorp <ddiss@samba.org>
Reviewed-by: Jeremy Allson <jra@samba.org>
Check that the FILE_ATTRIBUTE_SPARSE is set following FSCTL_SET_SPARSE.
Also confirm that adding the attribute on create doesn't carry through
to subsequent SMB2_GETINFO_FILE requests.
Signed-off-by: David Disseldorp <ddiss@samba.org>
Reviewed-by: Jeremy Allson <jra@samba.org>
Add a utility function that takes an option name as parameter and then
uses the value of the option 'torture:NAME' as share name in a tree
connect.
Signed-off-by: Ralph Boehme <rb@sernet.de>
Reviewed-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Volker Lendecke <vl@samba.org>
If we have more than one lock and there is any blocking lock, we need
to fail with NT_STATUS_INVALID_PARAMETER. At a quick glance I did not
find this tested, so add it.
Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
An invalid impersonation level is only allowed for durable handle reopen.
Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Ira Cooper <ira@samba.org>
Autobuild-User(master): Jeremy Allison <jra@samba.org>
Autobuild-Date(master): Wed Jun 18 09:42:43 CEST 2014 on sn-devel-104
This adds a check to ensure that the create time returned in the SMB2
create response matches the value found in the find response.
Signed-off-by: David Disseldorp <ddiss@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
Autobuild-User(master): Jeremy Allison <jra@samba.org>
Autobuild-Date(master): Fri May 23 22:42:24 CEST 2014 on sn-devel-104
[Bug 10344] SessionLogoff on a signed connection with an outstanding notify request crashes smbd.
https://bugzilla.samba.org/show_bug.cgi?id=10344
Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
Autobuild-User(master): Jeremy Allison <jra@samba.org>
Autobuild-Date(master): Wed Mar 12 20:12:58 CET 2014 on sn-devel-104
[Bug 10344] SessionLogoff on a signed connection with an outstanding notify request crashes smbd.
https://bugzilla.samba.org/show_bug.cgi?id=10344
Pair-Programmed-With: Stefan Metzmacher <metze@samba.org>
Signed-off-by: Jeremy Allison <jra@samba.org>
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Windows Server 2012 returns NT_STATUS_INVALID_PARAMETER for
FSCTL_SRV_COPYCHUNK requests that include a server-side copy length of
zero, in line with MS-SMB2 3.3.5.15.6.
We should match this behaviour, so test for it.
Signed-off-by: David Disseldorp <ddiss@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
We currently don't support durable handles with delete-on-close:
with delete-on-close, we close a durable handle with delete-on-close
set upon disconnect.
This patch adapts the test to behave accordingly,
i.e. don't use delete-on-close...
Signed-off-by: Michael Adam <obnox@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
- open session1 on tcp connection conn1
- open a durable handle on a session1
- do a session reconnect on a new tcp connection conn2
- doing a durable reconnect on session1 gives
USER_SESSION_DELETED
- doing a durable reconnect on session2 succeeds
Signed-off-by: Michael Adam <obnox@samba.org>
Reviewed-by: David Disseldorp <ddiss@samba.org>
Autobuild-User(master): David Disseldorp <ddiss@samba.org>
Autobuild-Date(master): Fri Dec 6 15:59:15 CET 2013 on sn-devel-104
- open session1 on tcp connection conn1
- open a durable handle on a session1
- do a session reconnect on a new tcp connection conn2
- doing a durable reconnect on session1 gives
USER_SESSION_DELETED
- doing a durable reconnect on session2 succeeds
Signed-off-by: Michael Adam <obnox@samba.org>
Reviewed-by: David Disseldorp <ddiss@samba.org>
Windows Server 2012[r2] exhibits some strange behaviour with regard
to handling the compression fsctls.
[READ/WRITE]_ATTR permissions are not required for the corresponding
get/set compression ioctls. WRITE_DATA is required for set compression.
Signed-off-by: David Disseldorp <ddiss@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
Autobuild-User(master): Jeremy Allison <jra@samba.org>
Autobuild-Date(master): Fri Nov 22 19:57:48 CET 2013 on sn-devel-104
Doing so should give a successful SetInfo response, however the
attribute should not be set in subsequent GetInfo / ioctl responses.
Signed-off-by: David Disseldorp <ddiss@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
Also add a note reguarding Windows 2008GM copy-chunk note:
Windows 2008GM (non-R2) fails the copy-chunk src=dest overlap test, as
it appears to use a different chunk copy algorithm to 208R2.
Takeaway advice is to avoid using copy-chunk when the source and
destination ranges overlap in the same file.
Signed-off-by: David Disseldorp <ddiss@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
NTTIME has a nanosecond resolution. We should be tolerate if the system
is busy writing and reading the value. To reproduce this problem just
run the test under valgrind.
Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: David Disseldorp <ddiss@samba.org>
Test what upgrades work when there is another lease already held,
in addition to the lease to be upgraded.
The summary of the behaviour is this:
-------------------------------------
If we have two leases (lease1 and lease2) on the same file,
then attempt to upgrade lease1 results in a change if and only
if the requested lease state:
- is valid,
- is strictly a superset of lease1, and
- can held together with lease2.
In that case, the resuling lease state of the upgraded lease1
is the state requested in the upgrade. lease2 is not broken
and remains unchanged.
Note that this contrasts the case of directly opening with
an initial requested lease state, in which case you get that
portion of the requested state that can be shared with the
already existing leases (or the states that they get broken to).
Signed-off-by: Michael Adam <obnox@samba.org>
Reviewed-by: David Disseldorp <ddiss@samba.org>
Autobuild-User(master): David Disseldorp <ddiss@samba.org>
Autobuild-Date(master): Mon Nov 11 18:04:47 CET 2013 on sn-devel-104
The summary of the behaviour is this:
-------------------------------------
An uncontended lease upgrade results in a change
if and only if the requested lease state is
- valid, and
- strictly a superset of the lease state already held.
In that case the resulting lease state is the one
requested in the upgrade.
Signed-off-by: Michael Adam <obnox@samba.org>
Reviewed-by: David Disseldorp <ddiss@samba.org>
This is a little benchmark test excercising parallel directory renames. With
lots of open files directory renames get pretty slow against some SMB server
implementations.
Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
Check that FSCTL_SRV_COPYCHUNK_WRITE succeeds when the copy-chunk target
is opened with SEC_RIGHTS_FILE_WRITE only.
Signed-off-by: David Disseldorp <ddiss@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
Autobuild-User(master): Jeremy Allison <jra@samba.org>
Autobuild-Date(master): Fri Oct 25 22:48:59 CEST 2013 on sn-devel-104
Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: David Disseldorp <ddiss@samba.org>
Autobuild-User(master): David Disseldorp <ddiss@samba.org>
Autobuild-Date(master): Thu Oct 24 16:15:50 CEST 2013 on sn-devel-104
The level we have to break to depends on the create disposition of the
second opener. If it's overwriting, break to none. If it's not, break
to level2.
Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>