summaryrefslogtreecommitdiff
path: root/source3/utils/torture.c
AgeCommit message (Collapse)AuthorFilesLines
2001-03-30utils/torture.c: Added one more delete on close test.Jeremy Allison1-0/+55
smbd/notify_kernel.c: This code was wrong I believe. It was structured to only return a changenotify event on being called from timeout processing (t != 0). The kernel changenotify events should fire on *asynchronous* processing (EINTR return from select caused by the realtime signal delivery) with t == 0. Reported by Juergen Hasch (Hasch@t-online.de). ANDREW PLEASE CHECK THIS ! Currently the hash style changenotify is done on async processing as well as timeout processing. As this is expensive we may want to revisit doing this and maybe set it to fire only on timeout processing. Jeremy. (This used to be commit f952380c5d0cfbbec1e7de98b712952f302cddfd)
2001-03-30Added one more test - just to make sure flag can be unset.Jeremy Allison1-1/+43
Jeremy. (This used to be commit 54960b9c8d6be6646a0c0e8ef9ee6c61a4b69cf8)
2001-03-30Expanded delete on close test to 6 cases. I now understand the semantics ofJeremy Allison1-2/+53
this and the FILE_SHARE_DELETE flag exactly. The bad news is it means our share mode handling is broken (again :-). Jeremy. (This used to be commit a55ed1a91d91beafb2f199d1da530169715dbe0e)
2001-03-30Changed to using GENERIC_XX constants instead of hex values to makeJeremy Allison1-9/+57
delete test explicit. Jeremy. (This used to be commit cb5963af0ecabab928aafacd27714e337b9bb37e)
2001-03-30Added delete on close test that has allowed me to determine how w2kJeremy Allison1-0/+147
behaves in this situation. Jeremy. (This used to be commit b0266fe0a8c707cb7e818269dc7fe52da709fdab)
2001-01-05Needed a callback arg on cli_list ...Richard Sharpe1-4/+4
(This used to be commit d45e667a74fc2fcbf69c4819d480269c03dbfae4)
2001-01-04I need a callback arg for cli_NetServerEnum and cli_RNetShareEnum, so I hadRichard Sharpe1-3/+3
to modifiy any routine that calls it to pass NULL and so forth. Should have no impact. It compiles OK. (This used to be commit 7f862e387f935a2125481338eee850afcb8d82ba)
2000-12-11Fixed very subtle bug returning correct error on an open, when we haveJeremy Allison1-2/+69
a choice of invalid share mode and access denied. We must return the access denied by preference, but also remember to break the oplocks... This is needed for multi-user MS-Access. Jeremy. (This used to be commit 7eb7241442ea0f1e065b009c3cccd5821b89a8b6)
2000-11-16Ok - fixed a bug in our levelII oplock code. We need to break a level II onJeremy Allison1-4/+120
a byte range lock (write lock only, but Win2k breaks on read lock also so I do the same) - if you think about why, this is obvious. Also fixed our client code to do level II oplocks, if requested, and fixed the code where we would assume the client wanted level II if it advertised itself as being level II capable - it may not want that. Jeremy. (This used to be commit 213cd0b5192307cd4b0026cae94b2f52fb1b0c02)
2000-09-26added NEGNOWAIT. sent to secure@microsoft.comLuke Leighton1-2/+35
(This used to be commit b21179331802aace566671dcff6db22cdf4b3e81)
2000-06-15add -d debuglevel optionAndrew Tridgell1-1/+5
(This used to be commit 448f21325f8ff53f3ff5e45c22e07f7164529bc9)
2000-06-13added -L switch to tell smbtorture to use oplocksAndrew Tridgell1-2/+7
(This used to be commit 73033d0803317c7de017cac7f7669f4afb08e7c0)
2000-05-27fixed bugs in fdpass testsAndrew Tridgell1-8/+11
(This used to be commit ee4f6335adb2a781eea7e1f6b520d79ea1197427)
2000-05-242nd evil simultaneous read-write test. forks. one writer. othersLuke Leighton1-1/+118
are readers. writes between 1 and 20 bytes. reads as much as possible. compares. repeat until end of buffer (fixed size: 131072 bytes) reached. (This used to be commit 26f51a7abbfa9bd9051969dffaebe3cdf9e93c8f)
2000-05-24use \\ in front of filenamesAndrew Tridgell1-2/+2
(This used to be commit a92f8c8620272bcbdd73741b8e87f8d5fac45b49)
2000-05-24torture test:Luke Leighton1-0/+91
same cli_state: open file rw/denynone, open *same* file r/denynone. write to file (fd1) read from file (fd2). compare. repeat. two cli_states: open file rw/denynone (cli1), open *same* file r/denynone (cli2). write to file (fd1) read from file (fd2). compare. repeat. (This used to be commit 0a993f37830938a8d4262c6b7913af502bbf015f)
2000-05-04rpc_server/srv_lsa.c: Bring into sync with 2.0.x.Jeremy Allison1-2/+14
rpc_server/srv_pipe_hnd.c: Bring into sync with 2.0.x. smbd/blocking.c: Improve blocking debug reporting. utils/torture.c: Added check for NT locking bug. Jeremy. (This used to be commit e8ff6d3fb5537c39611a5784bf7216ae812acd27)
2000-05-04added a test for the NT byte range lock into smbtortureAndrew Tridgell1-1/+16
(This used to be commit 7cfd45cc56e01a20a122c7742dc7e6a4ed59415f)
2000-05-03Added read overlay write lock on same fnum test to locktest2.Jeremy Allison1-1/+117
Added locktest5 for locking stacks. Jeremy. (This used to be commit 65399ae1f058886b8779a01fb35fe3080cc3c145)
2000-04-27Fixed subtle unlocking bug when a file is closed. We need to store theJeremy Allison1-1/+1
smbpid used when a file was opened in the files_struct. Else we use the wrong global_smbpid when we are closing the file and trying to remove the brl locks - this causes the brl locks to be left when the file is closed as the samba_context check fails. Jeremy. (This used to be commit 2746e5602e493e5b022764b4b839eb4d2f14363b)
2000-04-27quick hack to get smbtorture working againAndrew Tridgell1-0/+2
(This used to be commit 2d37c1f98f45646546ee76743f9df90b1c0b01ae)
2000-03-07added a tcon test: make two tconXs with the same user/pass, open a fileLuke Leighton1-0/+72
with one of them and try to write to the file with the other. (This used to be commit f8d3ce0419aee44e4d5efe1257ce4b27f7511ceb)
2000-01-16renamed DENY to DENY1Andrew Tridgell1-5/+95
added DENY2 test that checks all 648 deny combinations for the case of two opens on the same connection (This used to be commit 01d4c4784dd26bdfc9883907b3170e8b0ea0cd6f)
2000-01-14casts and defines to make solaris happyAndrew Tridgell1-2/+2
(This used to be commit 77cf152c02b445f4b6e9de393936dd6e54e6f442)
2000-01-14we now pass all byte range locking testsAndrew Tridgell1-14/+12
the last piece was to use a smb timeout slightly larger than the locking timeout in bloking locks to prevent a race (This used to be commit 1b54cb4a33a65e62c2e3189b78ef073869a60c75)
2000-01-14some more work on the byte range lockingAndrew Tridgell1-14/+16
note the ugly global_smbpid - I hope that won't bethere for long, I just didn't want to do two lots of major surgery at the one time. Using global_smbpid avoids the big change of getting rid of our inbuf/outbuf interface to reply routines. I'll do that once the locking stuff passes all tests. (This used to be commit f8bebf91abcaa5bda3ec8701f9242f220da8943a)
2000-01-13greatly expanded the lock4 locking test. we now pass all but one testAndrew Tridgell1-45/+93
- that should be fixed soon. (This used to be commit 23bb936e1fdeab2ad697ed946c945ef5ce87357d)
2000-01-10I'm currently designing a new locking system (using a tdb database!)Andrew Tridgell1-21/+129
that will make us match NT semantics exactly and do away with the horrible fd multiplexing in smbd. this is some diag stuff to get me started. - added the ability to do read or write locks in clientgen.c - added a LOCK4 test to smbtorture. This produces a report on the server and its locking capabilities. For example, NT4 gives this: the same process cannot set overlapping write locks the same process can set overlapping read locks a different connection cannot set overlapping write locks a different connection can set overlapping read locks a different pid cannot set overlapping write locks a different pid can set overlapping read locks the same process can set the same read lock twice the same process cannot set the same write lock twice the same process cannot override a read lock with a write lock the same process can override a write lock with a read lock a different pid cannot override a write lock with a read lock the same process cannot coalesce read locks this server does strict write locking this server does strict read locking whereas Samba currently gives this: the same process can set overlapping write locks the same process can set overlapping read locks a different connection cannot set overlapping write locks a different connection can set overlapping read locks a different pid can set overlapping write locks a different pid can set overlapping read locks the same process can set the same read lock twice the same process can set the same write lock twice the same process can override a read lock with a write lock the same process can override a write lock with a read lock a different pid can override a write lock with a read lock the same process can coalesce read locks this server does strict write locking this server does strict read locking win95 gives this - I don't understand why! the same process cannot set overlapping write locks the same process cannot set overlapping read locks a different connection cannot set overlapping write locks a different connection cannot set overlapping read locks a different pid cannot set overlapping write locks a different pid cannot set overlapping read locks the same process cannot set the same read lock twice the same process cannot set the same write lock twice the same process cannot override a read lock with a write lock the same process cannot override a write lock with a read lock a different pid cannot override a write lock with a read lock the same process cannot coalesce read locks this server does strict write locking this server does strict read locking (This used to be commit 49637936b6e9478df248c4ef73d818870c73b597)
2000-01-08extent smbtorture to test with both an exe file and a dat fileAndrew Tridgell1-37/+43
(This used to be commit dd2ce575047eb57288bff11669512132fd347fda)
2000-01-08cli_open() wasn't handling DENY_FCB or O_WRONLY correctly.Andrew Tridgell1-1/+1
After fixing that I needed to use O_RDWR instead of O_WRONLY in several places to avoid the silly bug in MS servers that doesn't allow getattrE on a file opened with O_WRONLY (This used to be commit e21aa4cb088f348139309d29c85c48c8b777cff5)
2000-01-08added a DENY test that tests deny mode handling. It produces a matrixAndrew Tridgell1-2/+86
of 324 lines (6*6*3*3) of all possible deny mode behaviour. This allows us to compare with NT. We currently don't match :) (This used to be commit 2071105b439e87cb1c7c3a8c1b2046441eb46270)
1999-12-13first pass at updating head branch to be to be the same as the SAMBA_2_0 branchAndrew Tridgell1-368/+591
(This used to be commit 453a822a76780063dff23526c35408866d0c0154)
1999-08-18event log update, netsessenum, netconnenum update.Luke Leighton1-2/+2
(This used to be commit 819af560745b0bec7bfb9067dd9d9d6cfabb1555)
1999-06-24safe string error reporting functions (found a potential buffer overflowLuke Leighton1-1/+1
of a pstrcpy into an fstring). (This used to be commit ac0060443de800fec9042b69b299ff2e9128a31c)
1999-05-07variation of random SMBtrans2. random delays in between reconnectionsLuke Leighton1-10/+12
increased. size of large random buffer decreased. number of reconnection attempts increased. (This used to be commit 980a7b11f3dabce561a0ed02041695451bfeb391)
1999-02-11refinement of random ipc$ SMBtrans torture test. send requests, andLuke Leighton1-4/+58
don't wait for responses :-) (This used to be commit c1d65e906054297e42d6d177194d3b9ab16c7e35)
1999-02-10use jeremy's versions of the UNICODE routines.Luke Leighton1-2/+2
(This used to be commit c5109ff782be8774db47a92b48ca6335ec8d6065)
1998-11-17- group database API. oops and oh dear, the threat has been carried out:Luke Leighton1-153/+268
the pre-alpha "domain group" etc parameters have disappeared. - interactive debug detection - re-added mem_man (andrew's memory management, detects memory corruption) - american spellings of "initialise" replaced with english spelling of "initialise". - started on "lookup_name()" and "lookup_sid()" functions. proper ones. - moved lots of functions around. created some modules of commonly used code. e.g the password file locking code, which is used in groupfile.c and aliasfile.c and smbpass.c - moved RID_TYPE_MASK up another bit. this is really unfortunate, but there is no other "fast" way to identify users from groups from aliases. i do not believe that this code saves us anything (the multipliers) and puts us at a disadvantage (reduces the useable rid space). the designers of NT aren't silly: if they can get away with a user- interface-speed LsaLookupNames / LsaLookupSids, then so can we. i spoke with isaac at the cifs conference, the only time for example that they do a security context check is on file create. certainly not on individual file reads / writes, which would drastically hit their performance and ours, too. - renamed myworkgroup to global_sam_name, amongst other things, when used in the rpc code. there is also a global_member_name, as we are always responsible for a SAM database, the scope of which is limited by the role of the machine (e.g if a member of a workgroup, your SAM is for _local_ logins only, and its name is the name of your server. you even still have a SID. see LsaQueryInfoPolicy, levels 3 and 5). - updated functionality of groupname.c to be able to cope with names like DOMAIN\group and SERVER\alias. used this code to be able to do aliases as well as groups. this code may actually be better off being used in username mapping, too. - created a connect to serverlist function in clientgen.c and used it in password.c - initialisation in server.c depends on the role of the server. well, it does now. - rpctorture. smbtorture. EXERCISE EXTREME CAUTION. (This used to be commit 0d21e1e6090b933f396c764af535ca3388a562db)
1998-10-24volker was concerned about unique inode numbers and smbsh. This set ofAndrew Tridgell1-4/+5
changes uses the unique index number from a SMB_QUERY_FILE_ALL_INFO to try to provide inode numbers. If it is 0 then use the hash of the filename as before. (This used to be commit 2565ccf9de9d5e80fdb5bcadbc7130faba386d95)
1998-10-20fixed a connection bug in torture testAndrew Tridgell1-11/+66
(This used to be commit 2b892130dfc1938e93e69e490a8a9e9ed57a1971)
1998-10-16added maxfid testAndrew Tridgell1-11/+66
(This used to be commit 710027a88a62565fbbe9eb5787e924d019906841)
1998-10-08dce/rpcLuke Leighton1-3/+3
(This used to be commit 62fdeef1b79c5c4c9bf0e860881651711bb80b9a)
1998-10-08- don't generate 0 params in tortureAndrew Tridgell1-1/+1
- handle 0 params in ipc.c (This used to be commit c0dc8e87f0d56444a8ddff0817a94065ca295847)
1998-10-08- fixed a bunch of warnings and minor errorsAndrew Tridgell1-53/+37
- got smbtorture to compile - removed %D from some of lukes code - Luke, what is %D? it ain't portable anyway (This used to be commit 91597c12fb593f49b23c7cea5b64dbb89a0428b3)
1998-10-08use 1 second resolution calls if possibleAndrew Tridgell1-3/+3
(This used to be commit 349469221a84658048790d7567b4fcea43c0b759)
1998-10-03added lseek() support for directoriesAndrew Tridgell1-2/+2
(This used to be commit 67ca971b0b00b5256b0af2c1c5777c393f9cef0b)
1998-10-02some changes in smbtorture as a result of clientgen interface changesAndrew Tridgell1-5/+5
for smbwrapper note that Lukes client changes broke smbtorture. This doesn't fix it, but at least I didn't break it more than it was. (This used to be commit 252b52091c11d8a6cc9c70f32671aee865ae7b41)
1998-09-25Makefile.in: Fixed bug with continuation line causing proto to fail.Jeremy Allison1-5/+5
Added $(PROGS) $(SPROGS) as targets for make clean. acconfig.h: Added HAVE_IRIX_SPECIFIC_CAPABILITIES. configure.in: Added sys/capability.h header check. Added function checks for srandom random srand rand. Added HAVE_IRIX_SPECIFIC_CAPABILITIES test. includes.h: Added #include <sys/capability.h>. ntdomain.h: Moved struct acct_info into here from smb.h smb.h: Added KERNEL_OPLOCK_CAPABILITY define. Moved enum action_type into rpcclient.h Moved struct cli_state into client.h Moved struct nt_client_info, struct tar_client_info, struct client_info into rpcclient.h lib/genrand.c: Changed to use sys_random() & friends. lib/smbrun.c: Lose capabilities after fork. lib/system.c: Added set_process_capability(), set_inherited_process_capability() sys_random(), sys_srandom(). lib/util.c: Added Ander's EFBIG lock check to fcntl_lock for 64 bit access to an 32 bit mounted NFS filesystem. nmbd/nmbd.c: Changed to use sys_random() & friends. nmbd/nmbd_browsesync.c: Changed to use sys_random() & friends. passdb/ldap.c: Missed one pdb_encode_acct_ctrl call. passdb/passdb.c: Changed to Ander's code for ' ' characters. passdb/smbpass.c: Added Ander's code to reset ACB_PWNOTREQ. script/mkproto.awk: Added 'long' to prototypes. smbd/chgpasswd.c: Lose capabilities after fork. smbd/open.c: Do the mmap *after* the kernel oplock. smbd/oplock.c: Removed stub code from kernel oplock path. Added set_process_capability(), set_inherited_process_capability() calls. smbd/reply.c: Initialize count = 0, offset = 0. smbd/server.c: Added set_process_capability(), set_inherited_process_capability() calls. tests/summary.c: Ensure we have RANDOM or RAND. utils/smbpasswd.c: Added Ander's code to reset ACB_PWNOTREQ. utils/torture.c: Changed to use sys_random() & friends. Jeremy. (This used to be commit e8be306f23963ac00b1a383ebe0cc1421529fb02)
1998-09-05tridge the destroyer returns!Andrew Tridgell1-1/+1
prompted by the interpret_security() dead code that Jean-Francois pointed out I added a make target "finddead" that finds potentially dead (ie. unused) code. It spat out 304 function names ... I went through these are deleted many of them, making others static (finddead also reports functions that are used only in the local file). in doing this I have almost certainly deleted some useful code. I may have even prevented compilation with some compile options. I apologise. I decided it was better to get rid of this code now and add back the one or two functions that are needed than to keep all this baggage. So, if I have done a bit too much "destroying" then let me know. Keep the swearing to a minimum :) One bit I didn't do is the ubibt code. Chris, can you look at that? Heaps of unused functions there. Can they be made static? (This used to be commit 2204475c87f3024ea8fd1fbd7385b2def617a46f)
1998-08-25some smbtorture hacks (random IPC calls)Andrew Tridgell1-4/+60
(This used to be commit b32a346a1c50ba40224b8165e08e78867be2d376)