MODRET pw_setpwent(cmd_rec *cmd) { if (persistent_passwd) p_setpwent(); else setpwent(); return PR_DECLINED(cmd); }
static struct passwd *p_getpwent(void) { if (!pwdf) p_setpwent(); if (!pwdf) return NULL; return fgetpwent(pwdf); }
MODRET pw_setpwent(cmd_rec *cmd) { if (unix_persistent_passwd) { p_setpwent(); } else { setpwent(); } return PR_DECLINED(cmd); }
static struct passwd *p_getpwuid(uid_t uid) { struct passwd *pw = NULL; p_setpwent(); while ((pw = p_getpwent()) != NULL) { pr_signals_handle(); if (pw->pw_uid == uid) break; } return pw; }
static struct passwd *p_getpwnam(const char *name) { struct passwd *pw = NULL; p_setpwent(); while ((pw = p_getpwent()) != NULL) { pr_signals_handle(); if (strcmp(name, pw->pw_name) == 0) { break; } } return pw; }