1
0
mirror of https://github.com/samba-team/samba.git synced 2024-12-28 07:21:54 +03:00
Commit Graph

504 Commits

Author SHA1 Message Date
Andrew Tridgell
89efea81d9 r18319: fixed the directory search resume code on IRIX
The problem was twofold:

  1) irix returns 64 bit numbers in telldir(). The protocol uses a 32
     bit resume key. We now cope with this properly using the code in
     pvfs_list_seek_ofs().

  2) irix returns 0xFFFFFFFF from telldir() for the last entry in the
     directory. When added to DIR_OFFSET_BASE this became
     DIR_OFFSET_DOTDOT which meant an infinite loop!
(This used to be commit 8cce9740ed)
2007-10-10 14:18:08 -05:00
Andrew Tridgell
30ee8beb93 r18301: I discovered how to load the warnings from a build farm build into
emacs compile mode (hint, paste to a file, and compile as "cat
filename").

This allowed me to fix nearly all the warnings for a IA_64 SuSE build
very quickly.
(This used to be commit eba6c84eff)
2007-10-10 14:18:04 -05:00
Derrell Lipman
6d362bdb7c r18103: add torture test for 'RAW_OPEN_OPENX without a leading slash on the path', known to fail on NetApp filers
(This used to be commit 9a8c7b0a76)
2007-10-10 14:17:17 -05:00
Stefan Metzmacher
46cdf9250b r17785: fix compiler warnings
metze
(This used to be commit 256fc452a4)
2007-10-10 14:16:42 -05:00
Jeremy Allison
38dee43c19 r17141: Prove that create dispositions with truncate and
overwrite break oplocks.
Jeremy.
(This used to be commit 94886f8c40)
2007-10-10 14:10:14 -05:00
Jeremy Allison
8de86d192a r17139: Checking in Volker's extended oplock test.
Jeremy
(This used to be commit 720c425af1)
2007-10-10 14:10:14 -05:00
Jeremy Allison
6cebe4d890 r17099: Samba3 now passes RAW-LOCK completely, no need for
parameters to protect it.
Jeremy.
(This used to be commit 382c37e3d7)
2007-10-10 14:10:12 -05:00
Stefan Metzmacher
440d0487a6 r17020: pass the real error to the failing requests
metze
(This used to be commit 49b96ac44a)
2007-10-10 14:10:08 -05:00
Stefan Metzmacher
a6a8065812 r17015: add a test that closes the tcp connection with an outstanding
notify request

metze
(This used to be commit d90313f715)
2007-10-10 14:10:08 -05:00
Stefan Metzmacher
a8958391e8 r16980: - make struct smb_notify a union and add levels RAW_NOTIFY_NTTRANS,RAW_NOTIFY_SMB2
- parse SMB2 Notify reponse

metze
(This used to be commit de50e0ccdd)
2007-10-10 14:10:06 -05:00
Volker Lendecke
b7c5bc522b r16907: Add an index parameter to torture_open_connection. Next step is to enable the
unclist parameter for all tests that do two connections, to enable cluster
testing.

Volker
(This used to be commit a5d6db0924)
2007-10-10 14:09:58 -05:00
Jeremy Allison
ec3be5b908 r16843: Confirm that openX uses the same mapping table as getatr.
Jeremy.
(This used to be commit 1c84e57e71)
2007-10-10 14:09:52 -05:00
Volker Lendecke
a5cbc9a01c r16842: Jeremy, I almost don't dare checking this in.....
Volker
(This used to be commit ec36c49c08)
2007-10-10 14:09:50 -05:00
Stefan Metzmacher
af0a9eb529 r16834: split the level's of smb_search_first/smb_search_next and the levels
of smb_search_data

metze
(This used to be commit 78c201db8a)
2007-10-10 14:09:49 -05:00
Jeremy Allison
5517249fad r16761: Added additional NTSTATUS and DOS error test for "."
This confirms a theory of mine...
Added RAW-SAMBA3BADPATH to selectable options.
Jeremy.
(This used to be commit 4cd7a8ed62)
2007-10-10 14:09:44 -05:00
Volker Lendecke
81d09a7f2e r16759: Jeremy, another little error case for you :-)
For the paths with illegal characters we should return ERRDOS:ERRbadpath in
the DOS error case. We return ERRDOS:ERRinvalidname...

Volker
(This used to be commit c2203068f4)
2007-10-10 14:09:43 -05:00
Stefan Metzmacher
4357d9f5de r16707: - test attrib = 0 in BASIC_INFO
- return an error when value doesn't match the expected value!

metze
(This used to be commit 1f0ecba773)
2007-10-10 14:09:39 -05:00
Volker Lendecke
414c47633d r16657: Test Jerry's iTunes bug, along with some more error conditions
Volker
(This used to be commit 12aa900eb2)
2007-10-10 14:09:36 -05:00
Jelmer Vernooij
845df42a19 r16333: Move more code out of the core smbtorture. It now no longer
contains protocol-specific code.
(This used to be commit 819d3b4576)
2007-10-10 14:09:11 -05:00
Jelmer Vernooij
90be000cd5 r16173: Use memory context provided by smbtorture.
(This used to be commit 88046d5951)
2007-10-10 14:09:05 -05:00
Volker Lendecke
dcbd023aa0 r16151: |= fix found by metze
(This used to be commit ce54a15384)
2007-10-10 14:09:01 -05:00
Volker Lendecke
c1cbe6e0b0 r16149: This is a very Samba3 specific test: It tests whether 'hide unreadable' and
'hide unwriteable files' actually do what they are supposed to do.

Volker
(This used to be commit 7bf02a5e0f)
2007-10-10 14:09:01 -05:00
Jeremy Allison
4dd65fdd48 r15947: Do the same test on setting allocation info.
Jeremy.
(This used to be commit b8f6f62acd)
2007-10-10 14:08:43 -05:00
Jeremy Allison
1204445aa0 r15946: Added check that proves that setpathinfo on an
oplocked open file generates a break.
Jeremy.
(This used to be commit 061b519b27)
2007-10-10 14:08:43 -05:00
Andrew Tridgell
373bf313cd r15881: fixed the RAW-ACLS test for 64 bit systems (was failing on ppc64)
(This used to be commit c954a6662d)
2007-10-10 14:08:37 -05:00
Stefan Metzmacher
7f0e17e903 r15718: - split the SMBflush with the 0xFFFF wildcard fnum into a different level
metze
(This used to be commit 95bf41b4d4)
2007-10-10 14:08:09 -05:00
Stefan Metzmacher
5a8ebb7b67 r15690: - disable the lock cancel test against samba3
- disable the LOCK_NOT_GRANTED vs. FILE_LOCK_CONFLICT test against samba3

metze
(This used to be commit 620cc182b3)
2007-10-10 14:08:06 -05:00
Stefan Metzmacher
bd0fb90162 r15685: let samba3 pass RAW-READ and ignore one bug
this demonstrates how the target:samba3=yes option
passed in samba3's make test can be used in samba4's smbtorture

metze
(This used to be commit 856656739c)
2007-10-10 14:08:05 -05:00
Stefan Metzmacher
5ff4b74df3 r15656: for NT IOCTL's we need to control the max_data field for some calls
metze
(This used to be commit 3cab02f6f5)
2007-10-10 14:08:04 -05:00
Stefan Metzmacher
410fb90322 r15640: - NT IOCTL calls also have an 'in' data_blob
- fix the receive code of NT IOCTL's we only need the NTTRANS data payload
  not the SMB payload here

metze
(This used to be commit 358d03143f)
2007-10-10 14:07:25 -05:00
Stefan Metzmacher
2a072bf9a2 r15615: - add some tests for cancel pending locks by SMBexit, SMBulogoff and SMBtdis
- add some tests which demonstrate the LOCK_NOT_GRANTED vs. FILE_LOCK_CONFLICT
  error cases of failed locks

metze
(This used to be commit 218910f927)
2007-10-10 14:07:00 -05:00
Jelmer Vernooij
e002300f23 r15328: Move some functions around, remove dependencies.
Remove some autogenerated headers (which had prototypes now autogenerated by pidl)
Remove ndr_security.h from a few places - it's no longer necessary
(This used to be commit c19c2b51d3)
2007-10-10 14:05:17 -05:00
Jelmer Vernooij
a30340affe r15201: Use abs() rather then ABS()
(This used to be commit 1f3833d041)
2007-10-10 14:04:16 -05:00
Stefan Metzmacher
73b385d3c4 r15122: test what access masks are needed when using the FLAGS2_READ_PERMIT_EXECUTE
flag.

metze
(This used to be commit d298e4760c)
2007-10-10 14:04:10 -05:00
Stefan Metzmacher
e7f34592eb r15070: test the needed access masks for read/write the different
security descriptor components

