summaryrefslogtreecommitdiffstats
path: root/source3/smbd/blocking.c
Commit message (Collapse)AuthorAgeFilesLines
* sync'ing up for 3.0alpha20 releaseGerald Carter2002-09-251-7/+27
| | | | (This used to be commit 65e7b5273bb58802bf0c389b77f7fcae0a1f6139)
* Sync 3.0 branch with headJelmer Vernooij2002-08-171-10/+13
| | | | (This used to be commit 42615b945e2e48e53a21ea47f2e45407913a6a1e)
* include/smb_macros.h: Don't round up an allocation if the size is zero.Jeremy Allison2002-03-131-3/+3
| | | | | | | | | | | | | | | "One of these locks is not like the others... One of these locks is not quite the same" :-). When is a zero timeout lock not zero ? When it's being processed by Windows 2000 of course.. This code change, ugly though it is - completely fixes the foxpro/access multi-user file system database problems that people have been having. I used a *wonderful* test program donated by "Gerald Drouillard" <gerald@drouillard.ca> which allowed me to completely reproduce this problem, and to finally determine the correct fix. This also explains why Windows 2000 is *so slow* when responding to the smbtorture lock tests. I *love* it when all these things come together and finally make sense :-). Jeremy. (This used to be commit 8aa9860ea2ea7f5aed4b6aa12794fffdfa81b0d0)
* failed timed locks always give LOCK_CONFLICT not LOCK_NOT_GRANTEDAndrew Tridgell2002-03-101-0/+6
| | | | (This used to be commit ec71c1a66f9fd4b9cb4cad5a9b5b17e20de7aeb1)
* Removed version number from file header.Tim Potter2002-01-301-2/+1
| | | | | Changed "SMB/Netbios" to "SMB/CIFS" in file header. (This used to be commit 6a58c9bd06d0d7502a24bf5ce5a2faf0a146edfa)
* Don't put a \n on the end of the arg to exit_server()Tim Potter2001-11-051-2/+2
| | | | (This used to be commit dfb8566220c3e90ca2b757ea124f53aed103269e)
* Merge the become_XXX -> change_to_XXX fixes from 2.2.2 to HEAD.Jeremy Allison2001-10-181-5/+5
| | | | | | Ensure make_conection() can only be called as root. Jeremy. (This used to be commit 8d23a7441b4687458ee021bfe8880558506eddba)
* Removed 'extern int DEBUGLEVEL' as it is now in the smb.h header.Tim Potter2001-10-021-1/+1
| | | | (This used to be commit 2d0922b0eabfdc0aaf1d0797482fef47ed7fde8e)
* move to SAFE_FREE()Simo Sorce2001-09-171-3/+3
| | | | (This used to be commit a95943fde0ad89ae3f2deca2f7ba9cb5ab612b74)
* this was a stupid typo,Simo Sorce2001-08-301-1/+1
| | | | | thanks to Jochen Dolze (dolze@epcnet.de) for pointing out. (This used to be commit a554d5a99a03e6e8df7e946e5636f5ee80b21969)
* started converting NTSTATUS to be a structure on systems with gcc in order ↵Andrew Tridgell2001-08-271-4/+4
| | | | | | to make it type incompatible with BOOL so we catch errors sooner. This has already found a number of bugs (This used to be commit 1b778bc7d22efff3f90dc450eb12baa1241cf68f)
* converted smbd to use NTSTATUS by defaultAndrew Tridgell2001-08-271-243/+231
| | | | | | | | | | | | | | | | | major changes include: - added NSTATUS type - added automatic mapping between dos and nt error codes - changed all ERROR() calls to ERROR_DOS() and many to ERROR_NT() these calls auto-translate to the client error code system - got rid of the cached error code and the writebmpx code We eventually will need to also: - get rid of BOOL, so we don't lose error info - replace all ERROR_DOS() calls with ERROR_NT() calls but that is too much for one night (This used to be commit 83d9896c1ea8be796192b51a4678c2a3b87f7518)
* Fixed the nastiest locking bug to track down.... smb_pids are sent in theJeremy Allison2001-07-021-4/+8
| | | | | | lockingX calls - use that instead of smb_pid in the packet. Jeremy. (This used to be commit a3925cb9c6303ce24e5fecad6c8f3a0ba78b9ee0)
* next_token() was supposed to be a reentrant replacement for strtok(),Andrew Tridgell2001-06-211-3/+6
| | | | | | | | | | but the code suffered from bitrot and is not now reentrant. That means we can get bizarre behaviour i've fixed this by making next_token() reentrant and creating a next_token_nr() that is a small non-reentrant wrapper for those lumps of code (mostly smbclient) that have come to rely on the non-reentrant behaviour (This used to be commit 674ee2f1d12b0afc164a9e9072758fd1c5e54df7)
* *Wonderful* patch from Andrew Bartlett that will help ensure tdb's areJeremy Allison2001-06-091-10/+12
| | | | | | cleaned on clients abending connections. Thanks Andrew ! Jeremy. (This used to be commit 1b3977c5367a0b713b194f369abd9872ae01ac2a)
* Merge of new 2.2 code into HEAD (Gerald I hate you :-) :-). Allows new SAMRJeremy Allison2001-03-111-4/+0
| | | | | | | RPC code to merge with new passdb code. Currently rpcclient doesn't compile. I'm working on it... Jeremy. (This used to be commit 0be41d5158ea4e645e93e8cd30617c038416e549)
* more merging voodooAndrew Tridgell2000-05-101-0/+4
| | | | | | | this adds "#define OLD_NTDOMAIN 1" in lots of places. Don't panic - this isn't permanent, it should go after another few merge steps have been done (This used to be commit 92109d7b3c06f240452d39f669ecb8c9c86ab610)
* rpc_server/srv_lsa.c: Bring into sync with 2.0.x.Jeremy Allison2000-05-041-2/+2
| | | | | | | | 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)
* include/byteorder.h: ALIGN4/ALIGN2 macros.Jeremy Allison2000-04-111-6/+6
| | | | | | | | | | | | | include/includes.h: Added SMB_BIG_UINT_BITS. lib/util.c: Removed align2/align4 - use macros. libsmb/namequery.c: Use ALIGN2. locking/locking.c: Replace do_lock, do_unlock, args with SMB_BIG_UINT, not SMB_OFF_T. Needed to move to hiding POSIX locks at a lower layer. nmbd/nmbd_processlogon.c: Use ALIGN2/ALIGN4 macros. smbd/blocking.c: Replace do_lock, do_unlock, args with SMB_BIG_UINT, not SMB_OFF_T. smbd/reply.c: Replace do_lock, do_unlock, args with SMB_BIG_UINT, not SMB_OFF_T. Jeremy. (This used to be commit 491eea8a20bf80d426625479326211dc975857a6)
* finally got sick of the "extern int Client" code and the stupidAndrew Tridgell2000-04-111-3/+2
| | | | | | | | | | | | | | | | | assumption that we have one socket everywhere while doing so I discovered a few bugs! 1) the clientgen session retarget code if used from smbd or nmbd would cause a crash as it called close_sockets() which closed our main socket! fixed by removing close_sockets() completely - it is unnecessary 2) the caching in client_addr() and client_name() was bogus - it could easily get fooled and give the wrong result. fixed. 3) the retarget could could recurse, allowing an easy denial of service attack on nmbd. fixed. (This used to be commit 5937ab14d222696e40a3fc6f0e6a536f2d7305d3)
* First set of speed improvements from Ying Chen <ying@almaden.ibm.com>.Jeremy Allison2000-01-251-1/+0
| | | | | | Inline several commonly used functions as macros. Jeremy. (This used to be commit fc0219c7cc4b83e6db17d5b3be70d74fd7971089)
* Added "inherit permissions" patch.Jeremy Allison2000-01-141-1/+7
| | | | | | Fixed locking bug found by Andrew. Jeremy. (This used to be commit 38dffd360dc2e44bfc9e751f017e24f81ff0f2fa)
* changes to reflect the new syntax of the locking calls.Andrew Tridgell2000-01-131-3/+3
| | | | (This used to be commit 44117df2c908d473b3e1a1020b22af6d584809ef)
* first pass at updating head branch to be to be the same as the SAMBA_2_0 branchAndrew Tridgell1999-12-131-25/+30
| | | | (This used to be commit 453a822a76780063dff23526c35408866d0c0154)
* Small update to clitar.c to omit warnings about servers notRichard Sharpe1998-09-261-3/+3
| | | | | | | letting us change the date unless tar_real_noisy is True. Also updated a few places where variables are declared but not set. (This used to be commit b46f1024c939ee9ecb8deb9c844acbd4b5f109c6)
* Ok - this is the 'expose 64 bit to the clients' checkin.Jeremy Allison1998-09-111-2/+2
| | | | | | | | | | | I have tested it by creating a 'holey' 20GB file - checking that it shows up correctl in the NT file view (it does) and am busily copying it to NULL: on the NT box. All good so far.... :-). Also implemented NT 'delete on close' semantics. Jeremy. (This used to be commit 1654faee80648583e6a47ab7eda990fefdf85124)
* Added ssize_t to configure code.Jeremy Allison1998-09-111-13/+37
| | | | | | | | | | | | Got 'religion' about using size_t and ssize_t for read/write stuff as part of the code to expose 64 bits to the client. This checkin does all the 'easy' stuff - such as all the read/write/lock calls - but now comes the harder parts (open & friends) and all the file enquiry functions..... Jeremy. (This used to be commit 36544fe5476f7770bd5748574fc54be7b3ee4d4a)
* Fixes for the problem in blocking locks with file_fsp returning theJeremy Allison1998-08-211-29/+40
| | | | | | | chain_fsp on close (if you don't know what this means, consider yourself lucky - this one took a day to track down :-). Jeremy. (This used to be commit 193cb5382464173e99a538867a266d793f0ceab5)
* Turning on blocking locking code. NB. Blocking lock requests that are notJeremy Allison1998-08-201-35/+249
| | | | | | | | | | | | | | | | | | | the head of an SMB request (ie. are part of a chain) will not be queued - this will be fixed when we move to the new chain code. In practice, this doesn't seem to cause much of a problem (in my admittedly limited testing) bug a debug level zero message will be placed in the log when this happens to help determine how real the problem is. smbd/locking.c: New debug messages. smbd/blocking.c: New blocking code - handles SMBlock, SMBlockread and SMBlockingX smbd/chgpasswd.c: Fix for master fd leak. smbd/files.c: Tidyup comment. smbd/nttrans.c: Added fnum to debug message. smbd/process.c: Made chain_reply() use construct_reply_common(). Added blocking lock queue processing into idle loop. smbd/reply.c: Added queue pushes for SMBlock, SMBlockread and SMBlockingX. Jeremy. (This used to be commit e1dd03ecda0bc6d7eaa31070c83774bb5679fd1b)
* Blocking lock code split out...Jeremy Allison1998-08-191-0/+375
Jeremy. (This used to be commit 9cdb148ef56dc8f74891f5c6e9cae10142bd4c6e)