aboutsummaryrefslogtreecommitdiffstats
path: root/guts/getgrent_r.c
blob: a080f142abb39e566677efdd3553f7c15b245a97 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
/* 
 * Copyright (c) 2010 Wind River Systems; see
 * guts/COPYRIGHT for information.
 *
 * 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;
 * }
 */