diff options
author | Andrew Tridgell <tridge@samba.org> | 1997-10-29 01:59:54 +0000 |
---|---|---|
committer | Andrew Tridgell <tridge@samba.org> | 1997-10-29 01:59:54 +0000 |
commit | 6b6f624b63137d4750200e8cb4961b1402513632 (patch) | |
tree | 895f19bb2b9ec55cb22b3aba8d647aaf5c93a61a /source/include/smb.h | |
parent | 6b0e51929495582bc48a4d5fba24aa7c1f7caaf6 (diff) | |
download | samba-6b6f624b63137d4750200e8cb4961b1402513632.tar.gz |
clean up the hash entry code a bit. Got rid of lp_shmem_hash_size()
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.
Diffstat (limited to 'source/include/smb.h')
-rw-r--r-- | source/include/smb.h | 10 |
1 files changed, 1 insertions, 9 deletions
diff --git a/source/include/smb.h b/source/include/smb.h index 24cb279f431..ab1ff0557f2 100644 --- a/source/include/smb.h +++ b/source/include/smb.h @@ -44,15 +44,6 @@ #define SHMEM_SIZE 102400 #endif -/* Default number of hash buckets used in shared memory share mode */ -#ifndef SHMEM_HASH_SIZE -#ifdef SEMMSL -#define SHMEM_HASH_SIZE (SEMMSL-1) -#else -#define SHMEM_HASH_SIZE 15 -#endif -#endif - #define NMB_PORT 137 #define DGRAM_PORT 138 #define SMB_PORT 139 @@ -1425,6 +1416,7 @@ struct shmem_ops { BOOL (*lock_hash_entry)(unsigned int); BOOL (*unlock_hash_entry)( unsigned int ); BOOL (*get_usage)(int *,int *,int *); + unsigned (*hash_size)(void); }; |