diff options
author | 2000-03-03 15:51:45 +0000 | |
---|---|---|
committer | 2000-03-03 15:51:45 +0000 | |
commit | 7effe28194e0561403a6c809104ea7a21c651c87 (patch) | |
tree | ec6e5bcc516b25f83b7b12148176d5f06af4ec83 | |
parent | remove WIDE's experimental ip reass code, mistakingly merged in partially. (diff) | |
download | wireguard-openbsd-7effe28194e0561403a6c809104ea7a21c651c87.tar.xz wireguard-openbsd-7effe28194e0561403a6c809104ea7a21c651c87.zip |
Turns out that our implementation of STAT wasn't RFC 959 compliant.
This version is now RFC 959 compliant, using a patch adapted from one
sent in by david.leonard@eecs.uq.edu.au
-rw-r--r-- | libexec/ftpd/ftpd.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/libexec/ftpd/ftpd.c b/libexec/ftpd/ftpd.c index fc926ad130e..1c443f5e779 100644 --- a/libexec/ftpd/ftpd.c +++ b/libexec/ftpd/ftpd.c @@ -1,4 +1,4 @@ -/* $OpenBSD: ftpd.c,v 1.68 2000/01/18 18:26:38 millert Exp $ */ +/* $OpenBSD: ftpd.c,v 1.69 2000/03/03 15:51:45 bitblt Exp $ */ /* $NetBSD: ftpd.c,v 1.15 1995/06/03 22:46:47 mycroft Exp $ */ /* @@ -1617,11 +1617,13 @@ statfilecmd(filename) { FILE *fin; int c; + int atstart; char line[LINE_MAX]; (void)snprintf(line, sizeof(line), "/bin/ls -lgA %s", filename); fin = ftpd_popen(line, "r"); lreply(211, "status of %s:", filename); + atstart = 1; while ((c = getc(fin)) != EOF) { if (c == '\n') { if (ferror(stdout)){ @@ -1637,7 +1639,10 @@ statfilecmd(filename) } (void) putc('\r', stdout); } + if (atstart && isdigit(c)) + (void) putc(' ', stdout); (void) putc(c, stdout); + atstart = (c == '\n'); } (void) ftpd_pclose(fin); reply(211, "End of Status"); |