int fgetpwent_r (FILE *file, struct passwd *password, char *buff, size_t buflen, struct passwd **crap) { if (file == NULL) { __set_errno(EINTR); return -1; } return(__getpwent_r(password, buff, buflen, fileno(file))); }
int getpwent_r (struct passwd *password, char *buff, size_t buflen, struct passwd **crap) { LOCK; if (pw_fd != -1 && __getpwent_r(password, buff, buflen, pw_fd) != -1) { UNLOCK; return 0; } UNLOCK; return -1; }
int fgetpwent_r (FILE *file, struct passwd *password, char *buff, size_t buflen, struct passwd **result) { int res; if (file == NULL) { return EINTR; } *result = NULL; res = __getpwent_r(password, buff, buflen, fileno(file)); *result = password; return res; }
int getpwent_r (struct passwd *password, char *buff, size_t buflen, struct passwd **result) { int ret=EINVAL; LOCK; *result = NULL; if (pw_fd != -1 && (ret=__getpwent_r(password, buff, buflen, pw_fd)) == 0) { UNLOCK; *result = password; return 0; } UNLOCK; __set_errno(ret); return ret; }