summaryrefslogtreecommitdiffstats
path: root/source3/smbd/oplock.c
Commit message (Collapse)AuthorAgeFilesLines
* Fixed sendto in oplock code.Jeremy Allison2002-04-191-2/+2
| | | | | Jeremy. (This used to be commit 64974fa334fd757ff5cfd1bd32d7300bf8a6208c)
* Fix oplock recvfrom.Jeremy Allison2002-04-191-1/+1
| | | | | Jeremy. (This used to be commit 68c0eb5ca7bc96cfdc8df07bd84f3e49de024b81)
* This split the mangling code up to allow for the possibility of multipleAndrew Tridgell2002-04-111-0/+2
| | | | | | | mangling implementation, selectable using "mangling method = " in smb.conf It also tidies the interface a little, although it is still nasty. (This used to be commit be23d87a178e7d0691e7d942adf89bb3d2d533c2)
* Get the current directory after becoming root.Jeremy Allison2002-03-141-1/+1
| | | | | Jeremy. (This used to be commit f032c6f710cb0edcf02f25db81c83478b9a8ab1e)
* Fix from Michael Steffens <michael_steffens@hp.com> to make signalJeremy Allison2002-01-311-1/+1
| | | | | | | processing work correctly in winbindd. This is a really good patch that gives full select semantics to the Samba modified select. Jeremy. (This used to be commit 3af16ade173cac24c1ac5eff4a36b439f16ac036)
* 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)
* IRIX compiler dies not like casts in macro argsHerb Lewis2001-10-231-1/+1
| | | | (This used to be commit 1b3123df48ca586b3d9c86a152354690836f6beb)
* Move from timestamp to gen count file id's for finding oplocked filesJeremy Allison2001-10-201-835/+784
| | | | | | in a tdb. Jeremy. (This used to be commit 058ae6b58f61ef46013dd076af3a84de5fbaaab1)
* Merge the become_XXX -> change_to_XXX fixes from 2.2.2 to HEAD.Jeremy Allison2001-10-181-2/+2
| | | | | | 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-2/+0
| | | | (This used to be commit 2d0922b0eabfdc0aaf1d0797482fef47ed7fde8e)
* move to SAFE_FREE()Simo Sorce2001-09-171-6/+4
| | | | (This used to be commit a95943fde0ad89ae3f2deca2f7ba9cb5ab612b74)
* Fix I think for the fcntl spinning problem. Re-prioritize soJeremy Allison2001-09-051-0/+14
| | | | | | that oplock break messages get priority over incoming client messages. Jeremy. (This used to be commit 1779f6a223dad87c3b8451d09b9808b46495a8b6)
* Fixes to ensure invalid vuids cannot stop oplock breaks.Jeremy Allison2001-09-041-5/+7
| | | | | | This may have bearing on the Solaris fcntl spin bug. Jeremy. (This used to be commit 0f676202529cbfead629d2c228b7d5abc2dff7d6)
* Fixed the (incorrect) paranioa fix I put in for the fcntl lock spin.Jeremy Allison2001-08-221-2/+12
| | | | | | | Don't delete a share mode that failed to remove the oplock (doh!), just set the oplock entry to zero.... Jeremy. (This used to be commit fe4aa720181a43f7a636ca029680fab0c836b968)
* This is Jeremy pretending to be Volker, 'cos theVolker Lendecke2001-08-211-0/+13
| | | | | | | | | | | | | | | | | | link from Seattle is having problems. I've added 3 things here to work on the fcntl spin problem. 1). Check *all* tdb return codes... :-). 2). If we're asking ourselves to break an oplock, and we can't find a fsp pointer that matches the entry, this is a *logic bug* and we should abort and panic so someone with gdb can pick up the pieces. 3). After we've broken an oplock, ensure that the entry itself has been removed, and if not remove it ourselves. This should not be neccessary in a correctly working environmen,t, but will provide an added layer of robustness in error situations. 4). I hate german keyboards :-) :-). Jeremy. (This used to be commit 1c94fa80646f9e31377fbb41332fe4780f550cab)
* fixed usage of socklen_t and also tidied up SIG_ATOMIC_T, using a typedef ↵Andrew Tridgell2001-06-251-1/+1
| | | | | | instead of a define (This used to be commit e2ecff419fdc0a0dc7551b33b377dc11061ef2a3)
* *Wonderful* patch from Andrew Bartlett that will help ensure tdb's areJeremy Allison2001-06-091-2/+4
| | | | | | cleaned on clients abending connections. Thanks Andrew ! Jeremy. (This used to be commit 1b3977c5367a0b713b194f369abd9872ae01ac2a)
* Fixup the large_writex problem (a large_writex can send a full 64k of data,Jeremy Allison2001-05-241-2/+2
| | | | | | we already have space for this we just need to understand the length correctly). Jeremy. (This used to be commit 19145bae720bbcc32dcab380c62a33d1f0e3eef0)
* Merge of new 2.2 code into HEAD (Gerald I hate you :-) :-). Allows new SAMRJeremy Allison2001-03-111-6/+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)
* Fix inspited by Alan Romeril. 50% speedup in domain logins with thisJeremy Allison2001-01-301-0/+3
| | | | | | change to default break response time of 10ms -> 0ms. Jeremy. (This used to be commit 541c7df16fff03f98c253a46b501574cafb4469f)
* Ok - fixed a bug in our levelII oplock code. We need to break a level II onJeremy Allison2000-11-161-4/+95
| | | | | | | | | | 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)
* Restructuring of the code to remove dos_ChDir/dos_GetWd and re-vector themJeremy Allison2000-09-271-2/+2
| | | | | | | | through the VFS. All file access/directory access code in smbd should now go via the vfs. Added vfs_chown/vfs_chmod calls. Still looking at vfs_get_nt_acl() vfs_set_nt_acl() call API design. Jeremy. (This used to be commit f96625ec124adb6e110dc54632e006b3620a962b)
* totally rewrote the async signal, notification and oplock notificationAndrew Tridgell2000-06-121-26/+29
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | handling in Samba. This was needed due to several limitations and races in the previous code - as a side effect the new code is much cleaner :) in summary: - changed sys_select() to avoid a signal/select race condition. It is a rare race but once we have signals doing notification and oplocks it is important. - changed our main processing loop to take advantage of the new sys_select semantics - split the notify code into implementaion dependent and general parts. Added the following structure that defines an implementation: struct cnotify_fns { void * (*register_notify)(connection_struct *conn, char *path, uint32 flags); BOOL (*check_notify)(connection_struct *conn, uint16 vuid, char *path, uint32 flags, void *data, time_t t); void (*remove_notify)(void *data); }; then I wrote two implementations, one using hash/poll (like our old code) and the other using the new Linux kernel change notify. It should be easy to add other change notify implementations by creating a sructure of the above type. - fixed a bug in change notify where we were returning the wrong error code. - rewrote the core change notify code to be much simpler - moved to real-time signals for leases and change notify Amazingly, it all seems to work. I was very surprised! (This used to be commit 44766c39e0027c762bee8b33b12c621c109a3267)
* Linux kernel oplocks now seem to work, but need a _lot_ of testingAndrew Tridgell2000-06-111-0/+9
| | | | | | I had to modify sys_select() to not loop on EINTR. I added a wrapper called sys_select_intr() which gives the old behaviour. (This used to be commit b28cc4163bc2faaa80c5782fc02c8f03c410cdeb)
* a first pass at Linux kernel oplocks supportAndrew Tridgell2000-06-101-13/+0
| | | | (This used to be commit 3253085d9883a181c04b9c9ecf7d0ccdfbcee88d)
* continued the split of the kernel level oplocks code into a moreAndrew Tridgell2000-06-101-377/+122
| | | | | | modular form. In this pass I added oplock_irix.c and added a "struct kernel_oplocks" that describes a kernel oplock implementation. (This used to be commit b5ceab810292602ea9a81696c20a781c16b706c2)
* clean up oplock capability code ready for Linux codeAndrew Tridgell2000-06-091-152/+149
| | | | (This used to be commit 70dcc791b45ac64fc536ef449e4e6b53b2b68fd4)
* split some of the irix kernel oplocks code into a functionAndrew Tridgell2000-06-091-68/+74
| | | | (This used to be commit 6b888d600d95e2595c3f79494edcc55e88e2980d)
* - changed HAVE_KERNEL_OPLOCKS to HAVE_KERNEL_OPLOCKS_IRIXAndrew Tridgell2000-06-081-14/+14
| | | | | - added autoconf test for HAVE_KERNEL_OPLOCKS_LINUX (This used to be commit 0368f68529a9244663c199068e95d1a1d93152fa)
* 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)
* Added sys_fork() and sys_getpid() functions to stop the overheadJeremy Allison2000-05-021-3/+3
| | | | | | of doing a system call every time we want to just get our pid. Jeremy. (This used to be commit 148628b616b5c29ba6340d65fc3ddbcabba6e67a)
* Now that fsp's are created on successful file open, the structure memberJeremy Allison2000-04-241-2/+2
| | | | | | | | | | | | | fsp->open is no longer needed (if an fsp pointer is valid, then it's open :-). NB for Luke, this patch also did not apply to TNG. TNG is not yet identical w.r.t file serving with HEAD. This makes it impossible for me to help maintain TNG. Please fix asap. lib/substitute.c: Removed unused variable (pidstr). Jeremy. (This used to be commit 389b700a26e8a308a0dff6fc038c38068aa0119a)
* finally got sick of the "extern int Client" code and the stupidAndrew Tridgell2000-04-111-7/+3
| | | | | | | | | | | | | | | | | 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)
* the bulk of the changes to get rid of fd_ptr and move print openAndrew Tridgell2000-04-101-27/+25
| | | | | | | | | | handling to printing/printing.c most of this was just replacing things like fsp->fd_ptr->fd with fsp->fd the changes in open.c are quite dramatic. Most of it is removing all the functions that handled the fd multiplexing (This used to be commit d1827a3648009fd0a0d165055015d9aeda7a1037)
* converted all our existing shared memory code to use a tdb databaseAndrew Tridgell1999-12-211-8/+7
| | | | | | | | | | | | | | instead of either sysv or mmap shared memory or lock files. this means we can now completely remove locking_shm.c locking_slow.c shmem.c shmem_sysv.c and lots of other things also got simpler locking.c got a bit larger, but is much better compartmentalised now (This used to be commit e48c2d9937eea0667b8cd3332e49c06314ef31e7)
* first pass at updating head branch to be to be the same as the SAMBA_2_0 branchAndrew Tridgell1999-12-131-198/+466
| | | | (This used to be commit 453a822a76780063dff23526c35408866d0c0154)
* sys_select added one more argument (read, write selectors).Luke Leighton1999-12-011-1/+1
| | | | (This used to be commit e4d92ff9dfc51735e6932748f66a7c20b2c1cb6a)
* Sync up critical kernel oplock bugfix. I don't want to loseJeremy Allison1998-12-051-4/+37
| | | | | | this.... Jeremy. (This used to be commit 5287f3d19b7d8e76970f1ce1abfd95b7341434e5)
* Makefile.in: Added maintainer mode fixes.Jeremy Allison1998-11-251-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | aclocal.m4: Added AC_LIBTESTFUNC. configure.in: Fixed -lsecurity -lsec problems. client.c: dos_ fixes. groupdb/aliasunix.c: Dead code removal. include/includes.h: Added default PRINTCAP_NAME. lib/genrand.c: dos_ fixes. lib/replace.c: Added strtoul. lib/system.c: dos_ fixes. lib/util.c: dos_ fixes. lib/util_sid.c: Signed/unsigned fixes. lib/util_str.c: removed bad const. locking/locking_slow.c: dos_ fixes. printing/printing.c: dos_ fixes. rpc_server/srv_samr.c: Dead code removal. rpc_server/srv_sid.c: global_myworkgroup defined with wrong size AGAIN ! smbd/dir.c: dos_ fixes. smbd/open.c: dos_ fixes. smbd/oplock.c: dos_ fixes. smbd/reply.c smbd/server.c smbd/service.c smbd/uid.c: dos_ fixes. Jeremy. (This used to be commit 6acb4b68f68d516e2ac3c47e500f5600d653435e)
* Fixed oplock test path spec bug.Jeremy Allison1998-11-241-1/+1
| | | | | Jeremy. (This used to be commit 252dd8b8929adbdff9917395d4f8caad2d7882b2)
* Fixed crash bug which was assuming that fd_ptr was always non-nullJeremy Allison1998-11-181-1/+1
| | | | | | (which is not the case with open directories). Jeremy. (This used to be commit c154b1601f5891d664fc538ec8874fa8ef2061e6)
* Added the same open()/fopen()/creat()/mmap() -> sys_XXX calls.Jeremy Allison1998-11-171-1/+1
| | | | | | | | | | | Tidied up some of the mess (no other word for it). Still doesn't compile cleanly. There are calls with incorrect parameters that don't seem to be doing the right thing. This code still needs surgery :-(. Jeremy. (This used to be commit 18ff93a9abbf68ee8c59c0af3e57c63e4a015dac)
* Makefile.in: Re-added quotes round ROFF call for DGUX.Jeremy Allison1998-11-161-2/+1
| | | | | | | script/installman.sh: Make installman ignore ROFF argument if it is "". smbd/oplock.c: Move location of oplock test file to lockdir. Jeremy. (This used to be commit 6c25a3314243997508b0b2da4bfa10bb979e9c10)
* O_EXCL fixes for printing files & oplocks.Jeremy Allison1998-11-161-1/+1
| | | | | Jeremy. (This used to be commit 4ca71c90985b1c88d92bdd0f9079a4afc263dc46)
* Makefile.in configure configure.in include/config.h.in: Changes for DGUX and ↵Jeremy Allison1998-11-131-1/+1
| | | | | | | | | | | | | | | UNIXWARE. groupdb/aliasdb.c groupdb/aliasfile.c groupdb/groupfile.c: Don't use snprinf, use slprintf. include/includes.h: Fix YP problem. include/smb.h: Fix ZERO_STRUCTP. lib/util_sock.c: Added strerror() in debugs. passdb/ldap.c: Don't use snprinf, use slprintf. rpc_client/cli_lsarpc.c rpc_client/cli_pipe.c rpc_parse/parse_sec.c rpc_server/srv_pipe.c: Don't use snprinf, use slprintf. script/installman.sh: DGUX changes. smbd/open.c smbd/oplock.c: Fixed gcc warnings. web/swat.c: Changes USER to SWAT_USER. (This used to be commit 4c2b5a00983501e5d4aad1456ba8b5ab0dfd9b4c)
* at the interop Isaac (at least I _think_ it was Isaac) said that if aAndrew Tridgell1998-10-211-1/+14
| | | | | | | | | | | | | | | | MS client doesn't respond to a oplock break request then we might try resending the request. This morning Sues Win95 machine had this problem (thus forcing me to do something about it!). When starting winword her box refused to answer an oplock break request. I have added code to resend the oplock break request up to 3 times at 10 second intervals before killing the socket. of course, as soon as I did this her box started to behave again so I haven't been able to tell if this fix actually works, but it can't be worse than dropping the socket immediately. (This used to be commit a1c4d8351b9171416693e6d7a9045bdce9217edb)
* config: Fix crypt prototype on RedHat Linux.Jeremy Allison1998-10-151-1/+1
| | | | | | | | | include/includes.h: Fix crypt prototype on RedHat Linux. smbd/fileio.c: Fix mmap bug found by WinCE client. smbd/ipc.c: Fix WinCE wierdness with pipes being opened as \server\pipe\lanman smbd/password.c: Fix encrypted null passwords. Jeremy. (This used to be commit 475992730c0ecbf31c09b3518df2f0354cec61da)
* more warnings...Luke Leighton1998-10-141-1/+1
| | | | (This used to be commit 8b9c0bad889d4f26987d87c54b4d8bf102af1744)
* libsmb/clientgen.c: Fixed signed/unsigned compile warnings spotted by Herb.Jeremy Allison1998-09-301-2/+4
| | | | | | | | | param/loadparm.c: smbd/oplock.c: Allow kernel oplocks to be turned off in the smb.conf file. smbd/server.c: Move init_structs() to after the smb.conf file is loaded - preparation for making a "max open files" parameter. Jeremy. (This used to be commit 6a261517a09b005f502a37941431308fa8bf2c5c)