diff options
author | Jakub Jelinek <jakub@redhat.com> | 2007-01-17 10:42:43 +0000 |
---|---|---|
committer | Jakub Jelinek <jakub@redhat.com> | 2007-01-17 10:42:43 +0000 |
commit | af98d46f5a025ae33c60ddb1a5edc753fb714bc5 (patch) | |
tree | 24a3c5cb0bfc6163b52ae74ac205f0e175beee87 /nscd/nscd.c | |
parent | 1f09da09fed864c91288ff91295114fa5202edaa (diff) |
Updated to fedora-glibc-20070117T0857
Diffstat (limited to 'nscd/nscd.c')
-rw-r--r-- | nscd/nscd.c | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/nscd/nscd.c b/nscd/nscd.c index 588b09d4fb..1ae419be49 100644 --- a/nscd/nscd.c +++ b/nscd/nscd.c @@ -1,4 +1,4 @@ -/* Copyright (c) 1998-2003, 2004, 2005, 2006 Free Software Foundation, Inc. +/* Copyright (c) 1998-2006, 2007 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Thorsten Kukuk <kukuk@suse.de>, 1998. @@ -336,15 +336,15 @@ parse_opt (int key, char *arg, struct argp_state *state) exit (EXIT_FAILURE); request_header req; - if (strcmp (arg, "passwd") == 0) - req.key_len = sizeof "passwd"; - else if (strcmp (arg, "group") == 0) - req.key_len = sizeof "group"; - else if (strcmp (arg, "hosts") == 0) - req.key_len = sizeof "hosts"; - else + dbtype cnt; + for (cnt = pwddb; cnt < lastdb; ++cnt) + if (strcmp (arg, dbnames[cnt]) == 0) + break; + + if (cnt == lastdb) return ARGP_ERR_UNKNOWN; + req.key_len = strlen (arg) + 1; req.version = NSCD_VERSION; req.type = INVALIDATE; @@ -406,7 +406,7 @@ print_version (FILE *stream, struct argp_state *state) Copyright (C) %s Free Software Foundation, Inc.\n\ This is free software; see the source for copying conditions. There is NO\n\ warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.\n\ -"), "2006"); +"), "2007"); fprintf (stream, gettext ("Written by %s.\n"), "Thorsten Kukuk and Ulrich Drepper"); } |