metze
(This used to be commit 88c57c8703)
2007-10-10 14:04:06 -05:00
Stefan Metzmacher
4d72f3f8d0 r15066: - sync the dir_flags tests with the file_flags tests
- add some more checks for the w2k3 bug case

metze
(This used to be commit a55b44b96c)
2007-10-10 14:04:06 -05:00
Andrew Tridgell
970f7122d9 r15033: expanded the RAW-OPLOCK test to include the different cases where the
client chooses to break to none or break to level II, when offered a
level II break from exclusive
(This used to be commit 9a35b14422)
2007-10-10 14:04:02 -05:00
Andrew Tridgell
7f6ed60c70 r15016: add a test for a 2nd open with an exclusive oplock. It does not cause
a break, as exclusive oplocks don't cache close requests
(This used to be commit 9f2617a062)
2007-10-10 14:04:01 -05:00
Andrew Tridgell
48d3fb39ff r15015: add an explanation for this test
(This used to be commit 9fdeec506f)
2007-10-10 14:04:01 -05:00
Andrew Tridgell
72343b9615 r15014: added a simple batch oplock benchmark
Jeremy, Samba3 currently fails this test with a 2.6.16-rc6 kernel and
kernel oplocks enabled. With kernel oplock off it passes, though its a
bit slow
(This used to be commit 99df202460)
2007-10-10 14:04:01 -05:00
Andrew Tridgell
b04592918d r14969: ensure that even on slow machines we leave plenty of time for a series
of events to propogate internally in smbd before asking for them

(the test was failing on slow machines)
(This used to be commit a493539458)
2007-10-10 14:00:48 -05:00
Andrew Tridgell
127967334f r14956: change the notify search to be much more efficient by using a
per-depth bisection search. This makes the notify_trigger() call
log(N) which makes us scale well for large numbers of outstanding
notifies
(This used to be commit 16fd00925f)
2007-10-10 14:00:45 -05:00
Andrew Tridgell
b5ee277f1a r14948: add testing of truncate events, and add truncate support to inotify
backend
(This used to be commit b80523a631)
2007-10-10 14:00:21 -05:00
Andrew Tridgell
ce25ec56f3 r14942: make the RAW-NOTIFY test check the strange file rename semantics. Also
be more forgiving of matching on extra bits (inotify cannot match on
minimal bits for all events).
(This used to be commit 29de884737)
2007-10-10 14:00:20 -05:00
Andrew Tridgell
0dce9b003c r14935: try to avoid a race condition in the recursion test
(This used to be commit 659576806f)
2007-10-10 14:00:19 -05:00
Andrew Tridgell
51a5b79ec0 r14934: greatly expand the RAW-NOTIFY testing of completion filters. We now
try each bit in the completion filter separately for a wide range of
file operations.
(This used to be commit 81f8b24526)
2007-10-10 14:00:19 -05:00
Andrew Tridgell
e221db7a39 r14928: demonstrate that the completion filter is only set on the first notify
on a directory handle
(This used to be commit b6e40d9b08)
2007-10-10 14:00:18 -05:00
Andrew Tridgell
d8544db317 r14927: expand the RAW-NOTIFY test to test recursive and rename handling
(This used to be commit e6abb1ecba)
2007-10-10 14:00:18 -05:00
Stefan Metzmacher
1af925f394 r14860: create libcli/security/security.h
metze
(This used to be commit 9ec706238c)
2007-10-10 13:59:44 -05:00
Andrew Tridgell
986aae3c5c r14845: expanded the number of info levels tested for continue in the
RAW-SEARCH test
(This used to be commit a3e7640730)
2007-10-10 13:59:42 -05:00
Stefan Metzmacher
f964db91e7 r14826: initialize pid1 and pid2:-)
metze
(This used to be commit 45e2832972)
2007-10-10 13:59:24 -05:00
Andrew Tridgell
8e7078e149 r14794: added a test to see what happens when you send a notify request on a
handle that already has a notify request pending. It turns out that
they are queued
(This used to be commit 15e9302bcd)
2007-10-10 13:59:19 -05:00
Stefan Metzmacher
7780e2bfa1 r14734: this demonstrates that a tcon isn't autoclosed by a ulogoff
the tcon can be reused using any other valid session later

metze
(This used to be commit b9a90ed763)
2007-10-10 13:59:17 -05:00
Stefan Metzmacher
7011384a3a r14732: fix typo noticed by derrell, thanks!
metze
(This used to be commit ffa500ebb4)
2007-10-10 13:59:16 -05:00
Jelmer Vernooij
909b111f58 r14720: Add torture_context argument to all torture tests
(This used to be commit 3c7a5ce291)
2007-10-10 13:59:13 -05:00
Stefan Metzmacher
30976b1af1 r14710: make more clear that SMBexit only cares about the PID
that is used in the open call

metze
(This used to be commit 1bc6940e7d)
2007-10-10 13:59:11 -05:00
Stefan Metzmacher
41a6591628 r14680: add some tests which demonstrate that closing the dir handle
triggers an empty notify reply with NT_STATUS_OK

metze
(This used to be commit 590dd49207)
2007-10-10 13:59:08 -05:00
Jelmer Vernooij
35349a58df r14542: Remove librpc, libndr and libnbt from includes.h
(This used to be commit 51b4270513)
2007-10-10 13:58:42 -05:00
Andrew Tridgell
9225c02aee r14539: get rid of a pointless union layer in struct smb_notify
(This used to be commit 1e1c559381)
2007-10-10 13:58:41 -05:00
Jelmer Vernooij
d09b70c98b r14527: Fix build problems.
(This used to be commit 863ca4014d)
2007-10-10 13:57:37 -05:00
Jelmer Vernooij
8528016978 r14464: Don't include ndr_BASENAME.h files unless strictly required, instead
try to include just the BASENAME.h files (containing only structs)
(This used to be commit 3dd477ca51)
2007-10-10 13:57:27 -05:00
Stefan Metzmacher
ae92d63ce1 r14446: demonstrate the notifies on files are not allowed
metze
(This used to be commit 74868726ae)
2007-10-10 13:57:26 -05:00
Stefan Metzmacher
d16d8e1dcd r14444: - make clear that a canceled notify directly returns without any other event
- test mkdir - rmdir - mkdir - rmdir sequence, this gets 4 notify events back
- add some comments to the multiple directory handle and buffered cases

metze
(This used to be commit e2b3816212)
2007-10-10 13:57:25 -05:00
Stefan Metzmacher
3f6ede84da r14440: demonstrate that the smbpid is attached to a session (vuid),
so SMBexit() only closes files for the given user session and the given PID

can someone check if samba3 passes this test, please?

metze
(This used to be commit fd291ff003)
2007-10-10 13:57:25 -05:00
Jelmer Vernooij
eefe30b7d8 r14379: Build torture/rpc/ as a seperate smbtorture module. Move helper
functions for rpc out of torture/torture.c
(This used to be commit 1d2d970f3b)
2007-10-10 13:57:16 -05:00
Jelmer Vernooij
3f16241a1d r14363: Remove credentials.h from the global includes.
(This used to be commit 98c4c30513)
2007-10-10 13:57:14 -05:00
Stefan Metzmacher
03bd05947b r14316: don't zero the smb_handle after it was set:-)
metze
(This used to be commit 74472ed8be)
2007-10-10 13:57:11 -05:00
Stefan Metzmacher
a1b295ed48 r14256: - rename smb_file -> smb_handle
- move it into the in/out substructs again
- allow file.path only on smb_fileinfo/smb_setfileinfo

metze
(This used to be commit be6d5298a2)
2007-10-10 13:57:06 -05:00
Andrew Tridgell
7f0c7702f6 r14208: removed use of req->flags2 inside the ntvfs layer. This should help
metze on his quest to unify the ntvfs strucures for the smb and smb2
servers. The only place we needed flags2 inside ntvfs was for the
FLAGS2_READ_PERMIT_EXECUTE bit, which only affects readx, so I added a
readx.in.read_for_execute flag instead.
(This used to be commit b78abbbce6)
2007-10-10 13:57:03 -05:00
Stefan Metzmacher
307e43bb56 r14173: change smb interface structures to always use
a union smb_file, to abtract
- const char *path fot qpathinfo and setpathinfo
- uint16_t fnum for SMB
- smb2_handle handle for SMB2

the idea is to later add a struct ntvfs_handle *ntvfs
so that the ntvfs subsystem don't need to know the difference between SMB and SMB2

