summaryrefslogtreecommitdiff
path: root/source3/locking/locking_shm.c
AgeCommit message (Collapse)AuthorFilesLines
1998-05-12This is a security audit change of the main source.Jeremy Allison1-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 used to be commit 2d774454005f0b54e5684cf618da7060594dfcbb)
1998-01-22This is *not* a big change (although it looks like one).Jeremy Allison1-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. (This used to be commit b9c16977231efb274e08856f7f3f4408dad6d96c)
1997-12-04don't use free and alloc as structure elementsAndrew Tridgell1-13/+13
(This used to be commit f7066355b00a169423b4f64f58567e19b52abc1b)
1997-11-29don't display locks for dead processes in smbstatusAndrew Tridgell1-3/+5
(This used to be commit c7df484ef6d746fb1f5b53007ee04fa54e5f2223)
1997-11-01some locking code cleanupsAndrew Tridgell1-76/+60
(This used to be commit 6d77311d6cecabafb86c02e26b30724425ef6208)
1997-10-31change from * to ^ in hashing of device/inode. Using * meant that ifAndrew Tridgell1-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. (This used to be commit 623ffd701f2f966875d396d8b2df74f0cf874cda)
1997-10-31- cleanup some warningsAndrew Tridgell1-2/+0
- redo the prototypes (This used to be commit 31dcb51e05914d49d81a3faef354aaf0ab9fa63f)
1997-10-29clean up the hash entry code a bit. Got rid of lp_shmem_hash_size()Andrew Tridgell1-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. (This used to be commit 6b6f624b63137d4750200e8cb4961b1402513632)
1997-10-28lower the default hash size if SEMMSL isn't definedAndrew Tridgell1-0/+5
(This used to be commit 9f0be847fdbcf0f8bbd69de6cdf277ae0440bcda)
1997-10-28SYSV IPC implementation of fast share modes.Andrew Tridgell1-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. (This used to be commit cc8fe0f0629eea9acc39e30d8d76d5890a5b6978)
1997-10-27change the default file permissions on the SHARE_MEM_FILE* toAndrew Tridgell1-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) (This used to be commit c6ac10170dbba57dfebc54c50d79cb29d13bb442)
1997-10-22shared memory code cleanups (partly preparing for a possible sysVAndrew Tridgell1-16/+16
shared memory implementation) (This used to be commit 8d1993c71a5d5d32636f62ba9b9a9009ec74d730)
1997-10-20loadparm.c: Changed 'interfaces only' parameter to 'bind interfaces only'. AddedJeremy Allison1-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) (This used to be commit 41a1d81c112a82ad2ae1b3c4ee81051f133ce1ed)
1997-10-20a major share modes reorganisation.Andrew Tridgell1-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. (This used to be commit 65ab9adaa0d356b8041ed8a507ea52117f2a284e)