From 465f19899c2cb91eb0f2d5b42f35b82680ef5977 Mon Sep 17 00:00:00 2001 From: "Eric S. Raymond" Date: Thu, 30 Jan 1997 21:32:34 +0000 Subject: Separate \r\n trimming from password shrouding. svn path=/trunk/; revision=847 --- driver.c | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) (limited to 'driver.c') 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 */ + -- cgit v1.2.3