metze
(This used to be commit 2ef3f59709)
2007-10-10 13:56:57 -05:00
Andrew Tridgell
2b051070cb r14059: change notify is quite a bit more complex than we thought. These tests
show that w2k3 buffers notifies on directories where you have used
notify previously, thus giving you notifications on events that happen
even when you do not have a current notify call outstanding. This
makes it much easier for clients to avoid race conditions, which is
probably why it is done. It also means that associating change
notifies in Samba with outstanding change notify requests won't work -
instead we have to associate them with buffers on open directories.
(This used to be commit 8c5c8846f5)
2007-10-10 13:52:39 -05:00
Jelmer Vernooij
f8fdbc967c r13944: Yet another round of splitups.
(This used to be commit f87debeb12)
2007-10-10 13:52:31 -05:00
Jelmer Vernooij
4ac2be9958 r13924: Split more prototypes out of include/proto.h + initial work on header
file dependencies
(This used to be commit 1228358767)
2007-10-10 13:52:24 -05:00
Jelmer Vernooij
dfc517b053 r13658: More moving around of files:
- Collect the generic utility functions into a lib/util/ (a la GLib is
		for the GNOME folks)
 - Remove even more files from include/
(This used to be commit ba62880f5b)
2007-10-10 13:52:05 -05:00
Stefan Metzmacher
a920f2f9a8 r13004: fix compiler warnings
metze
(This used to be commit 833efdf8a9)
2007-10-10 13:51:16 -05:00
Volker Lendecke
1971eebb10 r12765: Revert an accidential commit
(This used to be commit d96c84126d)
2007-10-10 13:49:51 -05:00
Volker Lendecke
53091bf83e r12764: Add a test for lsa_lookup. This will be expanded when I get around to add
trusted domains.

Volker
(This used to be commit 8b8bb85ad3)
2007-10-10 13:49:51 -05:00
Jelmer Vernooij
78c50015bb r12694: Move some headers to the directory of the subsystem they belong to.
(This used to be commit c722f665c9)
2007-10-10 13:49:39 -05:00
Jelmer Vernooij
25bb00fbcd r12693: Move core data structures out of smb.h into core.h
torture prototypes in seperate header
(This used to be commit 73610639b2)
2007-10-10 13:49:39 -05:00
Jelmer Vernooij
d4de4c2d21 r12608: Remove some unused #include lines.
(This used to be commit 70e7449318)
2007-10-10 13:49:03 -05:00
Andrew Tridgell
5e117701b4 r12549: fixed the problem with serialisation and the RAW-OPLOCK test
(This used to be commit ad3b828663)
2007-10-10 13:47:56 -05:00
Jelmer Vernooij
2cd5ca7d25 r12542: Move some more prototypes out to seperate headers
(This used to be commit 0aca5fd513)
2007-10-10 13:47:55 -05:00
Andrew Tridgell
042a9958c8 r11639: fixed some create_time tests that should be change_time tests
(This used to be commit c4266c7f68)
2007-10-10 13:46:04 -05:00
Andrew Tridgell
498b2892dd r11638: fixed handling of null volume name in RAW-QFSINFO test
thanks to Stephen Zarkos for finding this
(This used to be commit 8331eee64c)
2007-10-10 13:46:04 -05:00
Andrew Tridgell
655138602c r10912: added a test for supporting batch oplock upgrades
(This used to be commit 1183af06b7)
2007-10-10 13:39:41 -05:00
Stefan Metzmacher
ab4d635b92 r10504: - seperate implementation specific stuff, from the generic composite
stuff.
- don't use SMBCLI_REQUEST_* state's in the genreic composite stuff
- move monitor_fn to libnet.

NOTE: I have maybe found some bugs, in code that is dirrectly in DONE or ERROR
      state in the _send() function. I haven't fixed this bugs in this
      commit! We may need some composite_trigger_*() functions or so.
      And maybe some other generic helper functions...

metze
(This used to be commit 4527815a0a)
2007-10-10 13:38:57 -05:00
Tim Potter
8dbeab5cd2 r10257: strlen returns a size_t which can be 64 bits long.
(This used to be commit 4a4b053718)
2007-10-10 13:38:12 -05:00
Jeremy Allison
0ac1490a89 r10132: Confirm that openX with OPEN_EXEC implies read only.
Jeremy.
(This used to be commit da70b2ab2d)
2007-10-10 13:38:01 -05:00
Tim Potter
9a56cb39b3 r9876: Fix some 64-bit warnings for Itanium machine.
(This used to be commit 9e375d82e8)
2007-10-10 13:36:19 -05:00
Jelmer Vernooij
b674411eb4 r9792: Rename StrCaseCmp -> strcasecmp_m. All these years I was thinking
StrCaseCmp was sys_strcasecmp, while it is in fact strcasecmp_m!
(This used to be commit 200a8f6652)
2007-10-10 13:35:01 -05:00
Volker Lendecke
11f4803d00 r9584: Fix a race condition in Samba 3. If two files are opened simultaneously with
NTCREATEX_DISP_CREATE (create if not exists, else fail) they might end up with
two or more times NT_STATUS_OK as EEXIST is not correctly handled.

Jeremy, please look closely at this. You can easily verify this by adding a
smb_msleep(100) to the top of open_file_ntcreate and run the new samba4
torture test. It does also happen without the msleep, but not as reliably.

Thanks,

Volker
(This used to be commit c803d4c9a5)
2007-10-10 13:34:32 -05:00
Tim Potter
2fa50ab671 r9222: Rename smb_tree_connect() to smb_raw_tcon() to match other raw function
names.
(This used to be commit 26b191b3c9)
2007-10-10 13:31:33 -05:00
Andrew Tridgell
c3ee5d6f75 r9121: use the older non-passthru level for setting delete on close
disposition in the RAW-UNLINK test (this allows it to work with netapp
servers)
(This used to be commit 4f9cfd10bf)
2007-10-10 13:31:18 -05:00
Andrew Tridgell
d07f01b203 r9046: fixed display of privileges in RAW-ACLS test
(This used to be commit 0ab907af6a)
2007-10-10 13:31:11 -05:00
Andrew Tridgell
89cbdf8ed0 r9045: be friendly towards servers that don't understand the 'share' form for tconx, instead of the \\server\share
form
(This used to be commit 02a78d06e1)
2007-10-10 13:31:11 -05:00
Andrew Tridgell
177423e88c r9044: added a comment so you can see what this test does :-)
(This used to be commit ee27441608)
2007-10-10 13:31:11 -05:00
Andrew Tridgell
089fa95704 r9043: fixed return code in RAW-STREAMS test
(This used to be commit 45e41010da)
2007-10-10 13:31:10 -05:00
Andrew Tridgell
8a0b044d20 r9042: fixed the valgrind error in the RAW-SFILEINFO test
(This used to be commit eaf079e33f)
2007-10-10 13:31:10 -05:00
Andrew Tridgell
8d5f642ee1 r9008: check the return status for the directory handle creations
(This used to be commit 57e44300f7)
2007-10-10 13:31:06 -05:00
Andrew Tridgell
d4c4f16f94 r9006: expanded RAW-UNLINK test to test directory delete on close with non-empty directory,
as per discussions during jeremys talk at cifs2005
(This used to be commit b28b2108c7)
2007-10-10 13:31:06 -05:00
Andrew Tridgell
7937a353db r9003: add testing for non-empty directory delete on close
(This used to be commit caca1f191d)
2007-10-10 13:31:06 -05:00
Andrew Tridgell
5f0c8df55a r8773: fixed another dependency on directory ordering in RAW-SEARCH
Thanks to andrew bartlett for helping to track this down (his was the
only system that hit this)
(This used to be commit 5edeb56bf0)
2007-10-10 13:30:03 -05:00
Andrew Tridgell
6b2d6ce604 r8729: make the RAW-SEARCH test more robust to servers with hash based directory ordering
(This used to be commit 8c4d0cd7b7)
2007-10-10 13:29:59 -05:00
Andrew Tridgell
2c457eca25 r8712: cleanup old search test code to use talloc
(This used to be commit 1d830bcd47)
2007-10-10 13:29:57 -05:00
Andrew Tridgell
92a6cd373a r8709: fixed the assumption in RAW-SEARCH that directories are returned in sorted order
(This used to be commit 92afff5fe7)
2007-10-10 13:29:56 -05:00
Andrew Tridgell
a4428c814a r8634: we are still getting occasional test failures due to disk space
changing. I suspect it is a signed/unsigned problem with the approx
equal test. Hopefully this will fix it.
(This used to be commit 668dd29259)
2007-10-10 13:29:47 -05:00
Andrew Tridgell
8e824d4d04 r8537: cope better with the small file handle limit on some systems in the build farm
(This used to be commit 6202a9d099)
2007-10-10 13:29:36 -05:00
Andrew Tridgell
9953452d49 r8522: fixed another couple of size_t warnings
(This used to be commit d2c9285483)
2007-10-10 13:29:34 -05:00
Andrew Tridgell
e835621799 r8520: fixed a pile of warnings from the build farm gcc -Wall output on
S390. This is an attempt to avoid the panic we're seeing in the
automatic builds.

