]> git.ipfire.org Git - thirdparty/dovecot/core.git/commitdiff
Login processes: If auth_debug=yes, log about received unknown passdb extra fields.
authorTimo Sirainen <tss@iki.fi>
Sat, 25 Oct 2008 13:07:28 +0000 (16:07 +0300)
committerTimo Sirainen <tss@iki.fi>
Sat, 25 Oct 2008 13:07:28 +0000 (16:07 +0300)
--HG--
branch : HEAD

src/imap-login/client-authenticate.c
src/login-common/common.h
src/login-common/main.c
src/master/login-process.c
src/pop3-login/client-authenticate.c

index 6b1ec3588efd467742d8f3c48ec36563329a38e5..8ea1539eb026c53892452be0535b62a68a603afe 100644 (file)
@@ -110,6 +110,10 @@ static bool client_handle_args(struct imap_client *client,
                        destuser = *args + 9;
                else if (strncmp(*args, "pass=", 5) == 0)
                        pass = *args + 5;
+               else if (auth_debug) {
+                       i_info("Ignoring unknown passdb extra field: %s",
+                              *args);
+               }
        }
 
        if (destuser == NULL)
index a9850cc36ef53ddd7212573ce723820f405978a4..23618676f46f036feb6ad3ac1eb345243cc9c016 100644 (file)
@@ -14,7 +14,7 @@
 extern const char *login_protocol;
 
 extern bool disable_plaintext_auth, process_per_connection;
-extern bool verbose_proctitle, verbose_ssl, verbose_auth;
+extern bool verbose_proctitle, verbose_ssl, verbose_auth, auth_debug;
 extern bool ssl_require_client_cert;
 extern const char *greeting, *log_format;
 extern const char *const *log_format_elements;
index 76fc0fd6187b3b5bee33e3281d3b729e2bb896be..43331ec8b1260c676331982c1d650d305024fd01 100644 (file)
@@ -20,7 +20,7 @@
 #include <syslog.h>
 
 bool disable_plaintext_auth, process_per_connection;
-bool verbose_proctitle, verbose_ssl, verbose_auth;
+bool verbose_proctitle, verbose_ssl, verbose_auth, auth_debug;
 bool ssl_require_client_cert;
 const char *greeting, *log_format;
 const char *const *log_format_elements;
@@ -318,6 +318,7 @@ static void main_init(void)
        verbose_proctitle = getenv("VERBOSE_PROCTITLE") != NULL;
         verbose_ssl = getenv("VERBOSE_SSL") != NULL;
         verbose_auth = getenv("VERBOSE_AUTH") != NULL;
+        auth_debug = getenv("AUTH_DEBUG") != NULL;
        ssl_require_client_cert = getenv("SSL_REQUIRE_CLIENT_CERT") != NULL;
 
        greeting = getenv("GREETING");
index bcdb290950076ec4731e48f50d0edc5af3dabac7..d6284b976c5654bbb3defc687f4e135f3e25b28d 100644 (file)
@@ -581,6 +581,8 @@ static void login_process_init_env(struct login_group *group, pid_t pid)
                env_put("VERBOSE_SSL=1");
        if (set->server->auths->verbose)
                env_put("VERBOSE_AUTH=1");
+       if (set->server->auths->debug)
+               env_put("AUTH_DEBUG=1");
        require_cert = TRUE;
        for (auth = set->server->auths; auth != NULL; auth = auth->next) {
                if (!auth->ssl_require_client_cert)
index 82234d832ab045ad3cdeb67b0c101da177fb9dae..220300e558e6329bdbcb2341f1b2f79fd67176f0 100644 (file)
@@ -107,6 +107,10 @@ static bool client_handle_args(struct pop3_client *client,
                        destuser = *args + 9;
                else if (strncmp(*args, "pass=", 5) == 0)
                        pass = *args + 5;
+               else if (auth_debug) {
+                       i_info("Ignoring unknown passdb extra field: %s",
+                              *args);
+               }
        }
 
        if (destuser == NULL)