diff options
Diffstat (limited to 'nss')
-rw-r--r-- | nss/nss_files/files-grp.c | 6 | ||||
-rw-r--r-- | nss/nss_files/files-pwd.c | 6 |
2 files changed, 8 insertions, 4 deletions
diff --git a/nss/nss_files/files-grp.c b/nss/nss_files/files-grp.c index 8e047b6475..20a723b650 100644 --- a/nss/nss_files/files-grp.c +++ b/nss/nss_files/files-grp.c @@ -32,12 +32,14 @@ struct grent_data {}; DB_LOOKUP (grnam, 1 + strlen (name), (".%s", name), { - if (! strcmp (name, result->gr_name)) + if (name[0] != '-' && name[0] != '+' + && ! strcmp (name, result->gr_name)) break; }, const char *name) DB_LOOKUP (grgid, 20, ("=%lu", (unsigned long int) gid), { - if (result->gr_gid == gid) + if (result->gr_gid == gid && result->gr_name[0] != '+' + && result->gr_name[0] != '-') break; }, gid_t gid) 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) |