The main fixes are:

 - assumptions that sizeof(size_t) == sizeof(int), mostly in printf formats

 - use of NULL format statements to perform dn searches.

 - assumption that sizeof() returns an int
(This used to be commit a58ea6b385)
2007-10-10 13:29:34 -05:00
Andrew Tridgell
a2a838d72c r8497: prevent a fd leak in RAW-SEARCH test
(This used to be commit efb151ba79)
2007-10-10 13:23:09 -05:00
Andrew Tridgell
060113de98 r8495: allow for up 10% change in allocated disk space during QFSINFO tests
(This used to be commit 16d752b551)
2007-10-10 13:23:09 -05:00
Andrew Tridgell
fc56396261 r8494: fixed a bug in RAW-SFILEINFO that caused inconsistent results on different platforms
(This used to be commit 9264555541)
2007-10-10 13:23:09 -05:00
Andrew Tridgell
bcec34683d r8491: lower the offset limit that filesystems need to support to pass RAW-WRITE to 2^33
(This used to be commit e499b1abae)
2007-10-10 13:23:09 -05:00
Volker Lendecke
8e05fc188e r8229: A level2 oplock does not conflict a no-oplock open, but is broken on first
write. Test that.

Volker
(This used to be commit 2ad02d5e09)
2007-10-10 13:19:22 -05:00
Volker Lendecke
824f5b4781 r8185: Delete on close on directories:
Creating a file in a directory with delete-on-close set returns
DELETE_PENDING, and trying to set the flag on a non-empty directory returns
DIRECTORY_NOT_EMPTY.

Volker
(This used to be commit 5680f34778)
2007-10-10 13:19:18 -05:00
Volker Lendecke
44b66a73d3 r8176: Exploring the share mode database...
A delete-on-close deleted file is still around while open on another fd. But
only for findfirst, not for qpathinfo :-)

Volker
(This used to be commit dbc7a1a978)
2007-10-10 13:19:17 -05:00
Jeremy Allison
3de3d6a02d r8174: Check DOS error codes in torture chkpath test.
Jeremy.
(This used to be commit ff58ecad04)
2007-10-10 13:19:17 -05:00
Andrew Tridgell
6667788706 r8123: fixed the RAW-NOTIFY and RAW-QFSINFO tests against w2k3
(This used to be commit acd9fad3a4)
2007-10-10 13:19:11 -05:00
Andrew Tridgell
a703329908 r8122: more fixes from testing dos error code handling against w2k3
(This used to be commit b71fbcf5e2)
2007-10-10 13:19:11 -05:00
Andrew Tridgell
19f2cd199f r8118: remove a debugging hack that should not have been in the last commit
(This used to be commit 0f76449a08)
2007-10-10 13:19:10 -05:00
Andrew Tridgell
fee56ea900 r8117: fixed a bunch more dos error code handing.
The biggest change was fixing the RAW-CONTEXT test. It was forcing
capabilities to zero in an attempt to not negotiated extended
security, but as a side effect it was forcing negotiation of dos error
codes. This confused the hell out of the test code!

Also fixed a bunch of places incorrectly using NT_STATUS_V() instead
of NT_STATUS_EQUAL() and several places that had the wrong dos status
codes
(This used to be commit 0b22744f40)
2007-10-10 13:19:10 -05:00
Andrew Tridgell
74942e1a11 r8107: now that we properly separate DOS and NT status codes all the places
that relied on the mapping need to be fixed. The first thing is to get
all the torture tests working against w2k3 again with nt status codes
enabled. The 2nd step will be to make them pass with nt status
disabled.

This starts on the first task, fixing the assumption that
NT_STATUS_INVALID_LOCK_SEQUENCE is a valid substitute for
ERRDOS:ERRbadaccess
(This used to be commit 87cdd11708)
2007-10-10 13:19:08 -05:00
Andrew Tridgell
e0d521ca79 r8104: - added support for our client library to not negotiate nt status codes, controlled
with 'nt status support' option.

- make nt_errstr() display nice strings for dos status codes encoded
  using NT_STATUS_DOS()

- no longer map between dos and nt status codes in the client library,
  instead return using NT_STATUS_DOS()

- fixed the RAW-CONTEXT test to look for
  NT_STATUS_DOS(ERRSRV, ERRbaduid) instead of NT_STATUS_INVALID_HANDLE
(This used to be commit ff5549e87f)
2007-10-10 13:19:08 -05:00
Andrew Tridgell
e7c530a9ea r8058: added testing of delete on close for files and directories
(This used to be commit 214e51b3c8)
2007-10-10 13:19:04 -05:00
Andrew Tridgell
361d126d01 r8051: separate out the MAX EAs test, as it fills disk too much to be run regularly
(This used to be commit dac526845e)
2007-10-10 13:19:03 -05:00
Andrew Tridgell
f792261654 r8004: added a maximum EAs size test from Kukks.
(This used to be commit 426c4d08ac)
2007-10-10 13:18:58 -05:00
Andrew Tridgell
b28e927466 r7899: fixed a crash bug in the RAW-CONTEXT test
(This used to be commit 470ad9a93f)
2007-10-10 13:18:47 -05:00
Andrew Bartlett
b523bde499 r7675: Use correct memory context for anonymous session setup auth context
(no need for it to hang around forever).

Add test for this behaviour.

Andrew Bartlett
(This used to be commit 36dc2491d7)
2007-10-10 13:18:21 -05:00
Stefan Metzmacher
68ff6b1262 r7487: check both files before and after setting the attribs on file1
metze
(This used to be commit 376c0560e0)
2007-10-10 13:17:58 -05:00
Tim Potter
78176b7ee0 r6676: Fix unused variable.
(This used to be commit 699e0adf4c)
2007-10-10 13:16:34 -05:00
Tim Potter
61d53d5d76 r6675: Fix printf warning.
(This used to be commit 513fc9c244)
2007-10-10 13:16:33 -05:00
Andrew Tridgell
965fab8268 r6581: improved the error message for RAW-LOCK timeouts
(This used to be commit 13ab07214e)
2007-10-10 13:16:28 -05:00
Alexander Bokovoy
9779e6d670 r6352: Two new composite calls:
- qfsinfo (query file system information)
- appendacl (append an ACL to existing file's security descriptor and get new
full ACL)

The second one also includes an improvement to security descriptor handling
which allows to copy security descriptor. Written by Peter Novodvorsky
<peter.novodvorsky@ru.ibm.com>

Both functions have corresponding torture tests added. Tested under valgrind and
work against Samba 4 and Windows XP.

ToDo: document composite call creation process in prog_guide.txt
(This used to be commit 441cff62ac)
2007-10-10 13:11:34 -05:00
Andrew Tridgell
d9c15b0f28 r6342: fixed a bad union assumption that caused ACLs to fail on 64 bit machines
Thanks to lars and agruen for finding this
(This used to be commit 2acc069185)
2007-10-10 13:11:33 -05:00
Andrew Bartlett
b3221032d2 r6315: Allow sane session setup behaviour on SPNEGO regarding VUIDs.
Andrew Bartlett
(This used to be commit 6e2327ee9b)
2007-10-10 13:11:31 -05:00
Andrew Bartlett
1372e938fc r6314: A more complete RAW-CONTEXT test. This Samba4 currently fails, but it
now tests areas in extended security handling (SPNEGO) that are just
plain odd...

Andrew Bartlett
(This used to be commit d8d63e8c79)
2007-10-10 13:11:31 -05:00
Andrew Bartlett
2eb3d68062 r6028: A MAJOR update to intergrate the new credentails system fully with
GENSEC, and to pull SCHANNEL into GENSEC, by making it less 'special'.

GENSEC now no longer has it's own handling of 'set username' etc,
instead it uses cli_credentials calls.

In order to link the credentails code right though Samba, a lot of
interfaces have changed to remove 'username, domain, password'
arguments, and these have been replaced with a single 'struct
cli_credentials'.

In the session setup code, a new parameter 'workgroup' contains the
client/server current workgroup, which seems unrelated to the
authentication exchange (it was being filled in from the auth info).

This allows in particular kerberos to only call back for passwords
when it actually needs to perform the kinit.

The kerberos code has been modified not to use the SPNEGO provided
'principal name' (in the mechListMIC), but to instead use the name the
host was connected to as.  This better matches Microsoft behaviour,
is more secure and allows better use of standard kerberos functions.

To achieve this, I made changes to our socket code so that the
hostname (before name resolution) is now recorded on the socket.

In schannel, most of the code from librpc/rpc/dcerpc_schannel.c is now
in libcli/auth/schannel.c, and it looks much more like a standard
GENSEC module.  The actual sign/seal code moved to
libcli/auth/schannel_sign.c in a previous commit.

