History log of /freebsd/libexec/ftpd/ftpd.c (Results 76 – 100 of 477)
Revision (<<< Hide revision tags) (Show revision tags >>>) Date Author Comments
# 4a3e5acd 18-Nov-2004 Yaroslav Tykhiy <ytykhiy@gmail.com>

'\n' needs not to appear in reply() strings.


# 6b2dee6b 18-Nov-2004 Yaroslav Tykhiy <ytykhiy@gmail.com>

Log pathname arguments to ftp commands as the user specified them;
add the working directory pathname to the log message if any of
such arguments isn't absolute. This has advantage over the old
way

Log pathname arguments to ftp commands as the user specified them;
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

show more ...


# ac4f2391 18-Nov-2004 Yaroslav Tykhiy <ytykhiy@gmail.com>

Use S_ISDIR() macro instead of a hand-rolled test.


# 75933089 18-Nov-2004 Yaroslav Tykhiy <ytykhiy@gmail.com>

getcwd() won't leave a error string in the buffer, unlike getwd().


# de9b6c03 17-Nov-2004 Yaroslav Tykhiy <ytykhiy@gmail.com>

Use POSIX functions instead of legacy ones:
getwd() -> getcwd()
wait3() -> waitpid()


# 7e295315 17-Nov-2004 Yaroslav Tykhiy <ytykhiy@gmail.com>

Kill more unneeded casts found.

Noticed by: Nick Leuta <skynick -at- mail.sc.ru> (some of them)


# 3b48b877 15-Nov-2004 Yaroslav Tykhiy <ytykhiy@gmail.com>

Don't invent ways of capitalization orthogonal to the English grammar.


# 41c57b48 15-Nov-2004 Yaroslav Tykhiy <ytykhiy@gmail.com>

RFC 959 states that the following codes should be used
for status replies on file system objects:

212 Directory status.
213 File status.

Reported by: Oleg Koreshkov <okor -at- zone.salut.ru>
MFC

RFC 959 states that the following codes should be used
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

show more ...


# 6e4b0a55 13-Nov-2004 Yaroslav Tykhiy <ytykhiy@gmail.com>

Using off_t to pass a block size is obvious overkill.
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

Using off_t to pass a block size is obvious overkill.
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.

show more ...


# e3765043 13-Nov-2004 Yaroslav Tykhiy <ytykhiy@gmail.com>

Kill ancient casts to integral types left from the K&R era.
They're unneeded and sometimes erroneous now.


Revision tags: release/5.3.0_cvs, release/5.3.0
# 8c1c21f2 03-Nov-2004 Yaroslav Tykhiy <ytykhiy@gmail.com>

Fix logxfer() by using realpath(3) instead of playing with getwd(3).
Previously logxfer() used to record bogus pathnames to the log
in some cases, namely, when cwd was / or "name" was absolute.

Noti

Fix logxfer() by using realpath(3) instead of playing with getwd(3).
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

show more ...


# bb4641e2 02-Nov-2004 Yaroslav Tykhiy <ytykhiy@gmail.com>

Replace the last occurence of (long long) and %qd with
(intmax_t) and %jd, which is the right way to printf
an off_t in the presence of <stdint.h>.

Submitted by: Nick Leuta


# 545ea864 01-Nov-2004 Yaroslav Tykhiy <ytykhiy@gmail.com>

OpenPAM allows passing a NULL "pamh" to pam_strerror() to indicate
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 "pa

OpenPAM allows passing a NULL "pamh" to pam_strerror() to indicate
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

show more ...


# de45162d 30-Oct-2004 Yaroslav Tykhiy <ytykhiy@gmail.com>

- Stop shadowing global "pamh" by a local variable in auth_pam().
- Stop calling pam_strerror() with NULL pamh.
- Add a missing call to pam_end().

PR: bin/59776
Submitted by: Nick Leuta <see PR for

- Stop shadowing global "pamh" by a local variable in auth_pam().
- 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

show more ...


# c29b9b47 30-Oct-2004 Yaroslav Tykhiy <ytykhiy@gmail.com>

Describe the semantics of the sgetpwnam() helper function
in the comment above it so that nobody will save pointers
returned inside "struct passwd" across the calls to the function.


# c999732b 24-Oct-2004 Yaroslav Tykhiy <ytykhiy@gmail.com>

Log the actual number of bytes sent on the wire to /var/log/ftpd
instead of the disk size of the file sent. Since the log file
is intended to provide data for anonymous ftp traffic accounting,
the

Log the actual number of bytes sent on the wire to /var/log/ftpd
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

show more ...


# b4585cc1 15-Oct-2004 Yaroslav Tykhiy <ytykhiy@gmail.com>

We must not fall back to the old way (read-write)
if sendfile() transferred some data before throwing
a error condition because sendfile() won't move the
file offset for read() to start from.

MFC af

We must not fall back to the old way (read-write)
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

show more ...


# 2f492fc8 15-Oct-2004 Yaroslav Tykhiy <ytykhiy@gmail.com>

Clean-up around sendfile(): drop an excessive check for error condition.


# 2e22b914 15-Oct-2004 Yaroslav Tykhiy <ytykhiy@gmail.com>

Account for the fact that sendfile(2) may hit the end of file
prematurely, e.g., if the file has been truncated by someone else.

PR: bin/72649
Submitted by: Oleg Koreshkov (portions)
MFC after: 2 w

Account for the fact that sendfile(2) may hit the end of file
prematurely, e.g., if the file has been truncated by someone else.

PR: bin/72649
Submitted by: Oleg Koreshkov (portions)
MFC after: 2 weeks

show more ...


# 6d4a0e75 24-Sep-2004 Maxim Konovalov <maxim@FreeBSD.org>

Indent.


# 40e67765 24-Sep-2004 Maxim Konovalov <maxim@FreeBSD.org>

o Merge rev. 1.5 libexec/ftpd/ftpd.c from DragonflyBSD:

Do not unconditionally fork() after accept(). accept() can
return -1 due to an interrupted system call (i.e. SIGCHLD).
If we fork in th

o Merge rev. 1.5 libexec/ftpd/ftpd.c from DragonflyBSD:

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

show more ...


# aa5a9d3f 31-Jul-2004 Yaroslav Tykhiy <ytykhiy@gmail.com>

Change ``(foo *)0'' to ``NULL'' where it's possible
(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 ano

Change ``(foo *)0'' to ``NULL'' where it's possible
(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.

show more ...


# 0e519c96 31-Jul-2004 Yaroslav Tykhiy <ytykhiy@gmail.com>

Kill a small herd of casts to off_t where they were not needed.
Thank Fortune, the C compiler can figure out by itself the proper
conversion for assignments, comparisons, and prototyped function
argu

Kill a small herd of casts to off_t where they were not needed.
Thank Fortune, the C compiler can figure out by itself the proper
conversion for assignments, comparisons, and prototyped function
arguments.

show more ...


# a57e1ef0 31-Jul-2004 Yaroslav Tykhiy <ytykhiy@gmail.com>

Printf(3) off_t values through conversion to intmax_t since
we've got <stdint.h> et al now. (This makes ftpd(8) WARNS=2 clean.)


# c16cd94d 31-Jul-2004 Yaroslav Tykhiy <ytykhiy@gmail.com>

Kill an unused variable (heading to WARNS=2.)


12345678910>>...20