| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
| |
MFC: along with rev. 1.202
Notes:
svn path=/head/; revision=141967
|
|
|
|
|
|
|
|
|
|
| |
the function will emit an annoying log message otherwise.
Reported by: kris
MFC: along with rev. 1.202
Notes:
svn path=/head/; revision=141966
|
|
|
|
|
|
|
| |
socklen_t * argument.
Notes:
svn path=/head/; revision=141918
|
|
|
|
|
|
|
|
| |
Pointed out by: Nick Leuta
MFC after: 3 days
Notes:
svn path=/head/; revision=140473
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The major change is to process STAT sent as an OOB command w/o
breaking the current data transfer. As a side effect, this gives
better error checking in the code performing data transfers.
A lesser, but in no way cosmetic, change is using the flag `recvurg'
in the only signal-safe way that has been blessed by SUSv3. The
other flag, `transflag,' becomes private to the SIGURG machinery,
serves debugging purposes only, and may be dropped in the future.
The `byte_count' global variable is now accounting bytes actually
transferred over the network. This can give status messages looking
strange, like "X of Y bytes transferred," where X > Y, but that has
more sense than trying to compensate for combinations of data formats
on the server and client when transferring ASCII type data. BTW,
getting the size of a file in advance is unreliable for a number of
reasons in the first place. See question 18.8 of the Infrequently
Asked Questions in comp.lang.c for details.
PR: bin/52072
Tested by: Nick Leuta (earlier versions), a stress-testing tool (final)
MFC after: 1 month
Notes:
svn path=/head/; revision=140472
|
|
|
|
| |
Notes:
svn path=/head/; revision=140414
|
|
|
|
|
|
|
|
|
|
| |
A daemon has no stderr to send its complains to.
Pointed out by: Nick Leuta
MFC after: 1 week
Notes:
svn path=/head/; revision=139981
|
|
|
|
| |
Notes:
svn path=/head/; revision=139126
|
|
|
|
| |
Notes:
svn path=/head/; revision=138911
|
|
|
|
| |
Notes:
svn path=/head/; revision=138910
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
When in inetd mode, this prevents bogus messages from
appearing on the control channel. When running as a
daemon, we shouldn't write to the terminal we used to
have at all.
PR: bin/74823
MFC after: 1 week
Notes:
svn path=/head/; revision=138747
|
|
|
|
|
|
|
|
|
| |
stop the search on the first match for efficiency.
Submitted by: Nick Leuta
Notes:
svn path=/head/; revision=137987
|
|
|
|
|
|
|
|
|
| |
an FTP user has no chance to change password anyway.
Submitted by: Nick Leuta
Notes:
svn path=/head/; revision=137986
|
|
|
|
|
|
|
|
|
|
| |
Log it once at the beginning of the session instead. OTOH, log wd each
time for the sake of better auditing and consistent log format.
Proposed by: Nick Leuta <skynick -at- mail.sc.ru>
Notes:
svn path=/head/; revision=137985
|
|
|
|
|
|
|
| |
PR: bin/59773
Notes:
svn path=/head/; revision=137984
|
|
|
|
| |
Notes:
svn path=/head/; revision=137983
|
|
|
|
|
|
|
|
|
| |
regarding restricted users.
MFC after: 2 weeks
Notes:
svn path=/head/; revision=137862
|
|
|
|
|
|
|
| |
Tested with: md5(1)
Notes:
svn path=/head/; revision=137861
|
|
|
|
| |
Notes:
svn path=/head/; revision=137859
|
|
|
|
|
|
|
| |
is disabled entirely.
Notes:
svn path=/head/; revision=137853
|
|
|
|
|
|
|
|
| |
in server messages wherever this doesn't contradict to a particular
message format.
Notes:
svn path=/head/; revision=137852
|
|
|
|
|
|
|
| |
can detect format errors.
Notes:
svn path=/head/; revision=137851
|
|
|
|
| |
Notes:
svn path=/head/; revision=137850
|
|
|
|
| |
Notes:
svn path=/head/; revision=137849
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
add the working directory pathname to the log message if any of
such arguments isn't absolute. This has advantage over the old
way of logging that an admin can see what users are actually trying
to do, and where. The old code was also not too robust when it
came to a chrooted session and an absolute pathname.
Pointed out by: Nick Leuta
MFC after: 2 weeks
Notes:
svn path=/head/; revision=137848
|
|
|
|
| |
Notes:
svn path=/head/; revision=137847
|
|
|
|
| |
Notes:
svn path=/head/; revision=137839
|
|
|
|
|
|
|
|
| |
getwd() -> getcwd()
wait3() -> waitpid()
Notes:
svn path=/head/; revision=137830
|
|
|
|
|
|
|
| |
Noticed by: Nick Leuta <skynick -at- mail.sc.ru> (some of them)
Notes:
svn path=/head/; revision=137811
|
|
|
|
| |
Notes:
svn path=/head/; revision=137729
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
for status replies on file system objects:
212 Directory status.
213 File status.
Reported by: Oleg Koreshkov <okor -at- zone.salut.ru>
MFC after: 1 week
Notes:
svn path=/head/; revision=137728
|
|
|
|
|
|
|
|
|
|
| |
The size_t type is better suited for that, particularly because
the "blksize" argument is to be passed to malloc() and read().
On 64-bit archs it's more to a style issue, but the good style
of coding in C is also important.
Notes:
svn path=/head/; revision=137660
|
|
|
|
|
|
|
| |
They're unneeded and sometimes erroneous now.
Notes:
svn path=/head/; revision=137659
|
|
|
|
|
|
|
|
|
|
|
| |
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
Notes:
svn path=/head/; revision=137145
|
|
|
|
|
|
|
|
|
|
| |
(intmax_t) and %jd, which is the right way to printf
an off_t in the presence of <stdint.h>.
Submitted by: Nick Leuta
Notes:
svn path=/head/; revision=137132
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
Notes:
svn path=/head/; revision=137108
|
|
|
|
|
|
|
|
|
|
|
|
| |
- 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
Notes:
svn path=/head/; revision=137078
|
|
|
|
|
|
|
|
| |
in the comment above it so that nobody will save pointers
returned inside "struct passwd" across the calls to the function.
Notes:
svn path=/head/; revision=137076
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
Notes:
svn path=/head/; revision=136929
|
|
|
|
|
|
|
|
|
|
|
| |
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
Notes:
svn path=/head/; revision=136556
|
|
|
|
| |
Notes:
svn path=/head/; revision=136555
|
|
|
|
|
|
|
|
|
|
|
| |
prematurely, e.g., if the file has been truncated by someone else.
PR: bin/72649
Submitted by: Oleg Koreshkov (portions)
MFC after: 2 weeks
Notes:
svn path=/head/; revision=136554
|
|
|
|
| |
Notes:
svn path=/head/; revision=135738
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
Notes:
svn path=/head/; revision=135737
|
|
|
|
|
|
|
| |
Tested on: i386, ia64, amd64, sparc64, alpha
Notes:
svn path=/head/; revision=132932
|
|
|
|
|
|
|
|
|
|
| |
(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.
Notes:
svn path=/head/; revision=132931
|
|
|
|
|
|
|
|
|
| |
Thank Fortune, the C compiler can figure out by itself the proper
conversion for assignments, comparisons, and prototyped function
arguments.
Notes:
svn path=/head/; revision=132930
|
|
|
|
|
|
|
| |
we've got <stdint.h> et al now. (This makes ftpd(8) WARNS=2 clean.)
Notes:
svn path=/head/; revision=132929
|
|
|
|
| |
Notes:
svn path=/head/; revision=132926
|
|
|
|
|
|
|
| |
(Heading to WARNS=2.)
Notes:
svn path=/head/; revision=132925
|