The schannel credentails structure is now merged with the rest of the
credentails, as many of the values (username, workstation, domain)
where already present there.  This makes handling this in a generic
manner much easier, as there is no longer a custom entry-point.

The auth_domain module continues to be developed, but is now just as
functional as auth_winbind.  The changes here are consequential to the
schannel changes.

The only removed function at this point is the RPC-LOGIN test
(simulating the load of a WinXP login), which needs much more work to
clean it up (it contains copies of too much code from all over the
torture suite, and I havn't been able to penetrate its 'structure').

Andrew Bartlett
(This used to be commit 2301a4b38a)
2007-10-10 13:11:15 -05:00
Jelmer Vernooij
05bc2d7b2c r5928: Use cli_credentials in:
- gtk+ (returned by GtkHostBindingDialog as well now)
 - torture/
 - librpc/
 - lib/com/dcom/
(This used to be commit ccefd78233)
2007-10-10 13:11:08 -05:00
Andrew Tridgell
e82aad1ce3 r5298: - got rid of pstring.h from includes.h. This at least makes it a bit
less likely that anyone will use pstring for new code

 - got rid of winbind_client.h from includes.h. This one triggered a
   huge change, as winbind_client.h was including system/filesys.h and
   defining the old uint32 and uint16 types, as well as its own
   pstring and fstring.
(This used to be commit 9db6c79e90)
2007-10-10 13:09:38 -05:00
Andrew Tridgell
131dc76d56 r5197: moved events code to lib/events/ (suggestion from metze)
(This used to be commit 7f54c8a339)
2007-10-10 13:09:30 -05:00
Andrew Tridgell
66170ef8b3 r5185: make all the events data structures private to events.c. This will
make it possible to add optimisations to the events code such as
keeping the next timed event in a sorted list, and using epoll for
file descriptor events.

I also removed the loop events code, as it wasn't being used anywhere,
and changed timed events to always be one-shot (as adding a new timed
event in the event handler is so easy to do if needed)
(This used to be commit d7b4b6de51)
2007-10-10 13:09:29 -05:00
Andrew Tridgell
9a70f446fc r5126: the composite code is no longer client specific or smb specific, so
rename the core structure to composite_context and the wait routine to
composite_wait() (suggestion from metze)
(This used to be commit cf11d05e35)
2007-10-10 13:09:25 -05:00
Jeremy Allison
ebf1d79986 r5071: Reverted (per tridge request).
Jeremy.
(This used to be commit 554e27023f)
2007-10-10 13:09:19 -05:00
Jeremy Allison
90ba985c6b r5068: I'm pretty sure an old search request is allowed to return changed case
versions of filenames. Tridge please check I haven't screwed this up.
Jeremy.
(This used to be commit 40c1e16b5b)
2007-10-10 13:09:18 -05:00
Andrew Tridgell
759da3b915 r5037: got rid of all of the TALLOC_DEPRECATED stuff. My apologies for the
large commit. I thought this was worthwhile to get done for
consistency.
(This used to be commit ec32b22ed5)
2007-10-10 13:09:15 -05:00
Andrew Tridgell
93e27bec15 r5035: fixed composite test to use --num-ops command line option
(This used to be commit f36e4cf686)
2007-10-10 13:09:15 -05:00
Andrew Tridgell
3e44c4a3ba r4951: some of the code dealing with libcli was getting too complex trying to
handle the inverted memory hierarchy that a normal session
establishment gave. The inverted hierarchy came from that fact that
you first establish a socket, then a transport, then a session and
finally a tree. That leads to the socket being at the top of the
memory hierarchy and the tree at the bottom, which makes no sense from
the users point of view, as they want to be able to free the tree and
have everything disappear.

The core problem was that the libcli interface didn't distinguish
between establishing a primary context and a secondary context. If you
establish a 2nd session on a transport then you want the transport to
be referenced by the session, whereas if you establish a primary
session then you want the transport to be a child of the session.

To fix this I have added "parent_ctx" and "primary" arguments to the
libcli intialisation functions. This makes using the library much
easier, and gives us a memory hierarchy that makes much more sense.

I was prompted to do this by a bug in the cifs backend, which was
caused by the socket not being properly torn down on a disconnect due
to the inverted memory hierarchy.
(This used to be commit 5e8fd5f701)
2007-10-10 13:09:09 -05:00
Volker Lendecke
63ba8383e1 r4949: First version of a fetchfile composite function which connects to a server and
loads a file. Needs a smb url parsing wrapper.

Volker
(This used to be commit fa435bf7c8)
2007-10-10 13:09:08 -05:00
Andrew Tridgell
48e07444e8 r4792: use type safety int the test suite too
(This used to be commit 4a963e3b7a)
2007-10-10 13:08:55 -05:00
Andrew Tridgell
79f32d794a r4779: demonstrate doing 50 parallel loadfile operations, with a callback for completion
(This used to be commit b8c5269482)
2007-10-10 13:08:54 -05:00
Andrew Tridgell
7cbc768376 r4777: added a smb_composite_sesssetup() async composite function. This
encapsulates all the different session setup methods, including the
multi-pass spnego code.

I have hooked this into all the places that previously used the
RAW_SESSSETUP_GENERIC method, and have removed the old
RAW_SESSSETUP_GENERIC code from clisession.c and clitree.c. A nice
side effect is that these two modules are now very simple again, back
to being "raw" session setup handling, which was what was originally
intended.

I have also used this to replace the session setup code in the
smb_composite_connect() code, and used that to build a very simple
replacement for smbcli_tree_full_connection().

As a result, smbclient, smbtorture and all our other SMB connection
code now goes via these composite async functions. That should give
them a good workout!
(This used to be commit 080d0518bc)
2007-10-10 13:08:53 -05:00
Stefan Metzmacher
592fce7fb1 r4726: - use the name tcon and tid instead of conn and cnum
- make use of talloc destructors

metze
(This used to be commit 8308da6ce4)
2007-10-10 13:08:48 -05:00
Andrew Tridgell
287515fd3d r4710: added a smb_composite_savefile() function, and expanded the test suite a little
(This used to be commit ef4dbc443d)
2007-10-10 13:08:46 -05:00
Andrew Tridgell
1d795fa57b r4700: first attempt at a composite async function, smb_composite_loadfile(),
which combineds ntcreatex, readx and close into a single call that
behaves just like a normal libcli async call.
(This used to be commit 516f68fb05)
2007-10-10 13:08:45 -05:00
Andrew Tridgell
4e73b4b222 r4612: make the output for the w2k3 acl bug a bit clearer
(This used to be commit 24ec8c4274)
2007-10-10 13:08:33 -05:00
Andrew Tridgell
297a63b6c9 r4596: added a dynamic inheritance ACLs test. As far as I can tell w2k3 does not do
dynamic inheritance
(This used to be commit ebe6b00284)
2007-10-10 13:08:31 -05:00
Andrew Tridgell
11ce2cfd70 r4591: - converted the other _p talloc functions to not need _p
- added #if TALLOC_DEPRECATED around the _p functions

- fixes the code that broke from the above

while doing this I fixed quite a number of places that were
incorrectly using the non type-safe talloc functions to use the type
safe ones. Some were even doing multiplies for array allocation, which
is potentially unsafe.
(This used to be commit 6e7754abd0)
2007-10-10 13:08:30 -05:00
Andrew Tridgell
1a019f9883 r4583: print which bit failed in the owner bits check
(This used to be commit f893ad9c45)
2007-10-10 13:08:29 -05:00
Andrew Tridgell
468b3fcef2 r4582: finally worked out what is going on with the inherited ACLs test and win2003. It is a
win2003 bug!

This new test code works against w2k, and against longhorn, but fails
against w2k3. When tested against w2k3 it allows a open with an access
mask that should be denied by the given ACL, after setting up the ACL
using inheritance. Note that only the very specific
SEC_RIGHTS_FILE_ALL mask incorrectly succeeds, so they must have a
special case for that mask. Maybe its an optimisation gone wrong?

I don't know if there are any serious security implications to this,
but it is pretty clearly wrong, and has been fixed in longhorn.
(This used to be commit 4f9fd767db)
2007-10-10 13:08:29 -05:00
Andrew Tridgell
ddc10d4d37 r4549: got rid of a lot more uses of plain talloc(), instead using
talloc_size() or talloc_array_p() where appropriate.

also fixed a memory leak in pvfs_copy_file() (failed to free a memory
context)
(This used to be commit 89b74b5354)
2007-10-10 13:08:25 -05:00
Andrew Tridgell
cc55aef7c1 r4547: - added talloc_new(ctx) macro that is a neater form of the common talloc(ctx, 0) call.
- cleaned up some talloc usage in various files

I'd like to get to the point that we have no calls to talloc(), at
which point we will rename talloc_p() to talloc(), to encourage
everyone to use the typesafe functions.
(This used to be commit e6c81d7c9f)
2007-10-10 13:08:20 -05:00
Andrew Tridgell
3b21422ae8 r4463: added testing of the special SID_CREATOR_OWNER inheritance rules
(This used to be commit 5448c72ebe)
2007-10-10 13:07:53 -05:00
Stefan Metzmacher
00c7f9eed8 r4422: make lp_set_cmdline("torture:dangerous", "Yes") a bool parameter
metze
(This used to be commit 19482a2245)
2007-10-10 13:07:47 -05:00
Andrew Tridgell
447a346f0d r4407: stricter checking of parameters on hard link creation in the RAW-RENAME test
(This used to be commit b239589b00)
2007-10-10 13:07:44 -05:00
Andrew Tridgell
e20be5a6be r4402: use __location__ instead of __LINE__ in the RAW-RENAME test
(This used to be commit 09ac133820)
2007-10-10 13:07:43 -05:00
Andrew Tridgell
a477387cd0 r4401: stricter test for correct ACL inheritance in RAW-ACLS
(This used to be commit 1bb7691963)
2007-10-10 13:07:43 -05:00
Andrew Tridgell
d39ae54341 r4389: added checking for the default inherited ACL, which is used when no ACEs
are inheritable
(This used to be commit e30b8d5783)
2007-10-10 13:07:41 -05:00
Andrew Tridgell
66b8ff22e0 r4388: - allow ACE flags to be specified in security_descriptor_create()
- added a test for all combinations of the inheritance ACE flags and how
  they are propogated to child directories and files
(This used to be commit fdb38c8e4b)
2007-10-10 13:07:41 -05:00
Andrew Tridgell
5e4e61c827 r4364: - added support for testing of chained SMB operations in smbtorture
- added test for chained OpenX/ReadX, simulating the OS/2 workplace shell

- fixed a bug in handling chained fnum in openx and ntcreatex in the server

(yes, I'm on holiday, but this bug was annoying me ....)
(This used to be commit b3b8958a18)
2007-10-10 13:07:38 -05:00
Andrew Tridgell
8e90f88c25 r4317: check the count of replies in the os2 ea_list torture test
(This used to be commit 10861b3fa0)
2007-10-10 13:07:33 -05:00
Andrew Tridgell
ed42a64901 r4263: added support for the trans2 RAW_SEARCH_EA_LIST information
level. This is quite a strange level that we've never seen before, but
is used by the os2 workplace shell.

note w2k screws up this level when unicode is negotiated, so it only
passes the RAW-SEARCH test when you force non-unicode
(This used to be commit 25189b8fbf)
2007-10-10 13:07:29 -05:00
Andrew Tridgell
3b8e83a8c8 r4243: a sniff from kukks showed that the ea_set interface in trans2 setfileinfo allows
for multiple EAs to be set at once. This fixes all the ea code to allow for that.
(This used to be commit b26828bef5)
2007-10-10 13:07:28 -05:00
Andrew Tridgell
c9cce9e623 r4183: expanded the RAW-MKDIR torture test to test creation of EA lists
(This used to be commit 0134d8e9cc)
2007-10-10 13:07:24 -05:00
Andrew Tridgell
fbd8c61ff7 r4173: - new t2open code, that can cope with "create with EAs". Many thanks
to kukks on #samba-technical for the sniffs that allowed me to work
  this out

- much simpler ntvfs open generic mapping code

- added t2open create with EA torture test to RAW-OPEN test
(This used to be commit a56d95ad89)
2007-10-10 13:07:22 -05:00
Andrew Tridgell
e60bf04d4f r4164: added a test that simulates a OS/2 file delete. This includes seek by
name back into a directory for files that no longer exist.
(This used to be commit 57204a1533)
2007-10-10 13:07:21 -05:00
Andrew Tridgell
6ca874f71a r4147: converted from NT_USER_TOKEN to struct security_token
this is mostly just a tidyup, but also adds the privilege_mask, which
I will be using shortly in ACL checking.

note that I had to move the definition of struct security_token out of
security.idl as pidl doesn't yet handle arrays of pointers, and the
usual workaround (to use a intermediate structure) would make things
too cumbersome for this structure, especially given we never encode it
to NDR.
(This used to be commit 7b446af09b)
2007-10-10 13:06:31 -05:00
Andrew Tridgell
690b352fc1 r4074: make the RAW-ACLS test use the new lsa helper functions to determine
the privileges of the user running the test. This allows the test to
work out what the expected access masks are.
(This used to be commit dcf6c297d3)
2007-10-10 13:06:23 -05:00
Stefan Metzmacher
9112a632f6 r4063: - change char * -> uint8_t in struct request_buffer
- change smbcli_read/write to take void * for the buffers to match read(2)/write(2)

all this fixes a lot of gcc-4 warnings

metze
(This used to be commit b94f92bc66)
2007-10-10 13:06:21 -05:00
Andrew Tridgell
6a58011be5 r4061: more additions to the RAW-ACLS test, to help me work out some details for pvfs
(This used to be commit 273165e53a)
2007-10-10 13:06:21 -05:00
Andrew Tridgell
6e6374cb5b r4055: fixed more places to use type safe allocation macros
(This used to be commit eec698254f)
2007-10-10 13:06:20 -05:00
Andrew Tridgell
7dcfd94f81 r4053: expanded and fixed a bug in the RAW-ACLS test
(This used to be commit 0d19b4a09f)
2007-10-10 13:06:18 -05:00
Andrew Tridgell
4183b2ac38 r4037: fixed a bunch of "might be uninitialised" warnings after enabling -O1 in my compile
(This used to be commit 0928b1f5b6)
2007-10-10 13:06:16 -05:00
Andrew Tridgell
3b863542dc r4036: expanded the RAW-ACLS torture test to include tests for the
generic->specific access mask mappings, and tests of the behaviour of
SID_CREATOR_OWNER and SEC_FLAG_MAXIMUM_ALLOWED
(This used to be commit f572fe6d29)
2007-10-10 13:06:16 -05:00
Andrew Tridgell
cc8f4358cc r4035: more effort on consistent naming of the access mask bits.
This removes the duplicate named SEC_RIGHTS_MAXIMUM_ALLOWED and
SEC_RIGHTS_FULL_CONTROL, which are just other names for
SEC_FLAG_MAXIMUM_ALLOWED and SEC_RIGHTS_FILE_ALL. The latter names
match the new naming conventions in security.idl

Also added names for the generic->specific mappings for files are
directories
(This used to be commit 17a4e0b3ac)
2007-10-10 13:06:16 -05:00
Andrew Tridgell
fdc9f417d8 r4011: get rid of rpc_secdes.h and replace it with a single sane set of
definitions for security access masks, in security.idl

The previous definitions were inconsistently named, and contained many
duplicate and misleading entries. I kept finding myself tripping up
while using them.
(This used to be commit 01c0fa722f)
2007-10-10 13:06:13 -05:00
Andrew Tridgell
85215a9a26 r3835: - added testing of setting an initial ACL on a file using NTTRANS create
- added support for initial ACLs in pvfs backend
(This used to be commit 05ee9179f7)
2007-10-10 13:05:58 -05:00
Andrew Tridgell
012be92f0a r3830: unified the query/set security descriptor code with the rest of the
queryfileinfo/setfileinfo logic, so querying/setting a security
descriptor is treated as just another file query/set operation.

This will allow NTVFS backends to see the query/set security
descriptor operations as RAW_FILEINFO_SEC_DESC and
RAW_SFILEINFO_SEC_DESC operations.
(This used to be commit f68a6b6b91)
2007-10-10 13:05:57 -05:00
Andrew Tridgell
bbf009b46f r3829: added a RAW-ACLS test suite that tests query/set of ACLs on a file
(This used to be commit 2ff9816ae0)
2007-10-10 13:05:57 -05:00
Andrew Tridgell
cae123912c r3828: added testing of opening an existing file with EAs (the EAs are ignored)
(This used to be commit 6d53c6a0ae)
2007-10-10 13:05:57 -05:00
Andrew Tridgell
5f868bc1ac r3826: - added testing of ea lists in NTTRANS CREATE
- fixed push/pull of chained ea lists

- fixed a bug in the nttrans wire encoding
(This used to be commit fcd0922407)
2007-10-10 13:05:57 -05:00
Andrew Tridgell
5efd740d4d r3821: added client side code and test code for NTTRANS_CREATE
(This used to be commit 8422789c06)
2007-10-10 13:05:56 -05:00
Andrew Tridgell
856f663adc r3800: - fixed delete-on-close behaviour for streams
- added a delete-on-close test to RAW-STREAMS

- don't allow rename of streams at the moment (I need to work out if
  its supposed to be allowed first)
(This used to be commit f4b2b1311d)
2007-10-10 13:05:55 -05:00
Andrew Tridgell
ae7caf08c1 r3798: added support for alternate data streams in xattrs into pvfs.
The trickiest part about this was getting the sharing and locking
rules right, as alternate streams are separate locking spaces from the
main file for the purposes of byte range locking, and separate for
most share violation rules.

I suspect there are still problems with delete on close with alternate
data streams. I'll look at that next.
(This used to be commit b6452c4a20)
2007-10-10 13:05:54 -05:00
Andrew Tridgell
ca90965a3a r3793: add some streams tests that show how the :$DATA suffix is handled
(This used to be commit 41d8c95c94)
2007-10-10 13:05:54 -05:00
Andrew Tridgell
4719461a07 r3746: added RAW-STREAMS and RAW-EAS tests to smbtorture
(This used to be commit 5ed3d68d20)
2007-10-10 13:05:50 -05:00
Andrew Tridgell
1c59d825af r3717: - expanded the RAW-RENAME test a little
- added support for wildcard rename in pvfs

- made more consistent use of pvfs_map_errno()
(This used to be commit e255d1c3a8)
2007-10-10 13:05:46 -05:00
Andrew Tridgell
0e255bb542 r3699: - split the delayed write testing out of RAW-WRITE, as it is not yet
clear what the correct behaviour is for delayed stat info update.

- use a common torture_setup_dir() function for setting up a test
  directory in torture tests.
(This used to be commit f7fb34715b)
2007-10-10 13:05:45 -05:00
Andrew Tridgell
5f608f23d3 r3594: continue conversion to __location__ from __LINE__ for error reporting
(This used to be commit 425e36ca4d)
2007-10-10 13:05:37 -05:00
Andrew Tridgell
44b5e5a580 r3576: don't consider short share delay timeouts to be an error, so we can
run test_posix.sh in a reaonable time by using posix:sharedelay=100000

this still tests correct multiplex behaviour
(This used to be commit 64a6db5b02)
2007-10-10 13:05:33 -05:00
Andrew Tridgell
a9158e0d47 r3574: the RAW-OPEN test changes broke a couple of the other tests. This
fixes most of them, although RAW-SEARCH still fails (due to an
interaction with the new xattr code)
(This used to be commit 09b4652b40)
2007-10-10 13:05:33 -05:00
Andrew Tridgell
439c1524fb r3573: added trans2open support to smbd and pvfs, and fine-tuned the open->generic ntvfs mapping code.
(This used to be commit ed844192d7)
2007-10-10 13:05:33 -05:00
Andrew Tridgell
1d97e7b9d8 r3540: added testing of SMBntcancel in the open/open/close mux
testing. Interestingly, w2k3 does not allow the cancel of an
outstanding async open request, whereas it does allow the cancel of an
outstanding async lock request. To support this I have changed the
pvfs_wait interface to provide a enum on why the event is happening,
so the callback can decide what to do.
(This used to be commit f23d6a2800)
2007-10-10 13:05:30 -05:00
Andrew Tridgell
80eef3ea66 r3539: much nicer async open delay code.
The previous code didn't handle the case where the file got renamed or
deleted while waiting for the sharing violation delay. To handle this
we need to make the 2nd open a full open call, including the name
resolve call etc. Luckily this simplifies the logic.

I also expanded the RAW-MUX test to include the case where we do
open/open/open/close/close, with the 3rd open async, and that open
gets retried after both the first close and the 2nd close, with the
first retry failing and the 2nd retry working. The tests the "async
reply after a async reply" logic in pvfs_open().
(This used to be commit eded2ad9c9)
2007-10-10 13:05:29 -05:00
Andrew Tridgell
c870ae8b89 r3528: added support for the SMBntcancel() operation, which cancels any
outstanding async operation (triggering an immediate timeout).

pvfs now passes the RAW-MUX test
(This used to be commit 3423e2f414)
2007-10-10 13:05:28 -05:00
Andrew Tridgell
dde0705807 r3507: - added deferred replies on sharing violation in pvfs open. The
deferred reply is short-circuited immediately when the file is
  closed by another user, allowing it to be opened by the waiting user.

- added a sane set of timeval manipulation routines

- converted all the events code and code that uses it to use struct
  timeval instead of time_t, which allows for microsecond resolution
  instead of 1 second resolution. This was needed for doing the pvfs
  deferred open code, and is why the patch is so big.
(This used to be commit 0d51511d40)
2007-10-10 13:05:23 -05:00
Andrew Tridgell
3643fb1109 r3463: separated out some more headers (asn_1.h, messages.h, dlinklist.h and ioctl.h)
(This used to be commit b97e395c81)
2007-10-10 13:05:17 -05:00
Andrew Tridgell
8692564e35 r3458: more solaris portability fixes, the main one being that we can't use a
structure element called "open" as its a macro on solaris.
(This used to be commit 4e92e15c4e)
2007-10-10 13:05:16 -05:00
Andrew Tridgell
ead3508ac8 r3447: more include/system/XXX.h include files
(This used to be commit 264ce91810)
2007-10-10 13:05:12 -05:00
Andrew Tridgell
9f1210a243 r3419: moved the libcli/raw structures into libcli/raw/libcliraw.h
and made them private
(This used to be commit 386ac565c4)
2007-10-10 13:05:07 -05:00
Andrew Tridgell
ba6d5fcb97 r3324: made the smbtorture code completely warning free
(This used to be commit 7067bb9b52)
2007-10-10 13:04:55 -05:00
Andrew Tridgell
074da7ccf7 r3288: - updated the path processing in pvfs to pass the RAW-CHKPATH test. This
rather extensive test reveals some really bizarre error code
  handling in w2k3.

- extended and simplified the RAW-CHKPATH test, making it easier to
  read (note that Samba3 fails the new tests - jra may wish to look)

- marked RAW-CHKPATH as pass for pvfs
(This used to be commit 32dccf91cf)
2007-10-10 13:04:50 -05:00
Andrew Tridgell
b9ddb09f03 r3276: - allow for more than 256 open old style searches (limit currently set at an arbitrary 5000)
- auto-cleanup old searches that the client forgot to close (common with old searches)

- expanded the RAW-SEARCH test to test more than 256 old searches, and
  old search rewind (w2k3 fails this - it appears to not support rewind
  on old style searches)
(This used to be commit bc83d823b2)
2007-10-10 13:04:48 -05:00
Andrew Tridgell
3b5c992481 r3270: - added another unlink test
- removed BASE-TRANS2 from the list of tests to be worked on (its
  already in the "passes" list)
(This used to be commit 8ba10229c3)
2007-10-10 13:04:48 -05:00
Andrew Tridgell
f493f7be97 r3261: added seek to RAW-SEARCH test
(This used to be commit 05530bfb99)
2007-10-10 13:04:47 -05:00
Andrew Tridgell
991588e70c r3259: expanded the RAW-SEARCH test some more
(This used to be commit cc58d249f9)
2007-10-10 13:04:47 -05:00
Andrew Tridgell
b3ada7f4f5 r3257: make the RAW-SEARCH test less sensitive to the servers directory ordering
(This used to be commit 097823bbde)
2007-10-10 13:04:47 -05:00
Andrew Tridgell
4db039c3f3 r3254: - expanded the RAW-IOCTL test
- fixed the old ioctl interface to not check handle before failing

- pvs now passes RAW-IOCTL
(This used to be commit 98f6dbdba4)
2007-10-10 13:04:46 -05:00
Andrew Tridgell
d16b621ca9 r3251: - move the openattr test code into basic/attr.c
- cleaned up the RAW-WRITE test so it passes against w2k3, and gives
  more useful error messages
(This used to be commit d4042c4364)
2007-10-10 13:04:46 -05:00
Andrew Tridgell
920c0bba82 r3245: use __location__ in RAW-SEARCH
(This used to be commit 3d5f7f4ac4)
2007-10-10 13:04:45 -05:00
Andrew Tridgell
2b5b463892 r3242: make the RAW-READ test not exercise the 0-0 lock, which is not deterministic
(This used to be commit ecd4e315b9)
2007-10-10 13:04:45 -05:00
Andrew Tridgell
3511e5e806 r3236: test a few more combinations in RAW-UNLINK
(This used to be commit 5b239ad57b)
2007-10-10 13:04:43 -05:00
Andrew Tridgell
1f7fbaf493 r3235: try readx beyond 64k in RAW-READ
(This used to be commit e07c557eca)
2007-10-10 13:04:43 -05:00
Andrew Tridgell
e1c43f243a r3206: - added the reverse map for ERRbaduid to NT_STATUS_INVALID_HANDLE
- force disable spnego in the RAW-CONTEXT test (it breaks the test)
(This used to be commit 3f247ec21c)
2007-10-10 13:04:41 -05:00
Andrew Tridgell
925cb13fcd r3199: added a couple more test paths to RAW-CHKPATH
(This used to be commit 17f10a39c8)
2007-10-10 13:04:40 -05:00
Andrew Tridgell
7780bec7b4 r3198: check for too many .. components in filenames
pvfs now passes RAW-MKDIR
(This used to be commit 41adb385f1)
2007-10-10 13:04:40 -05:00
Andrew Tridgell
9c10d74be7 r3191: use __location__ in RAW-UNLINK test
(This used to be commit fb1929743a)
2007-10-10 13:04:38 -05:00
Andrew Tridgell
3cf018b517 r3180: - basic support for SEC_RIGHT_MAXIMUM_ALLOWED in pvfs
- RAW-CONTEXT test now passes
(This used to be commit 0dae9fef09)
2007-10-10 13:04:37 -05:00
Andrew Tridgell
def9a12bcc r3173: make the RAW-QFILEINFO test cope better with null strings from the server
(This used to be commit a10fca41de)
2007-10-10 13:04:36 -05:00
Andrew Tridgell
a3ff7f7d37 r3108: try to cope with servers that put FILE_ATTRIBUTE_NONINDEXED on files in the RAW-OPEN test
(This used to be commit bed7d12f26)
2007-10-10 13:02:22 -05:00
Andrew Tridgell
d3c5d8ccfd r3105: using __location__ instead of __LINE__ to give info on error locations is more useful
(This used to be commit 80dd22a1f1)
2007-10-10 13:02:21 -05:00
Andrew Tridgell
31a4070fcc r3085: make the RAW-WRITE tests more robust to errors in previous parts of the test
(This used to be commit 6ea815b6d4)
2007-10-10 13:01:57 -05:00
Andrew Tridgell
384f87bd38 r3034: - fixed a bug in message dispatch, when the dispatch function called messaging_deregister()
- added a pvfs_lock_close_pending() hook to remove pending locks on file close

 - fixed the private ptr argument to messaging_deregister() in pvfs_wait

 - fixed a bug in continuing lock requests after a lock that is blocking a pending lock is removed

 - removed bogus brl_unlock() call in lock continue

 - corrected error code for LOCKING_ANDX_CHANGE_LOCKTYPE

 - expanded the lock cancel test suite to test lock cancel by unlock and by close

 - added a testsuite for LOCKING_ANDX_CHANGE_LOCKTYPE
(This used to be commit 5ef80f034d)
2007-10-10 13:00:00 -05:00
Andrew Tridgell
0ca4a77005 r3030: added testing of lock cancel, and some more special offsets (locks
with the top bit set are special)
(This used to be commit f732a983d4)
2007-10-10 13:00:00 -05:00
Andrew Tridgell
d0cc571e30 r3029: implemented byte range lock timeouts.
This adds a pvfs_wait_message() routine which uses the new messaging
system, event timers and talloc destructors to give a nice generic
async event handling system with a easy to use interface. The
extensions to pvfs_lock.c are based on calls to pvfs_wait_message()
routines.

We now pass all of our smbtorture locking tests, although while
writing this code I have thought of some additonal tests that should
be added, particularly for lock cancel operations. I'll work on that
soon.

This commit also extends the smbtorture lock tests to test the rather
weird 0xEEFFFFFF locking semantics that I have discovered in
win2003. Win2003 treats the 0xEEFFFFFF boundary as special, and will
give different error codes on either side of it. Locks on both sides
are allowed, the only difference is which error code is given when a
lock is denied. Anyone like to hazard a guess as to why? It has
me stumped.
(This used to be commit 4395c0557a)
2007-10-10 13:00:00 -05:00
Andrew Tridgell
1edc2f95e3 r2983: report a failure if a server doesn't update the write time at all
after 2 minutes
(This used to be commit b2298a1c5f)
2007-10-10 12:59:54 -05:00
Andrew Tridgell
970ba3a736 r2982: added a test that shows the amount of time a server takes to update
the write time on a file after a write.
(This used to be commit efee3c90f9)
2007-10-10 12:59:54 -05:00
Andrew Tridgell
a1abaa6ba9 r2929: longhorn does not produce sorted directory listings! This is
excellent, as it means we don't lose any compatibility by also not
giving sorted listings. I was very much afraid that applications had
begun to rely on this (as its guaranteed by w2k NTFS).

no longer mark a non-sorting server as an error
(This used to be commit 1d21c9a9d1)
2007-10-10 12:59:49 -05:00
Volker Lendecke
b33be58874 r2912: Test for the sort-of weird file stamp semantics. The last_write seems to be
updated only by an arbitrary close() after the file was actually written to.

Volker
(This used to be commit ab52ebfdcc)
2007-10-10 12:59:47 -05:00
Andrew Tridgell
fea0571034 r2909: fix some RAW-SEARCH torture mem leaks
(This used to be commit 75ca5ba509)
2007-10-10 12:59:47 -05:00
Volker Lendecke
3b6a240284 r2895: Another nut to crack, not sure how hard: The statinfo on a file does obviously
not change during a write. The nasty thing: Excel 2003 obviosly does depend on
this.

Volker
(This used to be commit 8e26775134)
2007-10-10 12:59:45 -05:00
Andrew Tridgell
16ed45d627 r2738: free up the session information as soon as it is invalidated in the
RAW-CONTEXT test case
(This used to be commit f4a7a3282a)
2007-10-10 12:59:28 -05:00
Andrew Tridgell
b2f1a29e43 r2710: continue with the new style of providing a parent context whenever
possible to a structure creation routine. This makes for much easier
global cleanup.
(This used to be commit e14ee428ec)
2007-10-10 12:59:25 -05:00
Andrew Tridgell
aa12305945 r2680: switched the libcli/raw/ code over to use talloc_reference(), which simplifies things quite a bit
(This used to be commit c82a9cf750)
2007-10-10 12:59:21 -05:00
Andrew Tridgell
5b44130afa r2671: we're getting too many errors caused by the talloc_realloc() API not
taking a context (so when you pass a NULL pointer you end up with
memory in a top level context). Fixed it by changing the API to take a
context. The context is only used if the pointer you are reallocing is
NULL.
(This used to be commit 8dc23821c9)
2007-10-10 12:59:20 -05:00
Andrew Tridgell
e3880fa759 r2660: - converted the libcli/raw/ library to use talloc_increase_ref_count()
rather than manual reference counts

- properly support SMBexit in the cifs and posix backends

- added a logoff method to all backends

With these changes the RAW-CONTEXT test now passes against the posix backend
(This used to be commit c315d6ac1c)
2007-10-10 12:59:18 -05:00
Andrew Tridgell
ec0128ef01 r2649: - used some cpp tricks to make users of talloc() and talloc_realloc()
to get auto-naming of pointers very cheaply.

- fixed a couple of memory leaks found with the new tricks

A typical exit report for smbd is now:

talloc report on 'null_context' (total 811 bytes in 54 blocks)
        auth/auth_sam.c:334            contains     20 bytes in   1 blocks
        struct auth_serversupplied_info contains    498 bytes in  33 blocks
        UNNAMED                        contains      8 bytes in   1 blocks
        lib/data_blob.c:40             contains     16 bytes in   1 blocks
        iconv(CP850,UTF8)              contains     61 bytes in   4 blocks
        iconv(UTF8,CP850)              contains     61 bytes in   4 blocks
        iconv(UTF8,UTF-16LE)           contains     67 bytes in   4 blocks
        iconv(UTF-16LE,UTF8)           contains     67 bytes in   4 blocks
        UNNAMED                        contains     13 bytes in   1 blocks

which is much better than before
(This used to be commit 6e721393d0)
2007-10-10 12:59:16 -05:00
Andrew Tridgell
82b61938ac r2593: don't crash if the server doesn't know that 0 count searches mean 1
(This used to be commit 640ced4530)
2007-10-10 12:59:11 -05:00
Andrew Tridgell
ca60193f24 r2520: - finished implementing the server side of the old style search requests
(This used to be commit 4e4859c06b)
2007-10-10 12:59:01 -05:00
Andrew Tridgell
23ba434b01 r2469: complete overhaul of the old-style RAW_SEARCH_ calls (the OS/2 and
original core level calls). The old code was completely wrong in many respects.

also fixed the EA_SIZE level in the server

extended the RAW-SEARCH test suite to test the new code properly
(This used to be commit 71480271ad)
2007-10-10 12:58:56 -05:00
Andrew Tridgell
6108ead954 r2462: added a test for the error code for no matching filename
(This used to be commit 7bfbbc38ed)
2007-10-10 12:58:55 -05:00