bin/72687: [PATCH] ftpd(8) logs to /var/log/ftpd incorrect size.
Oleg Koreshkov
freebsd-pr at zone.salut.ru
Thu Oct 14 07:00:51 PDT 2004
>Number: 72687
>Category: bin
>Synopsis: [PATCH] ftpd(8) logs to /var/log/ftpd incorrect size.
>Confidential: no
>Severity: non-critical
>Priority: low
>Responsible: freebsd-bugs
>State: open
>Quarter:
>Keywords:
>Date-Required:
>Class: sw-bug
>Submitter-Id: current-users
>Arrival-Date: Thu Oct 14 14:00:49 GMT 2004
>Closed-Date:
>Last-Modified:
>Originator: Oleg Koreshkov
>Release: any
>Organization:
none
>Environment:
FreeBSD 4.8 i386
>Description:
ftpd(8) logs to /var/log/ftpd full file size instead of
number of really transferred octets.
>How-To-Repeat:
Run ftpd(8) with -S set (log all anonymous file downloads to
/var/run/ftpd). Start transfer of file, issue ABOR command
or simulate disconnect. ftpd(8) will log full file size
instead of number really transferred octets.
>Fix:
--- ftpd.c
+++ ftpd.c
@@ -1675,8 +1675,8 @@
time(&start);
send_data(fin, dout, st.st_blksize, st.st_size,
restart_point == 0 && cmd == 0 && S_ISREG(st.st_mode));
- if (cmd == 0 && guest && stats)
- logxfer(name, st.st_size, start);
+ if (cmd == 0 && guest && stats && byte_count > 0)
+ logxfer(name, byte_count, start);
(void) fclose(dout);
data = -1;
pdata = -1;
>Release-Note:
>Audit-Trail:
>Unformatted:
More information about the freebsd-bugs
mailing list