Originally added in
801714cba91b. It was requested to be removed now that 1)
it's fixed in OpenBSD v5.6+ and 2) The workaround caused nonexistent users
to not work correctly (process running out of memory I guess?)
do {
pw_init();
errno = getpwnam_r(name, pwd_r, pwbuf, pwbuf_size, &result);
-#ifdef __OpenBSD__
- /* OpenBSD returns 1 for all errors, assume it's ERANGE */
- if (errno == 1)
- errno = ERANGE;
-#endif
} while (errno == ERANGE);
if (result != NULL)
return 1;
do {
pw_init();
errno = getpwuid_r(uid, pwd_r, pwbuf, pwbuf_size, &result);
-#ifdef __OpenBSD__
- /* OpenBSD returns 1 for all errors, assume it's ERANGE */
- if (errno == 1)
- errno = ERANGE;
-#endif
} while (errno == ERANGE);
if (result != NULL)
return 1;