MODRET pw_getgrent(cmd_rec *cmd) { struct group *gr; if (persistent_passwd) gr = p_getgrent(); else gr = getgrent(); return gr ? mod_create_data(cmd, gr) : PR_DECLINED(cmd); }
MODRET pw_getgrent(cmd_rec *cmd) { struct group *gr = NULL; if (unix_persistent_passwd) { gr = p_getgrent(); } else { gr = getgrent(); } return gr ? mod_create_data(cmd, gr) : PR_DECLINED(cmd); }
static struct group *p_getgrgid(gid_t gid) { struct group *gr = NULL; p_setgrent(); while ((gr = p_getgrent()) != NULL) { pr_signals_handle(); if (gr->gr_gid == gid) break; } return gr; }
static struct group *p_getgrnam(const char *name) { struct group *gr = NULL; p_setgrent(); while ((gr = p_getgrent()) != NULL) { pr_signals_handle(); if (strcmp(name, gr->gr_name) == 0) break; } return gr; }