aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEric S. Raymond <esr@thyrsus.com>1997-01-30 21:32:34 +0000
committerEric S. Raymond <esr@thyrsus.com>1997-01-30 21:32:34 +0000
commit465f19899c2cb91eb0f2d5b42f35b82680ef5977 (patch)
tree89464ede6005b35145bc04d056134834275bcfc6
parentfadbd8cc4920ad96a14b01e3ca8730948e4d7241 (diff)
downloadfetchmail-465f19899c2cb91eb0f2d5b42f35b82680ef5977.tar.gz
fetchmail-465f19899c2cb91eb0f2d5b42f35b82680ef5977.tar.bz2
fetchmail-465f19899c2cb91eb0f2d5b42f35b82680ef5977.zip
Separate \r\n trimming from password shrouding.
svn path=/trunk/; revision=847
-rw-r--r--driver.c12
1 files changed, 8 insertions, 4 deletions
diff --git a/driver.c b/driver.c
index 5a9d708b..ee57a805 100644
--- a/driver.c
+++ b/driver.c
@@ -1474,8 +1474,8 @@ va_dcl
if ((cp = strstr(buf, shroud)))
memset(cp, '*', strlen(shroud));
- buf[strlen(buf)-1] = '\0';
}
+ buf[strlen(buf)-2] = '\0';
error(0, 0, "%s> %s", protocol->name, buf);
}
}
@@ -1533,10 +1533,13 @@ va_dcl
if (outlevel == O_VERBOSE)
{
- char *cp;
+ if (shroud)
+ {
+ char *cp;
- if (shroud && (cp = strstr(buf, shroud)))
- memset(cp, '*', strlen(shroud));
+ if ((cp = strstr(buf, shroud)))
+ memset(cp, '*', strlen(shroud));
+ }
buf[strlen(buf)-1] = '\0';
error(0, 0, "%s> %s", protocol->name, buf);
}
@@ -1549,3 +1552,4 @@ va_dcl
}
/* driver.c ends here */
+