From: Timo Sirainen Date: Thu, 30 Dec 2010 10:04:30 +0000 (+0200) Subject: vpopmail: "Service disabled" check wasn't being done correctly. X-Git-Tag: 2.0.9~29 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=47fed6b26c51ee17588d41ffe6a8a11271893faf;p=thirdparty%2Fdovecot%2Fcore.git vpopmail: "Service disabled" check wasn't being done correctly. --- diff --git a/src/auth/passdb-vpopmail.c b/src/auth/passdb-vpopmail.c index ec56f25aa4..599aed9623 100644 --- a/src/auth/passdb-vpopmail.c +++ b/src/auth/passdb-vpopmail.c @@ -35,7 +35,7 @@ static bool vpopmail_is_disabled(struct auth_request *request, 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 @@ static bool vpopmail_is_disabled(struct auth_request *request, } } 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 @@ vpopmail_verify_plain(struct auth_request *request, const char *password, } #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