changeset 1460:88e6a4040955 HEAD

Don't check errno of getpwnam() and getspnam() functions. They don't seem to be set correctly in all systems and it's unlikely the error is anything else than "user doesn't exist".
author Timo Sirainen <tss@iki.fi>
date Mon, 12 May 2003 09:04:04 +0300
parents 4b643fcae5c8
children a7676687aac9
files src/auth/passdb-passwd.c src/auth/passdb-shadow.c src/auth/userdb-passwd.c
diffstat 3 files changed, 3 insertions(+), 9 deletions(-) [+]
line wrap: on
line diff
--- a/src/auth/passdb-passwd.c	Mon May 12 08:44:05 2003 +0300
+++ b/src/auth/passdb-passwd.c	Mon May 12 09:04:04 2003 +0300
@@ -21,9 +21,7 @@
 
 	pw = getpwnam(request->user);
 	if (pw == NULL) {
-		if (errno != 0)
-			i_error("getpwnam(%s) failed: %m", request->user);
-		else if (verbose)
+		if (verbose)
 			i_info("passwd(%s): unknown user", request->user);
 		callback(PASSDB_RESULT_USER_UNKNOWN, request);
 		return;
--- a/src/auth/passdb-shadow.c	Mon May 12 08:44:05 2003 +0300
+++ b/src/auth/passdb-shadow.c	Mon May 12 09:04:04 2003 +0300
@@ -21,9 +21,7 @@
 
 	spw = getspnam(request->user);
 	if (spw == NULL) {
-		if (errno != 0)
-			i_error("getspnam(%s) failed: %m", request->user);
-		else if (verbose)
+		if (verbose)
 			i_info("shadow(%s): unknown user", request->user);
 		callback(PASSDB_RESULT_USER_UNKNOWN, request);
 		return;
--- a/src/auth/userdb-passwd.c	Mon May 12 08:44:05 2003 +0300
+++ b/src/auth/userdb-passwd.c	Mon May 12 09:04:04 2003 +0300
@@ -18,9 +18,7 @@
 
 	pw = getpwnam(user);
 	if (pw == NULL) {
-		if (errno != 0)
-			i_error("getpwnam(%s) failed: %m", user);
-		else if (verbose)
+		if (verbose)
 			i_info("passwd(%s): unknown user", user);
 		callback(NULL, context);
 		return;