1
0
mirror of https://github.com/samba-team/samba.git synced 2025-01-10 01:18:15 +03:00
Commit Graph

566 Commits

Author SHA1 Message Date
Tim Prouty
ad96c11182 s4 torture: Fix RAW-STREAMS to request more specific permissions
This allows RAW-STREAMS to pass when the user isn't root on some
systems that don't give full access rights to non-root users.
2009-09-24 10:59:33 -07:00
Andrew Tridgell
a11bb148f7 s4/torture: don't mix declarations and code 2009-09-10 12:14:53 +10:00
Aravind Srinivasan
4d7685c1d4 s4/torture: add new SMB oplock tests
* test if oplocks are granted when requesting delete-on-close
* test how oplocks are broken by byte-range-lock requests
2009-09-09 10:22:13 -07:00
Aravind Srinivasan
c091d4b08c s4/torture: convert printf to torture_comment()
Allows "make test" and other harnesses to print cleaner output.
2009-09-09 10:22:12 -07:00
Tim Prouty
09e9904f18 s4 torture: Extend the RAW-RENAME test to more fully test directory renames.
The existing test was only covering files opened underneath the
directory that was being renamed.  It is not uncommon for windows
clients to actually hold a read-only handle to a directory open across
the rename, which it turns out doesn't return NT_STATUS_ACCESS_DENIED.
Additionally, holding a handle open to a stream on the directory is
also allowed.
2009-08-06 17:07:49 -07:00
Andrew Tridgell
8bba340e65 s4 now supports the large readx extension 2009-08-05 12:08:30 +10:00
Andrew Tridgell
88d206070d skip the readbraw tests if the server does not support it
This allows the RAW-READ test to pass against w2k8
2009-08-05 11:32:01 +10:00
Stefan Metzmacher
f5b07455d9 RAW-LOCK: fix a compiler warning and make a global static const
metze
2009-07-06 15:49:44 +02:00
Stefan Metzmacher
ad17cf1772 RAW-LOCK: fix the run against w2k3, w2k8, win7rc and samba3/4
We now allow --target=w2k8.

The strange thing is that w2k8 and win7rc only do half of the timeout
that was given by the client.

