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

236 Commits

Author SHA1 Message Date
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
Andrew Tridgell
d78a1ac756 r2457: expanded the RAW-SEARCH test to test for what happens when a directory
is modified while being searched, and whether the server always
returns sorted directory listings.
(This used to be commit e23514c78f)
2007-10-10 12:58:55 -05:00
Jeremy Allison
f0ae80e18c r2217: Ad-hoc tests to allow me to work out the correct error code
for the bad path algorithm.
Jeremy.
(This used to be commit d2d32d8f2b)
2007-10-10 12:58:32 -05:00
Jeremy Allison
ebe1733768 r2151: Added some more ad-hoc tests. Found bugs in Samba3 with these :-).
Jeremy.
(This used to be commit fe6506e190)
2007-10-10 12:58:27 -05:00
Stefan Metzmacher
8aa051c7b2 r2071: - change smbtorture to use the popt_common stuff
this means -U DOM\\user is know allowed

- torture:userdomain is a new smb.conf parameter
  because lp_workgroup is not the domain of the user

- we use torture:userdomain now in the tests instad of lp_workgroup

- for backward compat the userdomain is lp_workgroup() by default and
  not lp_netbios_name(), which my change later to match 'net' and 'smbclient'..

- we now have dublicate options e.g. -N -s ...
  tridge: can we change this?

metze
(This used to be commit 4733dcbf5f)
2007-10-10 12:58:23 -05:00
Stefan Metzmacher
b0856b8ad0 r1996: fix compiler warnings
metze
(This used to be commit dd8d68f3ec)
2007-10-10 12:58:16 -05:00
Andrew Tridgell
b83ba93eae r1983: a completely new implementation of talloc
This version does the following:

  1) talloc_free(), talloc_realloc() and talloc_steal() lose their
     (redundent) first arguments

  2) you can use _any_ talloc pointer as a talloc context to allocate
     more memory. This allows you to create complex data structures
     where the top level structure is the logical parent of the next
     level down, and those are the parents of the level below
     that. Then destroy either the lot with a single talloc_free() or
     destroy any sub-part with a talloc_free() of that part

  3) you can name any pointer. Use talloc_named() which is just like
     talloc() but takes the printf style name argument as well as the
     parent context and the size.

The whole thing ends up being a very simple piece of code, although
some of the pointer walking gets hairy.

So far, I'm just using the new talloc() like the old one. The next
step is to actually take advantage of the new interface
properly. Expect some new commits soon that simplify some common
coding styles in samba4 by using the new talloc().
(This used to be commit e35bb094c5)
2007-10-10 12:58:14 -05:00
Andrew Tridgell
ada86316e5 r1820: added a strcmp_safe() that handles NULL pointers. Needed for the
search torture test, as some servers return really bad entries.
(This used to be commit c900ebb3ac)
2007-10-10 12:57:59 -05:00
Andrew Bartlett
14924a9fe7 r1795: Fix the multiple session setup torture tests.
Andrew Bartlett
(This used to be commit c4036f2189)
2007-10-10 12:57:57 -05:00
Andrew Bartlett
63c5ca7d58 r1769: Add a new torture test to check vuid properties, and SPNEGO/non-SPNEGO games.
Andrew Bartlett
(This used to be commit 90d70a63ee)
2007-10-10 12:57:55 -05:00
Andrew Tridgell
ae274c84d7 r1740: fixed the torture suite for ASCII-only servers
(This used to be commit c3bce90be7)
2007-10-10 12:57:52 -05:00
Stefan Metzmacher
c5fbb6f23c r1654: rename cli_ -> smbcli_
rename CLI_ -> SMBCLI_

metze
(This used to be commit 8441750fd9)
2007-10-10 12:57:47 -05:00
Andrew Tridgell
44194cc663 r1632: in case of error don't send uninitialised fnums on the wire
(This used to be commit 13cd58efce)
2007-10-10 12:57:45 -05:00
Stefan Metzmacher
d093b7e777 r1547: rename 'enum <bla>_level' -> 'enum smb_<bla>_level'
e.g. we now have 'union smb_mkdir' and 'enum smb_mkdir_level' in sync

we may should also rename 'RAW_MKDIR_*' -> 'SMB_MKDIR_*'

