From 2666d441c2d8107b1987b869714189af64b954c6 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Tue, 14 Jun 2011 22:21:51 -0400 Subject: Reenable nss_db with a completely new implementation No longer is Berkeley db used. Instead a simple hash function is used. The database files are not updated once they are created and therefore no complicated database is needed. --- nss/nss_files/files-pwd.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'nss/nss_files/files-pwd.c') diff --git a/nss/nss_files/files-pwd.c b/nss/nss_files/files-pwd.c index 4913c3183d..4763f0149a 100644 --- a/nss/nss_files/files-pwd.c +++ b/nss/nss_files/files-pwd.c @@ -1,5 +1,5 @@ /* User file parser in nss_files module. - Copyright (C) 1996, 1997 Free Software Foundation, Inc. + Copyright (C) 1996, 1997, 2011 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or @@ -30,14 +30,14 @@ struct pwent_data {}; #include "files-parse.c" #include GENERIC -DB_LOOKUP (pwnam, 1 + strlen (name), (".%s", name), +DB_LOOKUP (pwnam, '.', 0, ("%s", name), { if (name[0] != '+' && name[0] != '-' && ! strcmp (name, result->pw_name)) break; }, const char *name) -DB_LOOKUP (pwuid, 20, ("=%lu", (unsigned long int) uid), +DB_LOOKUP (pwuid, '=', 20, ("%lu", (unsigned long int) uid), { if (result->pw_uid == uid && result->pw_name[0] != '+' && result->pw_name[0] != '-') -- cgit 1.4.1