diff options
Diffstat (limited to 'imap.c')
-rw-r--r-- | imap.c | 38 |
1 files changed, 19 insertions, 19 deletions
@@ -150,7 +150,7 @@ static int do_otp(int sock, struct query *ctl) to64frombits(buffer, ctl->remotename, strlen(ctl->remotename)); if (outlevel >= O_MONITOR) - error(0, 0, "IMAP> %s", buffer); + progress(0, 0, "IMAP> %s", buffer); SockWrite(sock, buffer, strlen(buffer)); SockWrite(sock, "\r\n", 2); @@ -177,7 +177,7 @@ static int do_otp(int sock, struct query *ctl) to64frombits(buffer, response, strlen(response)); if (outlevel >= O_MONITOR) - error(0, 0, "IMAP> %s", buffer); + progress(0, 0, "IMAP> %s", buffer); SockWrite(sock, buffer, strlen(buffer)); SockWrite(sock, "\r\n", 2); @@ -317,7 +317,7 @@ static int do_rfc1731(int sock, char *truename) to64frombits(buf1, authenticator.dat, authenticator.length); if (outlevel >= O_MONITOR) { - error(0, 0, "IMAP> %s", buf1); + progress(0, 0, "IMAP> %s", buf1); } SockWrite(sock, buf1, strlen(buf1)); SockWrite(sock, "\r\n", 2); @@ -400,7 +400,7 @@ static int do_rfc1731(int sock, char *truename) to64frombits(buf1, authenticator.dat, authenticator.length); if (outlevel >= O_MONITOR) { - error(0, 0, "IMAP> %s", buf1); + progress(0, 0, "IMAP> %s", buf1); } SockWrite(sock, buf1, strlen(buf1)); SockWrite(sock, "\r\n", 2); @@ -465,7 +465,7 @@ static int do_gssauth(int sock, char *hostname, char *username) sec_token = GSS_C_NO_BUFFER; context = GSS_C_NO_CONTEXT; if (outlevel >= O_VERBOSE) - error(0,0,_("Sending credentials")); + progress(0,0,_("Sending credentials")); do { maj_stat = gss_init_sec_context(&min_stat, GSS_C_NO_CREDENTIAL, &context, target_name, NULL, 0, 0, NULL, sec_token, NULL, @@ -484,7 +484,7 @@ static int do_gssauth(int sock, char *hostname, char *username) SockWrite(sock, buf1, strlen(buf1)); SockWrite(sock, "\r\n", 2); if (outlevel >= O_MONITOR) - error(0,0,"IMAP> %s", buf1); + progress(0,0,"IMAP> %s", buf1); if (maj_stat == GSS_S_CONTINUE_NEEDED) { if (result = gen_recv(sock, buf1, sizeof buf1)) { gss_release_name(&min_stat, &target_name); @@ -512,7 +512,7 @@ static int do_gssauth(int sock, char *hostname, char *username) return PS_AUTHFAIL; } if (outlevel >= O_DEBUG) - error(0,0,_("Credential exchange complete")); + progress(0,0,_("Credential exchange complete")); /* first octet is security levels supported. We want none, for now */ server_conf_flags = ((char *)send_token.value)[0]; if ( !(((char *)send_token.value)[0] & GSSAUTH_P_NONE) ) { @@ -525,11 +525,11 @@ static int do_gssauth(int sock, char *hostname, char *username) /* we don't care about buffer size if we don't wrap data */ gss_release_buffer(&min_stat, &send_token); if (outlevel >= O_DEBUG) { - error(0,0,_("Unwrapped security level flags: %s%s%s"), + progress(0,0,_("Unwrapped security level flags: %s%s%s"), server_conf_flags & GSSAUTH_P_NONE ? "N" : "-", server_conf_flags & GSSAUTH_P_INTEGRITY ? "I" : "-", server_conf_flags & GSSAUTH_P_PRIVACY ? "C" : "-"); - error(0,0,_("Maximum GSS token size is %ld"),buf_size); + progress(0,0,_("Maximum GSS token size is %ld"),buf_size); } /* now respond in kind (hack!!!) */ @@ -547,8 +547,8 @@ static int do_gssauth(int sock, char *hostname, char *username) } to64frombits(buf1, send_token.value, send_token.length); if (outlevel >= O_DEBUG) { - error(0,0,_("Requesting authorisation as %s"), username); - error(0,0,"IMAP> %s",buf1); + progress(0,0,_("Requesting authorisation as %s"), username); + progress(0,0,"IMAP> %s",buf1); } SockWrite(sock, buf1, strlen(buf1)); SockWrite(sock, "\r\n", 2); @@ -559,7 +559,7 @@ static int do_gssauth(int sock, char *hostname, char *username) if (strstr(buf1, "OK")) { /* flush security context */ if (outlevel >= O_DEBUG) - error(0, 0, _("Releasing GSS credentials")); + progress(0, 0, _("Releasing GSS credentials")); maj_stat = gss_delete_sec_context(&min_stat, &context, &send_token); if (maj_stat != GSS_S_COMPLETE) { error(0, -1, _("Error releasing credentials")); @@ -609,20 +609,20 @@ int imap_getauth(int sock, struct query *ctl, char *greeting) { imap_version = IMAP4rev1; if (outlevel >= O_DEBUG) - error(0, 0, _("Protocol identified as IMAP4 rev 1")); + progress(0, 0, _("Protocol identified as IMAP4 rev 1")); } else { imap_version = IMAP4; if (outlevel >= O_DEBUG) - error(0, 0, _("Protocol identified as IMAP4 rev 0")); + progress(0, 0, _("Protocol identified as IMAP4 rev 0")); } } else if (ok == PS_ERROR) { imap_version = IMAP2; if (outlevel >= O_DEBUG) - error(0, 0, _("Protocol identified as IMAP2 or IMAP2BIS")); + progress(0, 0, _("Protocol identified as IMAP2 or IMAP2BIS")); } else return(ok); @@ -633,7 +633,7 @@ int imap_getauth(int sock, struct query *ctl, char *greeting) if ((ctl->server.protocol == P_IMAP) && strstr(capabilities, "AUTH=X-OTP")) { if (outlevel >= O_DEBUG) - error(0, 0, _("OTP authentication is supported")); + progress(0, 0, _("OTP authentication is supported")); if (do_otp(sock, ctl) == PS_SUCCESS) return(PS_SUCCESS); }; @@ -645,7 +645,7 @@ int imap_getauth(int sock, struct query *ctl, char *greeting) if (ctl->server.protocol == P_IMAP_GSS) { if (outlevel >= O_DEBUG) - error(0, 0, _("GSS authentication is supported")); + progress(0, 0, _("GSS authentication is supported")); return do_gssauth(sock, ctl->server.truename, ctl->remotename); } } @@ -660,14 +660,14 @@ int imap_getauth(int sock, struct query *ctl, char *greeting) if (strstr(capabilities, "AUTH=KERBEROS_V4")) { if (outlevel >= O_DEBUG) - error(0, 0, _("KERBEROS_V4 authentication is supported")); + progress(0, 0, _("KERBEROS_V4 authentication is supported")); if (ctl->server.protocol == P_IMAP_K4) { if ((ok = do_rfc1731(sock, ctl->server.truename))) { if (outlevel >= O_MONITOR) - error(0, 0, "IMAP> *"); + progress(0, 0, "IMAP> *"); SockWrite(sock, "*\r\n", 3); } |