diff options
Diffstat (limited to 'nss/nss_files/files-grp.c')
-rw-r--r-- | nss/nss_files/files-grp.c | 6 |
1 files changed, 4 insertions, 2 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) |