changeset 12568:9216e5c861ee

vpopmail: "Service disabled" check wasn't being done correctly.
author Timo Sirainen <tss@iki.fi>
date Thu, 30 Dec 2010 12:04:30 +0200
parents c9b3716e56f7
children 15c32384817b
files src/auth/passdb-vpopmail.c
diffstat 1 files changed, 4 insertions(+), 4 deletions(-) [+]
line wrap: on
line diff
--- a/src/auth/passdb-vpopmail.c	Thu Dec 30 11:51:59 2010 +0200
+++ b/src/auth/passdb-vpopmail.c	Thu Dec 30 12:04:30 2010 +0200
@@ -35,7 +35,7 @@
 	struct vpopmail_passdb_module *module =
 		(struct vpopmail_passdb_module *)_module;
 
-	if (strcmp(request->service, "IMAP") == 0) {
+	if (strcasecmp(request->service, "IMAP") == 0) {
 		if ((vpw->pw_flags & NO_IMAP) != 0) {
 			/* IMAP from webmail IP may still be allowed */
 			if (!net_ip_compare(&module->webmail_ip,
@@ -49,7 +49,7 @@
 		}
 	}
 	if ((vpw->pw_flags & NO_POP) != 0 &&
-	    strcmp(request->service, "POP3") == 0)
+	    strcasecmp(request->service, "POP3") == 0)
 		return TRUE;
 	return FALSE;
 }
@@ -137,8 +137,8 @@
 	}
 
 #ifdef HAVE_VPOPMAIL_OPEN_SMTP_RELAY
-	if (strcmp(request->service, "POP3") == 0 ||
-	    strcmp(request->service, "IMAP") == 0) {
+	if (strcasecmp(request->service, "POP3") == 0 ||
+	    strcasecmp(request->service, "IMAP") == 0) {
 		const char *host = net_ip2addr(&request->remote_ip);
 		if (host != NULL) {
 			/* use putenv() directly rather than env_put() which