diff options
| -rw-r--r-- | NEWS | 4 | ||||
| -rw-r--r-- | driver.c | 48 | 
2 files changed, 36 insertions, 16 deletions
| @@ -15,11 +15,13 @@ fetchmail-1.9 ():  * Add option to set server nonresponse timeout. +* Password is no longer displayed in verbose mode. +  fetchmail-1.8 (Fri Oct 11 15:08:10 EDT 1996):  features -- -* Use kill(0, pid) to make lock handling a bit smarter (thanks to Johann +* Use kill(0, pid) to make lock handling a bit smarter (thanks to Johan    Vromans <JVromans@squirrel.nl> for the suggestion).  * Arrange for timeout of client after 5 minutes if connection to server is  @@ -13,10 +13,11 @@  #include  <config.h>  #include  <stdio.h> -#include  <malloc.h> +#include  <stdlib.h>  #include  <varargs.h>  #include  <sys/time.h>  #include  <signal.h> +#include  <string.h>  #ifdef KERBEROS_V4  #include <krb.h> @@ -39,6 +40,8 @@ char tag[TAGLEN];  static int tagnum;  #define GENSYM	(sprintf(tag, "a%04d", ++tagnum), tag) +static char *shroud; +  /*********************************************************************    function:          description:   hack message headers so replies will work properly @@ -642,7 +645,9 @@ struct method *proto;  	goto cleanUp;      /* try to get authorized to fetch mail */ +    shroud = queryctl->password;      ok = (protocol->getauth)(socket, queryctl, buf); +    shroud = (char *)NULL;      if (alarmed || ok == PS_ERROR)  	ok = PS_AUTHFAIL;      if (alarmed || ok != 0) @@ -655,7 +660,8 @@ struct method *proto;      /* show user how many messages we downloaded */      if (outlevel > O_SILENT && outlevel < O_VERBOSE)  	if (count == 0) -	    fprintf(stderr, "No mail from %s\n", queryctl->servername); +	    fprintf(stderr, "No mail from %s@%s\n",  +		    queryctl->remotename, queryctl->servername);  	else  	    fprintf(stderr,  		    "%d message%s from %s.\n", @@ -814,22 +820,28 @@ int socket;  const char *fmt;  va_dcl { -  char buf [POPBUFSIZE+1]; -  va_list ap; +    char buf [POPBUFSIZE+1]; +    va_list ap; -  if (protocol->tagged) -      (void) sprintf(buf, "%s ", GENSYM); -  else -      buf[0] = '\0'; +    if (protocol->tagged) +	(void) sprintf(buf, "%s ", GENSYM); +    else +	buf[0] = '\0'; -  va_start(ap); -  vsprintf(buf + strlen(buf), fmt, ap); -  va_end(ap); +    va_start(ap); +    vsprintf(buf + strlen(buf), fmt, ap); +    va_end(ap); -  SockPuts(socket, buf); +    SockPuts(socket, buf); -  if (outlevel == O_VERBOSE) -    fprintf(stderr,"> %s\n", buf); +    if (outlevel == O_VERBOSE) +    { +	char *cp; + +	if (shroud && (cp = strstr(buf, shroud))) +	    memset(cp, '*', strlen(shroud)); +	fprintf(stderr,"> %s\n", buf); +    }  }  /********************************************************************* @@ -866,7 +878,13 @@ va_dcl {    SockPuts(socket, buf);    if (outlevel == O_VERBOSE) -    fprintf(stderr,"> %s\n", buf); +  { +      char *cp; + +      if (shroud && (cp = strstr(buf, shroud))) +	  memset(cp, '*', strlen(shroud)); +      fprintf(stderr,"> %s\n", buf); +  }    /* we presume this does its own response echoing */    ok = (protocol->parse_response)(socket, buf); | 
