diff options
Diffstat (limited to 'nss/nss_files/files-grp.c')
-rw-r--r-- | nss/nss_files/files-grp.c | 16 |
1 files changed, 6 insertions, 10 deletions
diff --git a/nss/nss_files/files-grp.c b/nss/nss_files/files-grp.c index 580dfbe3eb..8e047b6475 100644 --- a/nss/nss_files/files-grp.c +++ b/nss/nss_files/files-grp.c @@ -21,26 +21,22 @@ Cambridge, MA 02139, USA. */ #define STRUCTURE group #define ENTNAME grent -#define DATAFILE "/etc/group" +#define DATABASE "group" struct grent_data {}; -#define TRAILING_LIST_MEMBER gr_mem -#define TRAILING_LIST_SEPARATOR_P(c) ((c) == ',') -#include "files-parse.c" /* Our parser function is already defined in fgetgrent.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 (grnam, +DB_LOOKUP (grnam, 1 + strlen (name), (".%s", name), { if (! strcmp (name, result->gr_name)) break; }, const char *name) -DB_LOOKUP (grgid, +DB_LOOKUP (grgid, 20, ("=%lu", (unsigned long int) gid), { if (result->gr_gid == gid) break; |