metze
(This used to be commit 0bb50dcf1c)
2007-10-10 12:57:41 -05:00
Jeremy Allison
a8069f5778 r1113: Test for wildcards in chkpath.
Jeremy.
(This used to be commit 14cf961b7f)
2007-10-10 12:56:38 -05:00
Jeremy Allison
02079ccc2e r1098: Extended raw chkpath to catch regressions.
Jeremy.
(This used to be commit 37d1fa1684)
2007-10-10 12:56:38 -05:00
Stefan Metzmacher
770e3307ce r962: convert 'unsigned' and 'unsigned int' to uint_t
metze
(This used to be commit 57151e80eb)
2007-10-10 12:56:23 -05:00
Jeremy Allison
496220916a r946: Updated attribute only oplock tester to cover more cases.
Jeremy.
(This used to be commit 6c9d32173b)
2007-10-10 12:56:21 -05:00
Stefan Metzmacher
45e93c19ef r943: change samba4 to use 'uint8_t' instead of 'unsigned char'
metze
(This used to be commit b5378803fd)
2007-10-10 12:56:21 -05:00
Stefan Metzmacher
fcd718c7d8 r890: convert samba4 to use [u]int8_t instead of [u]int8
metze
(This used to be commit 2986c5f08c)
2007-10-10 12:56:16 -05:00
Stefan Metzmacher
f88bf54c7f r889: convert samba4 to use [u]int16_t instead of [u]int16
metze
(This used to be commit af6f1f8a01)
2007-10-10 12:56:16 -05:00
Stefan Metzmacher
f9d8f8843d r884: convert samba4 to use [u]int32_t instead of [u]int32
metze
(This used to be commit 0e5517d937)
2007-10-10 12:56:15 -05:00
Andrew Tridgell
579c13da43 r873: converted samba4 to use real 64 bit integers instead of
structures. This was suggested by metze recently.

I checked on the build farm and all the machines we have support 64
bit ints, and support the LL suffix for 64 bit constants. I suspect
some won't support strtoll() and related functions, so we will
probably need replacements for those.
(This used to be commit 9a9244a1c6)
2007-10-10 12:56:14 -05:00
Jeremy Allison
daa890e2c8 r865: Regression test for attribute-only opens not causing an oplock break.
Samba3 server used to get this wrong.
Jeremy.
(This used to be commit 4120b3bdf6)
2007-10-10 12:56:13 -05:00
Jeremy Allison
31b9470996 r741: Test from Volker in RAW-OPEN for truncating a file containing locks.
Also added the same ad-hoc test is LOCK7.
Jeremy.
(This used to be commit 6cb21ccda3)
2007-10-10 12:53:46 -05:00
Andrew Tridgell
b394a4c2ff r336: added a -X command line option to smbtorture to enable dangerous or
possibly destructive tests. Use with care!

Added IDL and test code for samr_Shutdown() and samr_SetDsrmPassword()
(This used to be commit 84de0b7e58)
2007-10-10 12:51:33 -05:00
Jeremy Allison
763c4bc9ac r204: Turns out that the string in the SEARCH unix_info level is that
rare thing, a non-length string (ie. not a WIRE_STRING) but a null
terminated char string. There wasn't a good interface to pull that
out of a blob (all the string interfaces assumed WIRE_STRINGS). Added
a new one, only used for this call. Sucks, I know - but the alternatives
suck more. Added tests for some of the unix info returned.
Jeremy.
(This used to be commit 4d0ed04c54)
2007-10-10 12:51:16 -05:00
Jeremy Allison
6f47ce8b6c r203: Added size and alloc size tests to UNIX info level.
Jeremy.
(This used to be commit 16455c5b34)
2007-10-10 12:51:16 -05:00
Jeremy Allison
b560bf5361 r184: Fix UNIX Search info level. This still needs to be added to the raw
client library before this test can work.
Jeremy.
(This used to be commit 7b2a266543)
2007-10-10 12:51:15 -05:00
Andrew Tridgell
ac193579e7 r152: a quick airport commit ....
added ldbedit, a _really_ useful command

added ldbadd, ldbdel, ldbsearch and ldbmodify to build

solved lots of timezone issues, we now pass the torture tests with
client and server in different zones

fixed several build issues

I know this breaks the no-LDAP build. Wait till I arrive in San Jose for that
fix.
(This used to be commit af34710d4d)
2007-10-10 12:51:11 -05:00
Jeremy Allison
4c12490730 Added one more test for "dirname\."
Jeremy.
(This used to be commit a7ca9620d5)
2004-04-02 18:59:38 +00:00
Andrew Tridgell
f169d83a8b fixed the handling of level II oplocks in samba4, especially when
acting as a cifs redirectory (using the cifs backend)
(This used to be commit 06a8100e6a)
2004-03-25 02:41:19 +00:00
Tim Potter
9a6388179b Convert libcli routines to return NTSTATUS instead of BOOL. Again, the
only users are smbclient and smbtorture.
(This used to be commit 54cb508c78)
2004-02-10 11:33:35 +00:00
Tim Potter
4639eb5a58 Convert libcli routines to use cli_tree instead of cli_state. Port
smbtorture to use the new interface.

