X-Git-Url: http://git.madism.org/?p=apps%2Fmadmutt.git;a=blobdiff_plain;f=pop%2Fpop_auth.c;h=d17d52f0134fbce7117118ed811de9b6bc5ae2a6;hp=eb575bfe25e7d499caeab9791e81076e17d6bd2e;hb=d63fe782146b7e2860d45fd6c2cf5369d9b0a87a;hpb=4282401a0bcdc285a228da4ad635cbf7baf71488;ds=sidebyside diff --git a/pop/pop_auth.c b/pop/pop_auth.c index eb575bf..d17d52f 100644 --- a/pop/pop_auth.c +++ b/pop/pop_auth.c @@ -7,24 +7,14 @@ * please see the file GPL in the top level source directory. */ -#if HAVE_CONFIG_H -# include "config.h" -#endif +#include -#include -#include -#include #include -#include #include "mutt.h" #include "mx.h" #include "pop.h" - -#include -#include - #ifdef USE_SASL #include #include @@ -49,7 +39,6 @@ static pop_auth_res_t pop_auth_sasl (POP_DATA * pop_data, const char *method) unsigned char client_start; if (mutt_sasl_client_new (pop_data->conn, &saslconn) < 0) { - debug_print (1, ("Error allocating SASL connection.\n")); return POP_A_FAILURE; } @@ -67,8 +56,6 @@ static pop_auth_res_t pop_auth_sasl (POP_DATA * pop_data, const char *method) } if (rc != SASL_OK && rc != SASL_CONTINUE) { - debug_print (1, ("Failure starting authentication exchange. No shared mechanisms?\n")); - /* SASL doesn't support suggested mechanisms, so fall back */ return POP_A_UNAVAIL; } @@ -99,7 +86,6 @@ static pop_auth_res_t pop_auth_sasl (POP_DATA * pop_data, const char *method) &len) != SASL_OK) #endif { - debug_print (1, ("error base64-decoding server response.\n")); goto bail; } @@ -119,7 +105,6 @@ static pop_auth_res_t pop_auth_sasl (POP_DATA * pop_data, const char *method) /* send out response, or line break if none needed */ if (pc) { if (sasl_encode64 (pc, olen, buf, sizeof (buf), &olen) != SASL_OK) { - debug_print (1, ("error base64-encoding client response.\n")); goto bail; } @@ -235,14 +220,11 @@ static pop_auth_res_t pop_auth_user (POP_DATA * pop_data, if (pop_data->cmd_user == CMD_UNKNOWN) { if (ret == PQ_OK) { pop_data->cmd_user = CMD_AVAILABLE; - - debug_print (1, ("set USER capability\n")); } if (ret == PQ_ERR) { pop_data->cmd_user = CMD_NOT_AVAILABLE; - debug_print (1, ("unset USER capability\n")); snprintf (pop_data->err_msg, sizeof (pop_data->err_msg), _("Command USER is not supported by server.")); } @@ -250,12 +232,7 @@ static pop_auth_res_t pop_auth_user (POP_DATA * pop_data, if (ret == PQ_OK) { snprintf (buf, sizeof (buf), "PASS %s\r\n", pop_data->conn->account.pass); - ret = pop_query_d (pop_data, buf, sizeof (buf), -#ifdef DEBUG - /* don't print the password unless we're at the ungodly debugging level */ - DebugLevel < M_SOCK_LOG_FULL ? "PASS *\r\n" : -#endif - NULL); + ret = pop_query (pop_data, buf, sizeof (buf)); } switch (ret) { @@ -314,7 +291,6 @@ pop_query_status pop_authenticate (POP_DATA * pop_data) comma = strchr (method, ':'); if (comma) *comma++ = '\0'; - debug_print (2, ("Trying method %s\n", method)); authenticator = pop_authenticators; while (authenticator->authenticate) { @@ -350,7 +326,6 @@ pop_query_status pop_authenticate (POP_DATA * pop_data) } else { /* Fall back to default: any authenticator */ - debug_print (2, ("Using any available method.\n")); authenticator = pop_authenticators; while (authenticator->authenticate) {