diff options
Diffstat (limited to 'guts/getgrent_r.c')
-rw-r--r-- | guts/getgrent_r.c | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/guts/getgrent_r.c b/guts/getgrent_r.c new file mode 100644 index 0000000..6bb9667 --- /dev/null +++ b/guts/getgrent_r.c @@ -0,0 +1,21 @@ +/* + * static int + * wrap_getgrent_r(struct group *gbuf, char *buf, size_t buflen, struct group **gbufp) { + * int rc = -1; + */ + + /* note that we don't wrap fgetgrent_r, since there's no path + * references in it. + */ + rc = fgetgrent_r(pseudo_grp, gbuf, buf, buflen, gbufp); + if (rc == 0 && *gbufp) { + if (*gbufp == gbuf) { + pseudo_debug(1, "found group: %d/%s\n", gbuf->gr_gid, gbuf->gr_name); + } else { + pseudo_debug(1, "found group, but it's wrong?"); + } + } + +/* return rc; + * } + */ |