summaryrefslogtreecommitdiff
path: root/source3/utils/torture.c
AgeCommit message (Collapse)AuthorFilesLines
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)
1998-07-29merge from the autoconf2 branch to the main branchAndrew Tridgell1-3/+1
(This used to be commit 3bda7ac417107a7b01d91805ca71c4330657ed21)
1998-05-12This is a security audit change of the main source.Jeremy Allison1-5/+5
It removed all ocurrences of the following functions : sprintf strcpy strcat The replacements are slprintf, safe_strcpy and safe_strcat. It should not be possible to use code in Samba that uses sprintf, strcpy or strcat, only the safe_equivalents. Once Andrew has fixed the slprintf implementation then this code will be moved back to the 1.9.18 code stream. Jeremy. (This used to be commit 2d774454005f0b54e5684cf618da7060594dfcbb)
1998-04-17clientgen.c: Changes 'cli_xxx_' calls to use the followingJeremy Allison1-5/+9
regularized parameter syntax: setup, setup_count, max_setup_count, params, params_count, max_params_count, data, data_count, max_data_count, (and if a reply is needed) *reply_params, *reply_data_len *reply_data, *reply_data_len This allows the pointers and the lengths that relate to these pointers to be next to each other in the parameter list. This makes seeing what you are passing to these functions much easier to see. Getting ready for adding the lib/rpc/client functions needed to do security=domain. torture.c: Fixed it so it uses / rather than \\ internally for the //machine/share syntax. Jeremy. (This used to be commit 38350ea8b949d0908497490898ff04df7591ccac)
1998-04-12some hacks to the torture codeAndrew Tridgell1-1/+10
(This used to be commit 02786747ee6774f617d95b08a5c5912bf86e7586)
1998-01-22This is *not* a big change (although it looks like one).Jeremy Allison1-1/+1
This is merely updating the Copyright statements from 1997 to 1998. It's a once a year thing :-). NO OTHER CHANGES WERE MADE. Jeremy. (This used to be commit b9c16977231efb274e08856f7f3f4408dad6d96c)
1997-11-24added cli_rmdir and cli_mkdirAndrew Tridgell1-5/+44
added test in smbtorture for the server updating the directory modify time when a file is added to a directory cleanup in smbtorture so no garbage files are left on the server (This used to be commit 3a5e07f1e994396853e6340e8ef3f4d12bb0243e)
1997-11-23added a SMB_QUERY_FILE_ALL_INFO test into smbtortureAndrew Tridgell1-1/+14
W95 doesn't seem to support this call. (This used to be commit 162947c6e672580216c6223a44d25b874f0487ab)
1997-11-23added some QPATHINFO and QFILEINFO tests into smbtorture.Andrew Tridgell1-0/+59
This tests for things like midnight access times, sticky create times and word reversed INFO_STANDARD returns (This used to be commit 89141de14edf9e46ab279d2a74a9b026716a0ba8)
1997-11-23test SMBsetatr as wellAndrew Tridgell1-4/+21
(This used to be commit 2f29c24ba721e417828efca57011ed45892191a5)
1997-11-23added a test for the NT SMBgetatr bug in smbtortureAndrew Tridgell1-1/+43
added support for choosing the protocol level in smbtorture (-m option) use -1 for null date in cli_close() get the attributes right in cli_open() (This used to be commit d64d40a6ec57a4a999ae1f39175bcfd86ccb196e)