summaryrefslogtreecommitdiff
path: root/source3/param/loadparm.c
diff options
context:
space:
mode:
authorAndrew Tridgell <tridge@samba.org>1997-10-29 01:59:54 +0000
committerAndrew Tridgell <tridge@samba.org>1997-10-29 01:59:54 +0000
commit4fd96fddd2b13f60c4eb13263bac2a62a2795dcc (patch)
tree93c269b25da65f647dcca036b8d3682021142d68 /source3/param/loadparm.c
parentb925b3d20c8e85c7b65a0ad599248443ae12905c (diff)
downloadsamba-4fd96fddd2b13f60c4eb13263bac2a62a2795dcc.tar.gz
samba-4fd96fddd2b13f60c4eb13263bac2a62a2795dcc.tar.bz2
samba-4fd96fddd2b13f60c4eb13263bac2a62a2795dcc.zip
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. (This used to be commit 6b6f624b63137d4750200e8cb4961b1402513632)
Diffstat (limited to 'source3/param/loadparm.c')
-rw-r--r--source3/param/loadparm.c4
1 files changed, 0 insertions, 4 deletions
diff --git a/source3/param/loadparm.c b/source3/param/loadparm.c
index db494711b6..6c88168b82 100644
--- a/source3/param/loadparm.c
+++ b/source3/param/loadparm.c
@@ -166,7 +166,6 @@ typedef struct
int max_ttl;
int ReadSize;
int shmem_size;
- int shmem_hash_size;
int client_code_page;
int announce_as; /* This is initialised in init_globals */
BOOL bDNSproxy;
@@ -479,7 +478,6 @@ struct parm_struct
{"time offset", P_INTEGER, P_GLOBAL, &extra_time_offset, NULL},
{"read size", P_INTEGER, P_GLOBAL, &Globals.ReadSize, NULL},
{"shared mem size", P_INTEGER, P_GLOBAL, &Globals.shmem_size, NULL},
- {"shared file entries", P_INTEGER, P_GLOBAL, &Globals.shmem_hash_size, NULL},
{"coding system", P_INTEGER, P_GLOBAL, &coding_system, handle_coding_system},
{"client code page", P_INTEGER, P_GLOBAL, &Globals.client_code_page, NULL},
{"os level", P_INTEGER, P_GLOBAL, &Globals.os_level, NULL},
@@ -674,7 +672,6 @@ static void init_globals(void)
Globals.max_ttl = 60*60*4; /* 2 hours default */
Globals.ReadSize = 16*1024;
Globals.shmem_size = SHMEM_SIZE;
- Globals.shmem_hash_size = SHMEM_HASH_SIZE;
Globals.announce_as = ANNOUNCE_AS_NT;
Globals.bUnixRealname = False;
#if (defined(NETGROUP) && defined(AUTOMOUNT))
@@ -918,7 +915,6 @@ FN_GLOBAL_INTEGER(lp_passwordlevel,&Globals.pwordlevel)
FN_GLOBAL_INTEGER(lp_usernamelevel,&Globals.unamelevel)
FN_GLOBAL_INTEGER(lp_readsize,&Globals.ReadSize)
FN_GLOBAL_INTEGER(lp_shmem_size,&Globals.shmem_size)
-FN_GLOBAL_INTEGER(lp_shmem_hash_size,&Globals.shmem_hash_size)
FN_GLOBAL_INTEGER(lp_deadtime,&Globals.deadtime)
FN_GLOBAL_INTEGER(lp_maxprotocol,&Globals.maxprotocol)
FN_GLOBAL_INTEGER(lp_security,&Globals.security)