summaryrefslogtreecommitdiffstats
path: root/source/locking/locking_shm.c
Commit message (Collapse)AuthorAgeFilesLines
* Reasonably large change to give us *exactly* correct NT delete on close ↵Jeremy Allison1998-10-231-11/+18
| | | | | | | | | | | | | | semantics. This was trickier than it looks :-). Check out the new DELETE_ON_CLOSE flag in the share modes and the new code that iterates through all open files on the same device and inode in files.c and trans2.c Also changed the code that modifies share mode entries to take generic function pointers rather than doing a specific thing so this sort of change should be easier in the future. Jeremy.
* Changes to test in configure if capabilities are enabled on a system.Jeremy Allison1998-09-281-6/+0
| | | | | | | | | | Changes to get Samba to compile cleanly with the IRIX compiler with the options : -fullwarn -woff 1209,1174 (the -woff options are to turn off warnings about unused function parameters and controlling loop expressions being constants). Split prototype generation as we hit a limit in IRIX nawk. Removed "." code in smbd/filename.c (yet again :-). Jeremy.
* Added ssize_t to configure code.Jeremy Allison1998-09-111-70/+1
| | | | | | | | | | | 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.
* Modified dev_t and ino_t code to be 64 bit clean (including changesJeremy Allison1998-09-041-28/+103
| | | | | | | | | | to oplock break message passing). I think that smbd/nmbd are now inode and offset size independent (at least for 32 bit and 64 bit systems). Now to expose all this new functionality to NT clients..... Jeremy.
* configure.in, configure: include/config.h.in: Added stropts and poll.Jeremy Allison1998-08-311-12/+12
| | | | | | | | | | | include/smb.h: Moved old typedefs of uint8 etc. into include/includes.h where all the other defines live (changed them from typedefs to defines). Other changes : changed from using uint32 to SMB_DEV_T and SMB_INO_T in preparation for moving to size independed (ie. 64 bit clean) device and inode access. Stat call wrapper comes next :-). Jeremy.
* this checkin gets rid of the global Files[] array and makes it localAndrew Tridgell1998-08-151-20/+18
| | | | | | | in files.c it should now be faily easy to expand the default MAX_OPEN_FILES to many thousands.
* this is the bug change to using connection_struct* instead of cnum.Andrew Tridgell1998-08-141-9/+11
| | | | | | | | Connections[] is now a local array in server.c I might have broken something with this change. In particular the oplock code is suspect and some .dll files aren't being oplocked when I expected them to be. I'll look at it after I've got some sleep.
* include/smb.h: Removed dir_ptr. Not needed.Jeremy Allison1998-08-111-6/+6
| | | | | | | | | | | | | | | locking/locking.c: First cut a blocking lock code. #ifdef'ed out for now. locking/locking_shm.c: Removed dir_ptr. Not needed. smbd/nttrans.c: More work on ChangeNotify - return is not an error and needs to be handled as a nttrans with zero params. Removed dir_ptr. Not needed. smbd/reply.c: smbd/server.c: smbd/trans2.c: Removed dir_ptr. Not needed. Hmmm. At the moment smbclient is broken - doesn't issue prompt correctly. This needs looking at. Jeremy.
* Makefile.in: Moved UBIQX stuff into UTILOBJ.Jeremy Allison1998-07-301-6/+6
| | | | | | | | | | | | | | | | loadparm.c: Added "ole locking compatibility" option (default "true"). locking.c: Changes to implement union in files_struct. locking_shm.c: Changes to implement union in files_struct. nttrans.c: Made opening a directory explicit (we have to). Added create directory code for nttrans. reply.c: Changes to implement union in files_struct. server.c: Changes to implement union in files_struct. Added create directory code. trans2.c: Changes to implement union in files_struct. smb.h: Changes to implement union in files_struct. util.c: Changed linked list code to UNIQX linked list. This will make the other lists I need to implement for ChangeNotify and blocking locks easier. Jeremy.
* merge from the autoconf2 branch to the main branchAndrew Tridgell1998-07-291-3/+6
|
* This is a security audit change of the main source.Jeremy Allison1998-05-121-1/+1
| | | | | | | | | | | | | | | | | | 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 is *not* a big change (although it looks like one).Jeremy Allison1998-01-221-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.
* don't use free and alloc as structure elementsAndrew Tridgell1997-12-041-13/+13
|
* don't display locks for dead processes in smbstatusAndrew Tridgell1997-11-291-3/+5
|
* some locking code cleanupsAndrew Tridgell1997-11-011-76/+60
|
* change from * to ^ in hashing of device/inode. Using * meant that ifAndrew Tridgell1997-10-311-1/+1
| | | | | | the device number happened to divide the number of hash buckets we would only use a small fraction of the hash buckets, which would slow things down.
* - cleanup some warningsAndrew Tridgell1997-10-311-2/+0
| | | | - redo the prototypes
* clean up the hash entry code a bit. Got rid of lp_shmem_hash_size()Andrew Tridgell1997-10-291-47/+4
| | | | | | | | | | | | | | and made it private to the 2 shmem implementations. Added new shmops->hash_size() function. Added code to handle the IPC system limits by looping decreasing the size of the resources (semaphores and shared memory) that we request until we get under the system limits, which can be quite low on some systems! Added checks that the creator of the IPC objects is root. Otherwise we would be open to a security hole where someone pre-creates the shared memory segment and attaches.
* lower the default hash size if SEMMSL isn't definedAndrew Tridgell1997-10-281-0/+5
|
* SYSV IPC implementation of fast share modes.Andrew Tridgell1997-10-281-49/+57
| | | | | | | | | | | | | It will try sysv IPC first, then if that fails it will try mmap(), then after that it will try share files. I have defined USE_SYSV_IPC for Linux, Solaris and HPUX at the moment. Probably a lot more could have it defined. In fact, the vast majority of systems support it. Need autoconf again :-) It should actually be faster than the mmap() version, and doesn't need any lock files. This means the problem of the share mem file being on a NFS drive will be gone.
* change the default file permissions on the SHARE_MEM_FILE* toAndrew Tridgell1997-10-271-3/+8
| | | | | | | | 0644. smbstatus now gets only read permission on the share files and does no locking. also get rid of some unnecessary umask(0) calls. smbd always runs with umask(0)
* shared memory code cleanups (partly preparing for a possible sysVAndrew Tridgell1997-10-221-16/+16
| | | | shared memory implementation)
* loadparm.c: Changed 'interfaces only' parameter to 'bind interfaces only'. AddedJeremy Allison1997-10-201-1/+1
| | | | | | | | | | | | | 'dos filetimes' parameter for UTIME fix. locking_shm.c: Fixed typo (sorry Andrew :-). namepacket.c: Changed lp_interfaces_only() to lp_bind_interfaces_only(). proto.h: The usual. reply.c: Made filetime calls use new file_utime call (wrapper for sys_utime). server.c: Made filetime calls use new file_utime call (wrapper for sys_utime). system.c: Added Andrew's sanity checks to times in sys_utime(). time.c: Moved set_filetime() to server.c. Made null_mtime() global. trans2.c: Made filetime calls use new file_utime call (wrapper for sys_utime). Jeremy (jallison@whistle.com)
* a major share modes reorganisation.Andrew Tridgell1997-10-201-0/+739
The shares modes code is now split into separate files. The shared memory implementation is in locking_shm.c. The slow implementation is in locking_slow.c It is all controlled by a struct share_ops structure that has function pointers to the implementation of all the functions needed by a share modes implementation. An initialisation function sets up this structure. This will make adding new implementations easy and clean. This also allowed me to get rid of the ugly code in smbstatus. Now status.c links to the locking code and calls methods in share_ops. I also renamed some things and generally organised things in a much cleaner fashion. Defines and structures specific to each implementation have been moved to the appropriate file and out of smb.h.