summaryrefslogtreecommitdiffstats
path: root/source/smbd/blocking.c
Commit message (Collapse)AuthorAgeFilesLines
* Bugfix for problem pointed out by Sean Trace <Sean.Trace@aveva.com>. We can'tJeremy Allison2002-08-121-10/+13
| | | | | | check for POSIX errors in the blocking lock code as we may have never made a POSIX call (could have denied lock before POSIX checked). Jeremy.
* 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.
* failed timed locks always give LOCK_CONFLICT not LOCK_NOT_GRANTEDAndrew Tridgell2002-03-101-0/+6
|
* Removed version number from file header.Tim Potter2002-01-301-2/+1
| | | | Changed "SMB/Netbios" to "SMB/CIFS" in file header.
* Don't put a \n on the end of the arg to exit_server()Tim Potter2001-11-051-2/+2
|
* 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.
* Removed 'extern int DEBUGLEVEL' as it is now in the smb.h header.Tim Potter2001-10-021-1/+1
|
* move to SAFE_FREE()Simo Sorce2001-09-171-3/+3
|
* this was a stupid typo,Simo Sorce2001-08-301-1/+1
| | | | thanks to Jochen Dolze (dolze@epcnet.de) for pointing out.
* 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
* 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
* 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.
* 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
* *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.
* 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.
* 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
* 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.
* 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.
* 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.
* 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.
* Added "inherit permissions" patch.Jeremy Allison2000-01-141-1/+7
| | | | | Fixed locking bug found by Andrew. Jeremy.
* changes to reflect the new syntax of the locking calls.Andrew Tridgell2000-01-131-3/+3
|
* first pass at updating head branch to be to be the same as the SAMBA_2_0 branchAndrew Tridgell1999-12-131-25/+30
|
* 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.
* 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.
* 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.
* 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.
* 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.
* Blocking lock code split out...Jeremy Allison1998-08-191-0/+375
Jeremy.