Part 2 will be to eliminate cli_state from smbtorture as this is now
the only place where it is used.
(This used to be commit db1cc96af6)
2004-02-08 00:51:07 +00:00
Andrew Tridgell
0593fd96fb cope with a wider range of broken servers in the RAW-QFILEINFO test
(This used to be commit eb6fc29caf)
2004-01-21 03:30:03 +00:00
Andrew Tridgell
926240428c * patch based on work by Jim Myers to unify the ioctl handling to be
more like the other major SMB functions

* added SMBntrename code
(This used to be commit f2d3dc9893)
2003-12-04 02:03:06 +00:00
Andrew Tridgell
60f4bb657a allow qfsinfo to continue with just 10 levels supported in the server
(This used to be commit 9476dd5620)
2003-11-06 05:51:58 +00:00
Andrew Tridgell
4e73a3c0fe fixed snprintf.c for systems that have only some of the *printf() family of functions
cope with servers that return bogus (too large) values in max_xmit

cope with a couple more error conditions in RAW-SFILEINFO

better startup time heuristics in NBENCH
(This used to be commit 89f7261ba5)
2003-10-10 05:40:32 +00:00
Andrew Tridgell
0becf4d683 thanks to ntfsd and some google searches I worked out what the unknown
fields in level 261 and level 262 of directory search are, plus the
names of the levels

the unknown fields are a 64bit unique file id, and match the 64 bit
number from the internal_information qfileinfo level
(This used to be commit b69f54eb02)
2003-09-02 04:37:33 +00:00
Andrew Tridgell
11c5869a45 I think I've finally got the ascii/unicode issues right in trans2 find
first

Also expanded the rename test a little
(This used to be commit 723af7f097)
2003-08-31 03:16:52 +00:00
Andrew Tridgell
a8a5ac2bd2 expanded the RAW-READ test to make it clearer that all locks conflict
in SMBlockread, not just other peoples locks (error in spec)
(This used to be commit a56f6896bf)
2003-08-29 04:35:35 +00:00
Andrew Tridgell
133c7a9055 fix a segv when server doesn't support ATTRIBUTE_TAG_INFORMATION
(This used to be commit 19abdace95)
2003-08-23 18:53:46 +00:00
Andrew Tridgell
de10237719 more fixes from the IRIX compiler (thanks herb!)
(This used to be commit 02d068ba7d)
2003-08-15 18:54:44 +00:00
Andrew Tridgell
fe31953678 a few build fixes to try to get irix building
(This used to be commit 4059fbcf02)
2003-08-15 15:16:34 +00:00
Andrew Tridgell
d0a91f4ef2 don't give detailed errors for levels that fail
(This used to be commit 04b60864a6)
2003-08-15 15:12:30 +00:00
Andrew Tridgell
33f413a6bf test resume by name before resume by flags
(This used to be commit 9f395dd768)
2003-08-15 15:11:34 +00:00
Jeremy Allison
0cb8ef099f Print out position info, ensure NT_RENAME info level only works
in a directory.
Jeremy.
(This used to be commit d623a51da0)
2003-08-15 03:54:45 +00:00
Jeremy Allison
a19e269c2c Extended seek tests to check position information.
Jeremy.
(This used to be commit c4cc40c5c8)
2003-08-14 21:11:06 +00:00
Andrew Tridgell
89f55d36f3 added the ancient SMBcreate operation to the testsuite and client lib
(This used to be commit 3eef35e581)
2003-08-14 01:31:31 +00:00
Andrew Tridgell
b34df4fa86 added read/write seek testing
(This used to be commit 66691dc958)
2003-08-14 01:03:56 +00:00
Andrew Tridgell
a33f570776 - added test for position_information via paths
(This used to be commit 595be06a42)
2003-08-13 20:22:37 +00:00
Andrew Tridgell
0908c05b5c - expanded the ntrename test
- expanded seek test - the position information is handle specific!
(This used to be commit 163970bda6)
2003-08-13 20:19:23 +00:00
Andrew Tridgell
75c0125fb7 - added SMBntrename test suite
- allow username of form DOMAIN\username or DOMAIN/username

- added ntrename to gentest
(This used to be commit 2b464472c1)
2003-08-13 16:04:21 +00:00
Andrew Tridgell
d2b5b80c95 - cope with servers that don't properly implement SMBexit
- add the pidhigh test to the locking test

- expand the rename and unlink testing

- test a wider range of offsets in RAW-READ
(This used to be commit ef819249ec)
2003-08-13 02:04:44 +00:00
Andrew Tridgell
ef2e26c91b first public release of samba4 code
(This used to be commit b0510b5428)
2003-08-13 01:53:07 +00:00