| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
| |
Previously logxfer() used to record bogus pathnames to the log
in some cases, namely, when cwd was / or "name" was absolute.
Noticed by: Nick Leuta
MFC after: 2 weeks
|
|
|
|
|
|
|
| |
(intmax_t) and %jd, which is the right way to printf
an off_t in the presence of <stdint.h>.
Submitted by: Nick Leuta
|
|
|
|
|
|
|
|
|
| |
that the creation of a PAM context has failed.
N.B. This does not apply to pam_strerror() in RELENG_4, it
will mishandle a NULL "pamh".
Discussed with: des
|
|
|
|
|
|
|
|
|
| |
- Stop calling pam_strerror() with NULL pamh.
- Add a missing call to pam_end().
PR: bin/59776
Submitted by: Nick Leuta <see PR for email>
MFC after: 2 weeks
|
|
|
|
|
| |
in the comment above it so that nobody will save pointers
returned inside "struct passwd" across the calls to the function.
|
|
|
|
|
|
|
|
|
|
| |
instead of the disk size of the file sent. Since the log file
is intended to provide data for anonymous ftp traffic accounting,
the disk size of the file isn't really informative in this case.
PR: bin/72687
Submitted by: Oleg Koreshkov
MFC after: 1 week
|
|
|
|
|
|
|
|
| |
if sendfile() transferred some data before throwing
a error condition because sendfile() won't move the
file offset for read() to start from.
MFC after: 2 weeks
|
| |
|
|
|
|
|
|
|
|
| |
prematurely, e.g., if the file has been truncated by someone else.
PR: bin/72649
Submitted by: Oleg Koreshkov (portions)
MFC after: 2 weeks
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
| |
Do not unconditionally fork() after accept(). accept() can
return -1 due to an interrupted system call (i.e. SIGCHLD).
If we fork in that case ftpd can get into an
accept()/SIGCHLD/fork/[fail]/repeat loop.
Reported-by: fabian <fabian.duelli@bluewin.ch>
Obtained from: DragonflyBSD
MFC after: 1 month
|
|
|
|
| |
Tested on: i386, ia64, amd64, sparc64, alpha
|
|
|
|
|
|
|
| |
(and it appears possible throughout ftpd(8) source.)
It is not a mere issue of style: Null pointers in C
seem to have been mistaken one way or another quite often.
|
|
|
|
|
|
| |
Thank Fortune, the C compiler can figure out by itself the proper
conversion for assignments, comparisons, and prototyped function
arguments.
|
|
|
|
| |
we've got <stdint.h> et al now. (This makes ftpd(8) WARNS=2 clean.)
|
| |
|
|
|
|
| |
(Heading to WARNS=2.)
|
| |
|
|
|
|
|
| |
Prototyping library functions in header files has rendered
them superfluous.
|
|
|
|
| |
is not a hack, but it has a clear purpose.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
of the current user, not root. This will allow neat things
like matching anonymous FTP data traffic with a single ipfw(8)
rule:
ipfw add ... tcp from any to any uid ftp
Note that the control connection socket still belongs to the
user ftpd(8) was started from, usually root.
PR: bin/65928
Submitted by: Eugene Grosbein <eugen at grosbein.pp.ru>
MFC after: 1 month
|
| |
|
| |
|
| |
|
|
|
|
|
|
| |
In particular, do not pass the same va_list to both vprintf() and
vsyslog() without first reinitializing it. This fixes ftpd -d
on amd64.
|
|
|
|
| |
an unprototyped argument to a function.
|
|
|
|
|
|
|
|
|
| |
says they may not modify existing files through FTP.
Renaming a file is effectively a way to modify it.
For instance, if a malicious party is unable to delete or overwrite
a sensitive file, they can nevertheless rename it to a hidden name
and then upload a troyan horse under the guise of the old file name.
|
| |
|
|
|
|
|
|
|
|
|
| |
contents in reply to a RETR command. Such clients consider RETR
as a way to tell a file from a directory. Mozilla is an example.
PR: bin/62232
Submitted by: Bob Finch <bob+freebsd <at> nas <dot> com>
MFC after: 1 week
|
|
|
|
| |
Submitted by: lorder(1)
|
|
|
|
|
| |
PR: bin/2442
Reviewed by: Friedemann Becker <zxmxy33@mail.uni-tuebingen.de>
|
|
|
|
|
|
|
|
| |
However, the code did allow deletion of files. Make deleting require the -m
flag, too.
PR: bin/60809
Submitted by: Alexander Melkov <melkov@comptek.ru>
|
|
|
|
|
|
|
|
| |
don't add excessive CR on the wire.
PR: bin/59285
Submitted by: Andrey Beresovsky <and at rsu.ru>
MFC after: 1 week
|
| |
|
|
|
|
|
|
|
|
| |
and IPv6.
Wrote at: Hakone.
Powered by: Warner Losh's scotch whisky.
Requested by: nork
|
|
|
|
|
| |
were including varargs.h file but did not use any of its macros,
so they escaped the clean-up before.
|
|
|
|
|
| |
PR: docs/56017
Submitted by: Josef El-Rayes <j.el-rayes@daemon.li>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Rationale:
SIGURG is configured by ftpd to interrupt system calls, which is useful
during data transfers. However, SIGURG could interrupt I/O on the
control channel as well, which was mistaken for the end of the session.
A practical example could be aborting the download of a tiny file,
when the abort sequence reached ftpd after ftpd had passed the file
data to the system and returned to its command loop.
Reported by: ceri
MFC after: 1 week
|
|
|
|
|
|
|
|
|
| |
- always check the return value from getc(3) for EOF;
- if the attempt to read the TELNET command byte has
returned EOF, exit from the loop instead of using
the EOF value as a normal character.
MFC after: 1 week
|
|
|
|
|
|
|
|
| |
pathname inside "residue" so "chrootdir" can be simply freed later.
PR: bin/53435
Submitted by: Yutaka Ishihara <yutaka at fandc.co.jp>
MFC after: 1 week
|
|
|
|
| |
leave alone specifying a wrong type for one of them.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
don't reveal the info in reply to the SYST command.
Get rid of using the "unix" macro at the same time. It was a rather
poor way to check if the system was Unix since there were quite a
few Unix clones out there whose cc didn't define "unix" (e.g.,
NetBSD.) It was also sensitive to the C standard used, which caused
unnecessary trouble: With -std=c99, it should have been "__unix__",
and so on.
PR: bin/50690
Submitted by: Alex Semenyaka <alexs _at_ snark.ratmir.ru>
MFC after: 1 week
|
| |
|
| |
|
|
|
|
| |
Approved by: re (blanket)
|
|
|
|
|
|
| |
and _DEFAULT are the same for 5.x.
Committed under threat of action from: The mdoc police
|
| |
|
| |
|
|
|
|
|
|
|
| |
from everyone but sysadmins.
PR: bin/29487
MFC after: 3 days
|
| |
|