summaryrefslogtreecommitdiff
path: root/nscd/nscd.conf
diff options
context:
space:
mode:
authorUlrich Drepper <drepper@redhat.com>2005-08-23 23:21:53 +0000
committerUlrich Drepper <drepper@redhat.com>2005-08-23 23:21:53 +0000
commit2c210d1eb88d4ab44bfce576b8fbac8e89a946f4 (patch)
treeba61cc9d2f2ee26f7edc7d92549499175274a374 /nscd/nscd.conf
parentfd4af66481e49b3dca42ecb0eadf75dbeea09bfc (diff)
* nscd/connection.c (DEFAULT_DATASIZE_PER_BUCKET): Move to nscd.h.
(dbs): Initialize max_db_size fields. (nscd_init): When mapping the database, use max_db_size as the mapping size even if it is bigger than the file size. * nscd/mem.c (mempool_alloc): When resizing the file make sure the limit in max_db_size is not exceeded. Don't use mremap, just posix_fallocate is enough (according to Linus). Use posix_fallocate correctly. * nscd/nscd.conf: Add max-db-size parameters. * nscd/nscd.h (struct database_dyn): Add max_db_size field. Define DEFAULT_MAX_DB_SIZE and DEFAULT_DATASIZE_PER_BUCKET. Temporarily define TEMP_FAILURE_RETRY_VAL here. * nscd/nscd_conf.c (nscd_parse_file): Parse max-db-size parameter and add sanity checks for it. * nscd/aicache.c (addhstaiX): Use send with MSG_NOSIGNAL not write to send reply. * nscd/connection.c (writeall): Likewise. (handle_request): Likewise. * nscd/grpcache.c (cache_addgr): Likewise. * nscd/hstcache.c (cache_addhst): Likewise. * nscd/initgrcache.c (addinitgroupsX): Likewise. * nscd/nscd.c (parse_opt): Likewise. * nscd/nscd_stat.c (send_stats): Likewise. (receive_print_stats): Likewise. * nscd/pwdcache.c (cache_addpw): Likewise.
Diffstat (limited to 'nscd/nscd.conf')
-rw-r--r--nscd/nscd.conf4
1 files changed, 4 insertions, 0 deletions
diff --git a/nscd/nscd.conf b/nscd/nscd.conf
index 87e7a84487..9491e16472 100644
--- a/nscd/nscd.conf
+++ b/nscd/nscd.conf
@@ -23,6 +23,7 @@
# check-files <service> <yes|no>
# persistent <service> <yes|no>
# shared <service> <yes|no>
+# max-db-szie <service> <number bytes>
#
# Currently supported cache names (services): passwd, group, hosts
#
@@ -45,6 +46,7 @@
check-files passwd yes
persistent passwd yes
shared passwd yes
+ max-db-size passwd 33554432
enable-cache group yes
positive-time-to-live group 3600
@@ -53,6 +55,7 @@
check-files group yes
persistent group yes
shared group yes
+ max-db-size group 33554432
enable-cache hosts yes
positive-time-to-live hosts 3600
@@ -61,3 +64,4 @@
check-files hosts yes
persistent hosts yes
shared hosts yes
+ max-db-size hosts 33554432