dovecot-2.0: vpopmail: "Service disabled" check wasn't being don...

dovecot at dovecot.org dovecot at dovecot.org
Thu Dec 30 12:04:33 EET 2010


details:   http://hg.dovecot.org/dovecot-2.0/rev/9216e5c861ee
changeset: 12530:9216e5c861ee
user:      Timo Sirainen <tss at iki.fi>
date:      Thu Dec 30 12:04:30 2010 +0200
description:
vpopmail: "Service disabled" check wasn't being done correctly.

diffstat:

 src/auth/passdb-vpopmail.c |  8 ++++----
 1 files changed, 4 insertions(+), 4 deletions(-)

diffs (32 lines):

diff -r c9b3716e56f7 -r 9216e5c861ee src/auth/passdb-vpopmail.c
--- 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


More information about the dovecot-cvs mailing list