metze
2009-07-06 15:37:48 +02:00
Matthias Dieter Wallnöfer
15013090df Adds the impersonation level in ntcreatex requests to SAMBA 3 misc torture test
Specifies the impersonation level according to the reporter commit in bug #6283
2009-06-29 18:04:24 +10:00
Volker Lendecke
3014753ebe Fix the posixtimedlock test
The previous version depended on the fact that smb_raw_lock_send just queued
stuff. This changed with ebf5523b6e.
2009-06-15 17:26:56 +02:00
Stefan Metzmacher
09f1754a9b RAW-LOCK: samba4 behaves like windows 7 in regard of locking error codes
metze
2009-04-25 03:16:11 +02:00
Stefan Metzmacher
4ab243bcab s4:torture: use torture api instead of printf for RAW-LOCK
metze
2009-04-25 03:15:58 +02:00
Stefan Metzmacher
88e9f72473 s4:tortore: use torture api instead of printf in RAW-RENAME
metze
2009-04-25 03:15:55 +02:00
Zack Kirsch
108cf27bb1 s4 torture: Addition to RAW-BENCH-LOCK to take a configurable number of locks before starting the test
This can be useful for benchmarking as well as stress testing.
2009-04-01 20:59:52 -07:00
Zach Loafman
9d95f8704d s/NT_STATUS_WIN7_INVALID_RANGE/NT_STATUS_INVALID_LOCK_RANGE/g 2009-04-01 20:59:52 -07:00
Tim Prouty
f92140b716 s4 torture: Remove unused parameter 2009-04-01 20:02:31 -07:00
Tim Prouty
5000640bf4 s4 torture: Add new streams oplock test 2009-04-01 20:02:31 -07:00
Andrew Tridgell
a67bc41d6b added a test that triggers a bug in the Samba3 notify code
The Samba3 internal notify code doesn't work correctly when there is
more than one tree connect to the same smbd process. This change to
the RAW-NOTIFY test triggers the bug.
2009-03-10 15:12:48 +11:00
Jeremy Allison
9569d979de And the prize for the most pain caused in the build farm for a simple
typo goes to.....
Tim Prouty !!!!
Sorry Tim, nice test but you made a typo in passing in
the size of an array so we were reading uninitialized
memory :-).
That took far longer than it should have to track down...
(%$&#ing build system....).
The build farm should now slowly go back to normal.
Jeremy.
2009-02-27 20:57:49 -08:00
Jeremy Allison
bcadb77c18 Add another torture test inspired by George @ Apple.
Inside a directory, keep a file open and then renaming
the directory should fail with ACCESS_DENIED. This
is connected to the test case where the close was
failing due to a delayed write on a file not being
able to succeed when Samba allowed the containing
directory to be renamed.

I will fix this in the server shortly (this should be done
across connections also but with will be very hard
in Samba - would need a full scan of the open file
db on every directory rename) - so I will fix for
the local case first (scanning local file opens
inside an smbd is cheap).

Jeremy.
2009-02-26 10:13:57 -08:00
Jeremy Allison
cde5724780 Added torture test from a usage case from the Apple OS/X client.
Setting an attribute on a stream fnum must change the attribute
on the base file.
Jeremy.
2009-02-24 17:32:22 -08:00
Zack Kirsch
2539d678f5 s4 torture: Add comment to clarify test 2009-02-20 16:42:50 -08:00
Steven Danneman
1a0aed36c0 Added torture tests to RAW-NOTIFY
* This adds a test to check the change notify behavior of the SMB server
  when more events have been generated than can be returned in a single
  change notify response.

* Second test makes sure the server doesn't return notification events
  for changes to the watched directory itself
2009-02-20 14:10:29 -08:00
Tim Prouty
6bac890533 s4 torture: Add new test to create a file with a lot of streams
This tests how streaminfo deals with large buffers

smbclient seems to have problems when the buffer size approaches the
max data size.  Also smbclient exposes no way to specify the max data
size that is sent in a trans2 request.  Instead it hardcodes in a much
larger max than windows uses.  For these reasons this test isn't
actually run, but is more of a reference for how windows handles
streaminfo buffers.
2009-02-18 23:48:35 -08:00
Tim Prouty
7a2c4acf86 s4 torture: Add additional streams create disposition test 2009-02-18 23:48:35 -08:00
Aravind Srinivasan
4d83d3a286 s4 torture: Add rename test to imitate the way OS X renames files
This tests for mis-behaved case-insensitive get_real_filename
implementations.
2009-02-13 13:18:54 -08:00
Zack Kirsch
4e1a4cbe1f s4 torture: Smbtorture additions for Windows BRL
- Adds a few new BRL tests to RAW-LOCK
- Adds a "win7" target to allow torture to handle protocol changes in
  windows 7
2009-02-11 12:23:52 -08:00
Zack Kirsch
307f4a66ac s4 torture: Two minor fixes to smbtorture BRL tests. 2009-02-11 12:23:32 -08:00
Tim Prouty
7eb097a66d s4 torture: Change nttransrename to use a normal access mask
batch9 already tests for stat-only opens
2009-02-10 19:35:33 -08:00
Stefan Metzmacher
0ac7792e02 s4:libcliraw: s/private/private_data
metze
2009-02-02 13:08:51 +01:00
Stefan Metzmacher
ab7f003aad s4:torture: s/private/private_data
metze
2009-02-02 13:08:38 +01:00
Tim Prouty
a65f1b9655 s4 torture: Add new create disposition test to RAW-STREAMS 2009-01-09 11:45:31 -08:00
Andrew Tridgell
c81863e868 added support for stream renames in Samba4
This allows the RAW-STREAMS test to work again. We still have some
limitations though:

  - renames of a stream to the default stream doesn't work
  - delete on close handling between streams and the main file 
    is still broken
2009-01-07 16:46:34 +11:00
Tim Prouty
2ddaebb2e1 s4 torture: Add more rename tests to RAW-STREAMS
There is one part of the new rename tests that passes against windows,
but doesn't pass against samba3 right now.  Windows allow renaming a
stream to the default stream, but none of the current streams module
support this.  When this ability is added the check for samba can be
removed from this test.

This patch also adds a missing unlink in the cleanup of
test_stream_delete and changes the order that the tests are run to be
consistent with the physical order in the file.
2009-01-04 19:31:30 -08:00
Stefan Metzmacher
183c379fe5 s4:lib/tevent: rename structs
list=""
list="$list event_context:tevent_context"
list="$list fd_event:tevent_fd"
list="$list timed_event:tevent_timer"

for s in $list; do
	o=`echo $s | cut -d ':' -f1`
	n=`echo $s | cut -d ':' -f2`
	r=`git grep "struct $o" |cut -d ':' -f1 |sort -u`
	files=`echo "$r" | grep -v source3 | grep -v nsswitch | grep -v packaging4`
	for f in $files; do
		cat $f | sed -e "s/struct $o/struct $n/g" > $f.tmp
		mv $f.tmp $f
	done
done

metze
2008-12-29 20:46:40 +01:00
Jelmer Vernooij
dcc4081f75 Fix more compiler warnings. 2008-12-23 23:22:57 +01:00
Jeremy Allison
f1389a3950 Make it clearer when RAW-STREAMS is failing (don't always print names).
Jeremy.
2008-12-22 11:58:38 -08:00
Jeremy Allison
fcadf47a15 Add torture test for bug #5986 - streams rename, so we don't regress.
Jeremy.
2008-12-19 18:01:26 -08:00
Stefan Metzmacher
0df3036730 RAW-CHKPATH: not every server behaves like samba3...
metze
2008-12-18 13:31:41 +01:00
Jeremy Allison
55620b4e3c Samba3 smbd now passes test BATCH23 (with the fix for bug #5979), only BATCH22 left to fix.
Jeremy.
2008-12-17 17:30:18 -08:00
Jeremy Allison
3c5c3aaa74 Added torture test for doing an openX over a directory
to ensure we get the correct error message.
Jeremy.
2008-12-13 13:10:48 -08:00
Stefan Metzmacher
db369b5567 RAW-STREAMS: test stream renames
metze
2008-12-01 14:45:06 -08:00
Stefan Metzmacher
540e6376cc RAW-STREAMS: some more tests...
metze
2008-12-01 14:44:42 -08:00
Stefan Metzmacher
87bb9e178f RAW-STREAMS: test valid character in the range of 0x01 => 0x7F
metze
2008-12-01 14:43:58 -08:00
Stefan Metzmacher
b25d69e3a8 RAW-STREAMS: check some strange stream name combinations
metze
2008-12-01 14:43:23 -08:00
Stefan Metzmacher
9519d5dd71 RAW-CHKPATH: test every character in the range of 0x01 => 0x7F
metze
2008-12-01 14:42:48 -08:00
Jeremy Allison
d64caaf593 Remove debug code added in error.
Jeremy.
2008-11-08 23:06:21 -08:00
Jeremy Allison
813bf8b4f4 Fix a subtle logic bug in the adaption of se_create_child_secdesc(), pass RAW-ACL inheritance tests. Only access masks for SD get/set left to fix.
Jeremy.
2008-11-08 22:57:57 -08:00
Jeremy Allison
87f563c230 Start factoring out the inheritance differences.
Jeremy.
2008-11-06 01:58:56 -08:00