AFAIKS, there IS getgrent implemented via getgrent_r(). Nevertheless,
assume we wanna avoid it. Try

parser_t *parser = config_open2(filename, fopen_or_warn);
if (parser && pwd) {
  char *group_name;
  while (config_read(parser, &group_name, 1, 1, "#:", PARSE_NORMAL)) {
    // use group_name as needed
    // ...
  }
  config_close(parser);
}

llist_t* seems saner, but I'd suggest to develop both versions for now.

BTW, why do we use getgrnam() if the names of the aux groups are
available directly when we read a line from /etc/group?!

Regards,
--
Vladimir
_______________________________________________
busybox mailing list
[email protected]
http://busybox.net/cgi-bin/mailman/listinfo/busybox

Reply via email to