summaryrefslogtreecommitdiffstats
path: root/source/locking/posix.c
Commit message (Collapse)AuthorAgeFilesLines
* Prefix VFS API macros with SMB_ for consistency and to avoid problems with ↵Alexander Bokovoy2003-05-141-5/+5
| | | | VFS_ macros at system side. We currently have one clash with AIX and its VFS_LOCK. Compiled and tested -- no new functionality or code, just plain rename of macros for yet-unreleased VFS API version. Needs to be done before a24 is out
* Fix VFS layer:Alexander Bokovoy2003-05-111-6/+5
| | | | | | | | | 1. Finally work with cascaded modules with private data storage per module 2. Convert VFS API to macro calls to simplify cascading 3. Add quota support to VFS layer (prepare to NT quota support) Patch by Stefan (metze) Metzemacher, with review of Jelmer and me Tested in past few weeks. Documentation to new VFS API for third-party developers to follow
* Fixes for HPUX only having limited POSIX lock range from Michael Steffens ↵Jeremy Allison2003-02-121-12/+7
| | | | | | <michael.steffens@hp.com> Jeremy.
* Forward port the change to talloc_init() to make all talloc contextsJeremy Allison2002-12-201-2/+2
| | | | | named. Ensure we can query them. Jeremy.
* Lots of fixes for error paths where tdb_fetch() data need freeing.Jeremy Allison2002-11-231-11/+14
| | | | | Found via a post from Arcady Chernyak <Arcady.Chernyak@efi.com>. Jeremy.
* Removed version number from file header.Tim Potter2002-01-301-2/+1
| | | | Changed "SMB/Netbios" to "SMB/CIFS" in file header.
* Removed 'extern int DEBUGLEVEL' as it is now in the smb.h header.Tim Potter2001-10-021-1/+0
|
* move to SAFE_FREE()Simo Sorce2001-09-171-23/+15
|
* Fix the 62bit locking onto 32 bit NFS mounts problem generically for HPUX.Jeremy Allison2001-09-061-94/+21
| | | | | Don. please check this out. Jeremy.
* NFS v2 can return ENOLCK when greater than 31 bit offsets are used.Jeremy Allison2001-09-051-2/+2
| | | | | Treat this the same as an EFBIG error. Jeremy
* Ignore locks of length zero as they mean different things in Win32Jeremy Allison2001-08-261-5/+18
| | | | | and POSIX. Jeremy.
* Add printing of errno when POSIX lock requests fail.Jeremy Allison2001-08-131-3/+3
| | | | Jeremy.
* this is a big global fix for the ptr = Realloc(ptr, size) bug.Simo Sorce2001-08-121-4/+9
| | | | | | many possible mem leaks, and segfaults fixed. someone should port this fix to 2.2 also.
* Fixed the nastiest locking bug to track down.... smb_pids are sent in theJeremy Allison2001-07-021-1/+0
| | | | | lockingX calls - use that instead of smb_pid in the packet. Jeremy.
* use LDSHFLAGS not -shared in several placesAndrew Tridgell2001-06-041-2/+2
|
* Merge of Andrew's changes in 2.2.Jeremy Allison2001-04-131-3/+1
| | | | Jeremy.
* Herb's warning fixes. Also the POSIX locking fix.Jeremy Allison2000-10-061-1/+1
| | | | | We now use our own vfs layer to do get/set acl calls (hurrah!). Jeremy.
* Restructuring of vfs layer to include a "this" pointer - can be an fsp orJeremy Allison2000-10-061-6/+6
| | | | | | | | | | | | | | | a conn struct depending on the call. We need this to have a clean NT ACL call interface. This will break any existing VFS libraries (that's why this is pre-release code). Andrew gets credit for this one :-) :-). In addition - added Herb's WITH_PROFILE changes - Herb - please examine the changes I've made to the smbd/reply.c code you added. The original code was very ugly and I have replaced it with a START_PROFILE(x)/END_PROFILE(x) pair using the preprocessor. Please check this compiles ok with the --with-profile switch. Jeremy.
* allow posix locking database to be opened read-only (for smbstatus)Andrew Tridgell2000-06-131-10/+10
|
* Fixed misunderstanding found during CIFS conference. Overlapping lockJeremy Allison2000-05-251-340/+278
| | | | | | ranges (not just included lock ranges) should be handled correctly. UNIT test still needed. Jeremy.
* Using a structure for a tdb key can lead to insideous, hardHerb Lewis2000-05-101-0/+2
| | | | | | | | | | | | | | | | | to find bugs. On 64 bit IRIX, structure packing means that a struct { SMB_DEV_T dev /* 4 bytes */ SMB_INO_T ino /* 8 bytes */ } has 4 bytes of padding between the two members. If you don't null the memory before using it as a tdb key, you randomly can't find keys depending on what is in the padding. This caused me immense pain and was hard to track down.... :-) Jeremy.
* Two fixes. Added missong logic & case in lock split code.Jeremy Allison2000-05-051-4/+12
| | | | | Fixed range split into two, as DLIST_ADD has the wrong semantics... Jeremy.
* Updated to fix overlapping problem.Jeremy Allison2000-05-041-68/+142
| | | | Jeremy.
* Fix for debug statement crash.Jeremy Allison2000-05-041-1/+1
| | | | Jeremy.
* Fixed the bug locktest.c found, it was an off-by-one error in the non-overlapJeremy Allison2000-05-031-1/+1
| | | | | case. Jeremy.
* Fixed silly bug where I wasn't checking for matching fd's in closing a file.Jeremy Allison2000-05-031-7/+24
| | | | | This caused smbd crashes on SIGKILL. Jeremy.
* Added range info to the panic message to track down the bug withJeremy Allison2000-05-031-1/+5
| | | | | locktest. Jeremy.
* Fix for stacking locks in brlock and POSIX. Windows only allows a read lockJeremy Allison2000-05-031-91/+129
| | | | | | | | to overlay a write lock on the same fnum. When overlaying read locks onto a write lock, the number of locks is counted, and the first unlock removes the write lock and downgrades this to a read lock. Do the same when mapping to POSIX. Jeremy.
* Implemented the last (I hope:-) part of the locking puzzle, the referenceJeremy Allison2000-05-021-23/+90
| | | | | | | counting when Windows downgrades a write lock to a read lock, then reference counts the unlocks to match the locks. With this code the POSIX unlock isn't done until the final Windows unlock. Jeremy.
* split the username in the vuser structure into a separateAndrew Tridgell2000-05-021-1/+2
| | | | | | | | userdom_struct. As the name implies this also contains a domain (unused at the moment). This will be important shortly, as operation in appliance mode needs the domain to be always carried with the username.
* Moved uglyness needed in fcntl locking (64->32 bit mapping, NFSJeremy Allison2000-05-021-3/+121
| | | | | | | errors etc.) into locking/posix.c, where it is needed. fcntl_lock in lib/util.c is now very small and clean. Added (*lock) op to vfs layer. Jeremy.
* locking/posix.c: Fixed double-free nasty crash bug found by insure.Jeremy Allison2000-05-011-3/+0
| | | | | | utils/make_smbcodepage.c: utils/make_unicodemap.c: Insure 'make install' fixes. Jeremy.
* added TDB_INTERNAL, TDB_NOLOCK and TDB_NOMMAP flags.Andrew Tridgell2000-05-011-3/+3
| | | | TDB_INTERNAL replaces the old method of passing a null filename
* - removed all our old wildcard matching code and replaced it with aAndrew Tridgell2000-04-301-2/+2
| | | | | | | | | | | | | | | | call to ms_fnmatch(). This also removes all the Win9X semantics stuff and a bunch of other associated cruft. - moved the stat cache code into statcache.c - fixed the uint16 alignment requirements of ascii_to_unistr() and unistr_to_ascii() - trans2 SMB_FIND_FILE_BOTH_DIRECTORY_INFO returns the short name as unicode always (at least thats what NT4 does) - fixed some errors in the in-memory tdb code. Still ugly, but doesn't crash as much
* Removed tdb locking calls (picky Andrew...:-)Jeremy Allison2000-04-291-25/+12
|
* Ok - this is the *third* implementation of this (third time's the charm :-).Jeremy Allison2000-04-281-199/+123
| | | | | | | | | | | | | | | | | This implementation keeps all POSIX lock records in a separate in memory tdb database only known about in locking/posix.c. In addition, the pending close fd's are also held in a tdb which has an array of fd's indexed by device and inode. The walk-split code uglyness has been moved to posix.c from brlock.c, which is the only place that needs to know about it, and the extra functions hacked into brlock to expose internal state have been removed. This implementation passes smbtorture locktest4, the only thing I need to check now for completeness is what to do about lock upgrade/downgrades which Win32 allows under some *very* strange circumstances. Jeremy.
* Split off of POSIX locking into separate unit as Andrew requested.Jeremy Allison2000-04-281-0/+1208
Done so I don't lose my edits... :-). Jeremy.