summaryrefslogtreecommitdiff
path: root/libexec/ftpd
diff options
context:
space:
mode:
authorTheo de Raadt <deraadt@cvs.openbsd.org>1996-08-22 07:01:08 +0000
committerTheo de Raadt <deraadt@cvs.openbsd.org>1996-08-22 07:01:08 +0000
commit6ac491ee0f51c85d36d8f83ed5cda01925235786 (patch)
treef9d7c14b971034d7bacc333b6f08ad493f06bd79 /libexec/ftpd
parent049107bc983b7e45fbdde3e86430b4c0fe677516 (diff)
de-gibble ftpd for w
Diffstat (limited to 'libexec/ftpd')
-rw-r--r--libexec/ftpd/ftpcmd.y15
1 files changed, 11 insertions, 4 deletions
diff --git a/libexec/ftpd/ftpcmd.y b/libexec/ftpd/ftpcmd.y
index e3020975cbc..f26db5b6f84 100644
--- a/libexec/ftpd/ftpcmd.y
+++ b/libexec/ftpd/ftpcmd.y
@@ -941,14 +941,21 @@ yylex()
dologout(0);
}
(void) alarm(0);
-#ifdef HASSETPROCTITLE
- if (strncasecmp(cbuf, "PASS", 4) != NULL)
- setproctitle("%s: %s", proctitle, cbuf);
-#endif /* HASSETPROCTITLE */
if ((cp = strchr(cbuf, '\r'))) {
*cp++ = '\n';
*cp = '\0';
}
+#ifdef HASSETPROCTITLE
+ if (strncasecmp(cbuf, "PASS", 4) != NULL) {
+ if ((cp = strpbrk(cbuf, "\n"))) {
+ c = *cp;
+ *cp = '\0';
+ setproctitle("%s: %s", proctitle, cbuf);
+ *cp = c;
+ }
+ } else
+ setproctitle("%s: %s", proctitle, cbuf);
+#endif /* HASSETPROCTITLE */
if ((cp = strpbrk(cbuf, " \n")))
cpos = cp - cbuf;
if (cpos == 0)