From 797ed6f7e17732cb207293d406d6cf14336f5de0 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Wed, 26 Apr 2006 17:32:10 +0000 Subject: * nscd/nscd.h (struct database_dyn): Add propagate field. * nscd/nscd_conf.c (nscd_parse_file): Parse auto-propagate lines. * nscd/nscd.conf: Add auto-propagate lines. * nscd/connections.c (dbs): Initialize .propagate fields. * nscd/grpcache.c (cache_addgr): Do not add ID entry for name lookups and vice versa if propagation is disabled for the database. * nscd/pwdcache.c (cache_addpw): Likewise. --- nscd/nscd_conf.c | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) (limited to 'nscd/nscd_conf.c') diff --git a/nscd/nscd_conf.c b/nscd/nscd_conf.c index 579ddd4..2048eca 100644 --- a/nscd/nscd_conf.c +++ b/nscd/nscd_conf.c @@ -1,4 +1,4 @@ -/* Copyright (c) 1998, 2000, 2003, 2004, 2005 Free Software Foundation, Inc. +/* Copyright (c) 1998,2000,2003,2004,2005,2006 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Thorsten Kukuk , 1998. @@ -256,6 +256,17 @@ nscd_parse_file (const char *fname, struct database_dyn dbs[lastdb]) else error (0, 0, _("Must specify value for restart-interval option")); } + else if (strcmp (entry, "auto-propagate") == 0) + { + int idx = find_db (arg1); + if (idx >= 0) + { + if (strcmp (arg2, "no") == 0) + dbs[idx].propagate = 0; + else if (strcmp (arg2, "yes") == 0) + dbs[idx].propagate = 1; + } + } else error (0, 0, _("Unknown option: %s %s %s"), entry, arg1, arg2); } -- cgit v1.1