about summary refs log tree commit diff
path: root/nss/nss_files/files-pwd.c
diff options
context:
space:
mode:
Diffstat (limited to 'nss/nss_files/files-pwd.c')
-rw-r--r--nss/nss_files/files-pwd.c16
1 files changed, 7 insertions, 9 deletions
diff --git a/nss/nss_files/files-pwd.c b/nss/nss_files/files-pwd.c
index 6b39116a44..9732bc6f23 100644
--- a/nss/nss_files/files-pwd.c
+++ b/nss/nss_files/files-pwd.c
@@ -21,24 +21,22 @@ Cambridge, MA 02139, USA.  */
 
 #define STRUCTURE	passwd
 #define ENTNAME		pwent
-#define DATAFILE	"/etc/passwd"
+#define DATABASE	"passwd"
 struct pwent_data {};
 
-#include "files-parse.c"
-/* Our parser function is already defined in fgetpwent.c, so use that.
+/* Our parser function is already defined in fgetpwent.c, so use that
    to parse lines from the database file.  */
-extern int parse_line (char *line, struct STRUCTURE *result,
-		       void *buffer, int buflen);
-
-#include "files-XXX.c"
+#define EXTERN_PARSER
+#include "files-parse.c"
+#include GENERIC
 
-DB_LOOKUP (pwnam,
+DB_LOOKUP (pwnam, 1 + strlen (name), (".%s", name),
 	   {
 	     if (! strcmp (name, result->pw_name))
 	       break;
 	   }, const char *name)
 
-DB_LOOKUP (pwuid,
+DB_LOOKUP (pwuid, 20, ("=%lu", (unsigned long int) uid),
 	   {
 	     if (result->pw_uid == uid)
 	       break;