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.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/nss/nss_files/files-pwd.c b/nss/nss_files/files-pwd.c
index a778d015d8..30008559ae 100644
--- a/nss/nss_files/files-pwd.c
+++ b/nss/nss_files/files-pwd.c
@@ -32,12 +32,14 @@ struct pwent_data {};
 
 DB_LOOKUP (pwnam, 1 + strlen (name), (".%s", name),
 	   {
-	     if (! strcmp (name, result->pw_name))
+	     if (name[0] != '+' && name[0] != '-'
+		 && ! strcmp (name, result->pw_name))
 	       break;
 	   }, const char *name)
 
 DB_LOOKUP (pwuid, 20, ("=%lu", (unsigned long int) uid),
 	   {
-	     if (result->pw_uid == uid)
+	     if (result->pw_uid == uid && result->pw_name[0] != '+'
+		 && result->pw_name[0] != '-')
 	       break;
 	   }, uid_t uid)