dovecot-2.2: lib: Remove OpenBSD workaround in i_getpw*()

dovecot at dovecot.org dovecot at dovecot.org
Tue Jan 6 01:16:25 UTC 2015


details:   http://hg.dovecot.org/dovecot-2.2/rev/dbd1dbd968ac
changeset: 18139:dbd1dbd968ac
user:      Timo Sirainen <tss at iki.fi>
date:      Tue Jan 06 03:15:11 2015 +0200
description:
lib: Remove OpenBSD workaround in i_getpw*()
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?)

diffstat:

 src/lib/ipwd.c |  10 ----------
 1 files changed, 0 insertions(+), 10 deletions(-)

diffs (27 lines):

diff -r e23f1f333ada -r dbd1dbd968ac src/lib/ipwd.c
--- a/src/lib/ipwd.c	Mon Jan 05 15:48:55 2015 +0200
+++ b/src/lib/ipwd.c	Tue Jan 06 03:15:11 2015 +0200
@@ -50,11 +50,6 @@
 	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;
@@ -73,11 +68,6 @@
 	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;


More information about the dovecot-cvs mailing list