The NetBSD Project

CVS log for src/libexec/ftpd/ftpd.c

[BACK] Up to [cvs.NetBSD.org] / src / libexec / ftpd

Request diff between arbitrary revisions


Default branch: MAIN


Revision 1.198.2.1 / (download) - annotate - [select for diffs], Wed Aug 20 00:02:22 2014 UTC (2 months ago) by tls
Branch: tls-maxphys
Changes since 1.198: +4 -5 lines
Diff to previous 1.198 (colored) next main 1.199 (colored)

Rebase to HEAD as of a few days ago.

Revision 1.197.2.2 / (download) - annotate - [select for diffs], Thu May 22 11:37:13 2014 UTC (5 months ago) by yamt
Branch: yamt-pagecache
Changes since 1.197.2.1: +4 -5 lines
Diff to previous 1.197.2.1 (colored) to branchpoint 1.197 (colored) next main 1.198 (colored)

sync with head.

for a reference, the tree before this commit was tagged
as yamt-pagecache-tag8.

this commit was splitted into small chunks to avoid
a limitation of cvs.  ("Protocol error: too many arguments")

Revision 1.200 / (download) - annotate - [select for diffs], Wed Jul 31 19:50:47 2013 UTC (14 months, 3 weeks ago) by christos
Branch: MAIN
CVS Tags: yamt-pagecache-base9, tls-maxphys-base, tls-earlyentropy-base, tls-earlyentropy, riastradh-xf86-video-intel-2-7-1-pre-2-21-15, riastradh-drm2-base3, netbsd-7-base, netbsd-7, HEAD
Changes since 1.199: +4 -4 lines
Diff to previous 1.199 (colored)

fstat returns -1 on error (Maxime Villard)
also while (1) -> for (;;)

Revision 1.199 / (download) - annotate - [select for diffs], Wed Jul 3 14:16:01 2013 UTC (15 months, 3 weeks ago) by christos
Branch: MAIN
CVS Tags: riastradh-drm2-base2, riastradh-drm2-base1, riastradh-drm2-base, riastradh-drm2
Changes since 1.198: +2 -3 lines
Diff to previous 1.198 (colored)

remove unneeded initialization.

Revision 1.197.2.1 / (download) - annotate - [select for diffs], Tue Oct 30 18:59:21 2012 UTC (23 months, 3 weeks ago) by yamt
Branch: yamt-pagecache
CVS Tags: yamt-pagecache-tag8
Changes since 1.197: +3 -3 lines
Diff to previous 1.197 (colored)

sync with head

Revision 1.198 / (download) - annotate - [select for diffs], Tue Jun 19 06:06:34 2012 UTC (2 years, 4 months ago) by dholland
Branch: MAIN
CVS Tags: yamt-pagecache-base8, yamt-pagecache-base7, yamt-pagecache-base6, agc-symver-base, agc-symver
Branch point for: tls-maxphys
Changes since 1.197: +3 -3 lines
Diff to previous 1.197 (colored)

Pass WARNS=5

Revision 1.197 / (download) - annotate - [select for diffs], Fri Sep 16 16:13:17 2011 UTC (3 years, 1 month ago) by plunky
Branch: MAIN
CVS Tags: yamt-pagecache-base5, yamt-pagecache-base4, yamt-pagecache-base3, yamt-pagecache-base2, yamt-pagecache-base, netbsd-6-base, netbsd-6-1-RELEASE, netbsd-6-1-RC4, netbsd-6-1-RC3, netbsd-6-1-RC2, netbsd-6-1-RC1, netbsd-6-1-5-RELEASE, netbsd-6-1-4-RELEASE, netbsd-6-1-3-RELEASE, netbsd-6-1-2-RELEASE, netbsd-6-1-1-RELEASE, netbsd-6-1, netbsd-6-0-RELEASE, netbsd-6-0-RC2, netbsd-6-0-RC1, netbsd-6-0-6-RELEASE, netbsd-6-0-5-RELEASE, netbsd-6-0-4-RELEASE, netbsd-6-0-3-RELEASE, netbsd-6-0-2-RELEASE, netbsd-6-0-1-RELEASE, netbsd-6-0, netbsd-6, matt-nb6-plus-nbase, matt-nb6-plus-base, matt-nb6-plus
Branch point for: yamt-pagecache
Changes since 1.196: +3 -3 lines
Diff to previous 1.196 (colored)

NULL does not need a cast, here

Revision 1.196 / (download) - annotate - [select for diffs], Sun Sep 4 23:16:41 2011 UTC (3 years, 1 month ago) by lukem
Branch: MAIN
Changes since 1.195: +4 -3 lines
Diff to previous 1.195 (colored)

Reduce priority of syslog message if getpeername returns ENOTCONN.
PR bin/18934 by Greg A. Woods (with supplied fix).

Revision 1.195 / (download) - annotate - [select for diffs], Mon Aug 29 20:41:06 2011 UTC (3 years, 1 month ago) by joerg
Branch: MAIN
Changes since 1.194: +5 -5 lines
Diff to previous 1.194 (colored)

Use __dead

Revision 1.194 / (download) - annotate - [select for diffs], Mon Jul 13 19:05:40 2009 UTC (5 years, 3 months ago) by roy
Branch: MAIN
CVS Tags: matt-premerge-20091211, matt-mips64-premerge-20101231, cherry-xenmp-base, cherry-xenmp, bouyer-quota2-nbase, bouyer-quota2-base, bouyer-quota2
Changes since 1.193: +4 -4 lines
Diff to previous 1.193 (colored)

Rename internal getline() function to get_line() so it does
conflict with the soon to be added getline(3) libc function.

Revision 1.191.2.1 / (download) - annotate - [select for diffs], Wed May 13 19:18:37 2009 UTC (5 years, 5 months ago) by jym
Branch: jym-xensuspend
Changes since 1.191: +32 -28 lines
Diff to previous 1.191 (colored) next main 1.192 (colored)

Sync with HEAD.

Third (and last) commit. See http://mail-index.netbsd.org/source-changes/2009/05/13/msg221222.html

Revision 1.193 / (download) - annotate - [select for diffs], Sun Mar 15 07:48:36 2009 UTC (5 years, 7 months ago) by lukem
Branch: MAIN
CVS Tags: jym-xensuspend-nbase, jym-xensuspend-base
Changes since 1.192: +24 -20 lines
Diff to previous 1.192 (colored)

Fix WARNS=4 issues (const & sign mismatches, etc)
Ensure various ftpd.conf values can't exceed their underlying types.

Revision 1.192 / (download) - annotate - [select for diffs], Mon Mar 2 03:47:44 2009 UTC (5 years, 7 months ago) by lukem
Branch: MAIN
Changes since 1.191: +10 -10 lines
Diff to previous 1.191 (colored)

Use LLF (et al) instead of "%lld" (et al).

Revision 1.191 / (download) - annotate - [select for diffs], Thu Jan 8 18:47:49 2009 UTC (5 years, 9 months ago) by christos
Branch: MAIN
Branch point for: jym-xensuspend
Changes since 1.190: +26 -15 lines
Diff to previous 1.190 (colored)

PR/40339: Ed Ravin: make ftpd log both the hostname and numeric address.

Revision 1.190 / (download) - annotate - [select for diffs], Mon Dec 29 00:33:34 2008 UTC (5 years, 9 months ago) by christos
Branch: MAIN
Changes since 1.189: +11 -9 lines
Diff to previous 1.189 (colored)

fix for 64 bit time_t and dev_t

Revision 1.189 / (download) - annotate - [select for diffs], Tue Oct 28 08:05:26 2008 UTC (5 years, 11 months ago) by lukem
Branch: MAIN
CVS Tags: netbsd-5-base, netbsd-5-2-RELEASE, netbsd-5-2-RC1, netbsd-5-2-2-RELEASE, netbsd-5-2-1-RELEASE, netbsd-5-2, netbsd-5-1-RELEASE, netbsd-5-1-RC4, netbsd-5-1-RC3, netbsd-5-1-RC2, netbsd-5-1-RC1, netbsd-5-1-4-RELEASE, netbsd-5-1-3-RELEASE, netbsd-5-1-2-RELEASE, netbsd-5-1-1-RELEASE, netbsd-5-1, netbsd-5-0-RELEASE, netbsd-5-0-RC4, netbsd-5-0-RC3, netbsd-5-0-RC2, netbsd-5-0-RC1, netbsd-5-0-2-RELEASE, netbsd-5-0-1-RELEASE, netbsd-5-0, netbsd-5, matt-nb5-pq3-base, matt-nb5-pq3, matt-nb5-mips64-u2-k2-k4-k7-k8-k9, matt-nb5-mips64-u1-k1-k5, matt-nb5-mips64-premerge-20101231, matt-nb5-mips64-premerge-20091211, matt-nb5-mips64-k15, matt-nb5-mips64, matt-nb4-mips64-k7-u2a-k9b
Changes since 1.188: +7 -4 lines
Diff to previous 1.188 (colored)

Constify.
Rework an expression to make it easier to conditionally compile.

Revision 1.184.2.3 / (download) - annotate - [select for diffs], Wed Sep 24 16:35:51 2008 UTC (6 years, 1 month ago) by wrstuden
Branch: wrstuden-revivesa
Changes since 1.184.2.2: +69 -20 lines
Diff to previous 1.184.2.2 (colored) to branchpoint 1.184 (colored) next main 1.185 (colored)

Merge in changes between wrstuden-revivesa-base-2 and
wrstuden-revivesa-base-3.

Revision 1.164.2.8 / (download) - annotate - [select for diffs], Thu Sep 18 19:28:41 2008 UTC (6 years, 1 month ago) by bouyer
Branch: netbsd-3
Changes since 1.164.2.7: +9 -3 lines
Diff to previous 1.164.2.7 (colored) to branchpoint 1.164 (colored) next main 1.165 (colored)

Pull up following revision(s) (requested by lukem in ticket #1964):
	libexec/ftpd/ftpd.c: revision 1.187 via patch
	libexec/ftpd/extern.h: revision 1.58 via patch
	libexec/ftpd/ftpcmd.y: revision 1.88 via patch
	libexec/ftpd/version.h: patch
Don't split large commands into multiple commands; just fail on them.
This prevents CSRF-like attacks, when a web browser is used to access
an ftp server.
Reported by Maksymilian Arciemowicz <cxib@securityreason.com>.
Fix mostly derived from OpenBSD, written by Moritz Jodeit <moritz@OpenBSD.o=
rg>

Revision 1.164.2.1.2.7 / (download) - annotate - [select for diffs], Thu Sep 18 19:28:40 2008 UTC (6 years, 1 month ago) by bouyer
Branch: netbsd-3-0
Changes since 1.164.2.1.2.6: +9 -3 lines
Diff to previous 1.164.2.1.2.6 (colored) to branchpoint 1.164.2.1 (colored) next main 1.164.2.2 (colored)

Pull up following revision(s) (requested by lukem in ticket #1964):
	libexec/ftpd/ftpd.c: revision 1.187 via patch
	libexec/ftpd/extern.h: revision 1.58 via patch
	libexec/ftpd/ftpcmd.y: revision 1.88 via patch
	libexec/ftpd/version.h: patch
Don't split large commands into multiple commands; just fail on them.
This prevents CSRF-like attacks, when a web browser is used to access
an ftp server.
Reported by Maksymilian Arciemowicz <cxib@securityreason.com>.
Fix mostly derived from OpenBSD, written by Moritz Jodeit <moritz@OpenBSD.o=
rg>

Revision 1.164.2.1.4.7 / (download) - annotate - [select for diffs], Thu Sep 18 19:28:23 2008 UTC (6 years, 1 month ago) by bouyer
Branch: netbsd-3-1
Changes since 1.164.2.1.4.6: +9 -3 lines
Diff to previous 1.164.2.1.4.6 (colored) to branchpoint 1.164.2.1 (colored) next main 1.164.2.2 (colored)

Pull up following revision(s) (requested by lukem in ticket #1964):
	libexec/ftpd/ftpd.c: revision 1.187 via patch
	libexec/ftpd/extern.h: revision 1.58 via patch
	libexec/ftpd/ftpcmd.y: revision 1.88 via patch
	libexec/ftpd/version.h: patch
Don't split large commands into multiple commands; just fail on them.
This prevents CSRF-like attacks, when a web browser is used to access
an ftp server.
Reported by Maksymilian Arciemowicz <cxib@securityreason.com>.
Fix mostly derived from OpenBSD, written by Moritz Jodeit <moritz@OpenBSD.o=
rg>

Revision 1.164.2.1.4.6 / (download) - annotate - [select for diffs], Thu Sep 18 19:22:44 2008 UTC (6 years, 1 month ago) by bouyer
Branch: netbsd-3-1
Changes since 1.164.2.1.4.5: +13 -2 lines
Diff to previous 1.164.2.1.4.5 (colored) to branchpoint 1.164.2.1 (colored)

Pull up following revision(s) (requested by lukem in ticket #1963):
	libexec/ftpd/ftpd.c: revision 1.179
PR/35449: Shigeya Suzuki: ftpd does not register socket address into PAM +FIX

Revision 1.164.2.1.2.6 / (download) - annotate - [select for diffs], Thu Sep 18 19:22:38 2008 UTC (6 years, 1 month ago) by bouyer
Branch: netbsd-3-0
Changes since 1.164.2.1.2.5: +13 -2 lines
Diff to previous 1.164.2.1.2.5 (colored) to branchpoint 1.164.2.1 (colored)

Pull up following revision(s) (requested by lukem in ticket #1963):
	libexec/ftpd/ftpd.c: revision 1.179
PR/35449: Shigeya Suzuki: ftpd does not register socket address into PAM +FIX

Revision 1.164.2.7 / (download) - annotate - [select for diffs], Thu Sep 18 19:22:25 2008 UTC (6 years, 1 month ago) by bouyer
Branch: netbsd-3
Changes since 1.164.2.6: +13 -2 lines
Diff to previous 1.164.2.6 (colored) to branchpoint 1.164 (colored)

Pull up following revision(s) (requested by lukem in ticket #1963):
	libexec/ftpd/ftpd.c: revision 1.179
PR/35449: Shigeya Suzuki: ftpd does not register socket address into PAM +FIX

Revision 1.164.2.1.2.5 / (download) - annotate - [select for diffs], Thu Sep 18 19:21:03 2008 UTC (6 years, 1 month ago) by bouyer
Branch: netbsd-3-0
Changes since 1.164.2.1.2.4: +2 -4 lines
Diff to previous 1.164.2.1.2.4 (colored) to branchpoint 1.164.2.1 (colored)

Pull up following revision(s) (requested by lukem in ticket #1962):
	libexec/ftpd/ftpd.c: revision 1.175
Remove unreachable code (res could never be NULL here).
Fixes Coverity CID 712.
Ok by lukem@.

Revision 1.164.2.6 / (download) - annotate - [select for diffs], Thu Sep 18 19:21:00 2008 UTC (6 years, 1 month ago) by bouyer
Branch: netbsd-3
Changes since 1.164.2.5: +2 -4 lines
Diff to previous 1.164.2.5 (colored) to branchpoint 1.164 (colored)

Pull up following revision(s) (requested by lukem in ticket #1962):
	libexec/ftpd/ftpd.c: revision 1.175
Remove unreachable code (res could never be NULL here).
Fixes Coverity CID 712.
Ok by lukem@.

Revision 1.164.2.1.4.5 / (download) - annotate - [select for diffs], Thu Sep 18 19:20:50 2008 UTC (6 years, 1 month ago) by bouyer
Branch: netbsd-3-1
Changes since 1.164.2.1.4.4: +2 -4 lines
Diff to previous 1.164.2.1.4.4 (colored) to branchpoint 1.164.2.1 (colored)

Pull up following revision(s) (requested by lukem in ticket #1962):
	libexec/ftpd/ftpd.c: revision 1.175
Remove unreachable code (res could never be NULL here).
Fixes Coverity CID 712.
Ok by lukem@.

Revision 1.164.2.1.4.4 / (download) - annotate - [select for diffs], Thu Sep 18 19:16:54 2008 UTC (6 years, 1 month ago) by bouyer
Branch: netbsd-3-1
Changes since 1.164.2.1.4.3: +3 -2 lines
Diff to previous 1.164.2.1.4.3 (colored) to branchpoint 1.164.2.1 (colored)

Pull up following revision(s) (requested by lukem in ticket #1961):
	libexec/ftpd/ftpd.c: revision 1.174
Set file to NULL after calling fclose().
Fixes Coverity CID 2669.
Ok by lukem@.

Revision 1.164.2.1.2.4 / (download) - annotate - [select for diffs], Thu Sep 18 19:16:51 2008 UTC (6 years, 1 month ago) by bouyer
Branch: netbsd-3-0
Changes since 1.164.2.1.2.3: +3 -2 lines
Diff to previous 1.164.2.1.2.3 (colored) to branchpoint 1.164.2.1 (colored)

Pull up following revision(s) (requested by lukem in ticket #1961):
	libexec/ftpd/ftpd.c: revision 1.174
Set file to NULL after calling fclose().
Fixes Coverity CID 2669.
Ok by lukem@.

Revision 1.164.2.5 / (download) - annotate - [select for diffs], Thu Sep 18 19:16:42 2008 UTC (6 years, 1 month ago) by bouyer
Branch: netbsd-3
Changes since 1.164.2.4: +3 -2 lines
Diff to previous 1.164.2.4 (colored) to branchpoint 1.164 (colored)

Pull up following revision(s) (requested by lukem in ticket #1961):
	libexec/ftpd/ftpd.c: revision 1.174
Set file to NULL after calling fclose().
Fixes Coverity CID 2669.
Ok by lukem@.

Revision 1.164.2.1.4.3 / (download) - annotate - [select for diffs], Thu Sep 18 19:15:15 2008 UTC (6 years, 1 month ago) by bouyer
Branch: netbsd-3-1
Changes since 1.164.2.1.4.2: +4 -3 lines
Diff to previous 1.164.2.1.4.2 (colored) to branchpoint 1.164.2.1 (colored)

Pull up following revision(s) (requested by lukem in ticket #1960):
	libexec/ftpd/ftpd.c: revision 1.173
Make sure that "su" is initialized before dereferencing it.
Fixes Coverity CID 1075.
Ok by lukem@.

Revision 1.164.2.4 / (download) - annotate - [select for diffs], Thu Sep 18 19:15:12 2008 UTC (6 years, 1 month ago) by bouyer
Branch: netbsd-3
Changes since 1.164.2.3: +4 -3 lines
Diff to previous 1.164.2.3 (colored) to branchpoint 1.164 (colored)

Pull up following revision(s) (requested by lukem in ticket #1960):
	libexec/ftpd/ftpd.c: revision 1.173
Make sure that "su" is initialized before dereferencing it.
Fixes Coverity CID 1075.
Ok by lukem@.

Revision 1.164.2.1.2.3 / (download) - annotate - [select for diffs], Thu Sep 18 19:15:04 2008 UTC (6 years, 1 month ago) by bouyer
Branch: netbsd-3-0
Changes since 1.164.2.1.2.2: +4 -3 lines
Diff to previous 1.164.2.1.2.2 (colored) to branchpoint 1.164.2.1 (colored)

Pull up following revision(s) (requested by lukem in ticket #1960):
	libexec/ftpd/ftpd.c: revision 1.173
Make sure that "su" is initialized before dereferencing it.
Fixes Coverity CID 1075.
Ok by lukem@.

Revision 1.164.2.1.4.2 / (download) - annotate - [select for diffs], Thu Sep 18 19:13:48 2008 UTC (6 years, 1 month ago) by bouyer
Branch: netbsd-3-1
Changes since 1.164.2.1.4.1: +7 -7 lines
Diff to previous 1.164.2.1.4.1 (colored) to branchpoint 1.164.2.1 (colored)

Pull up following revision(s) (requested by lukem in ticket #1959):
	libexec/ftpd/ftpd.c: revision 1.170
NLST should return 450 instead of 550 upon error, per RFC 959.

Revision 1.164.2.1.2.2 / (download) - annotate - [select for diffs], Thu Sep 18 19:13:44 2008 UTC (6 years, 1 month ago) by bouyer
Branch: netbsd-3-0
Changes since 1.164.2.1.2.1: +7 -7 lines
Diff to previous 1.164.2.1.2.1 (colored) to branchpoint 1.164.2.1 (colored)

Pull up following revision(s) (requested by lukem in ticket #1959):
	libexec/ftpd/ftpd.c: revision 1.170
NLST should return 450 instead of 550 upon error, per RFC 959.

Revision 1.164.2.3 / (download) - annotate - [select for diffs], Thu Sep 18 19:13:36 2008 UTC (6 years, 1 month ago) by bouyer
Branch: netbsd-3
Changes since 1.164.2.2: +7 -7 lines
Diff to previous 1.164.2.2 (colored) to branchpoint 1.164 (colored)

Pull up following revision(s) (requested by lukem in ticket #1959):
	libexec/ftpd/ftpd.c: revision 1.170
NLST should return 450 instead of 550 upon error, per RFC 959.

Revision 1.164.2.1.4.1 / (download) - annotate - [select for diffs], Thu Sep 18 19:12:15 2008 UTC (6 years, 1 month ago) by bouyer
Branch: netbsd-3-1
Changes since 1.164.2.1: +4 -3 lines
Diff to previous 1.164.2.1 (colored)

Pull up following revision(s) (requested by lukem in ticket #1958):
	libexec/ftpd/ftpd.c: revision 1.169
logxfer(): don't use the same buffer to store the results of two separate
concurrent realpath(3)s, otherwise we'll log the wrong information
for a rename.
Noted by Dmitry Sivachenko in private mail.

Revision 1.164.2.1.2.1 / (download) - annotate - [select for diffs], Thu Sep 18 19:12:08 2008 UTC (6 years, 1 month ago) by bouyer
Branch: netbsd-3-0
Changes since 1.164.2.1: +4 -3 lines
Diff to previous 1.164.2.1 (colored)

Pull up following revision(s) (requested by lukem in ticket #1958):
	libexec/ftpd/ftpd.c: revision 1.169
logxfer(): don't use the same buffer to store the results of two separate
concurrent realpath(3)s, otherwise we'll log the wrong information
for a rename.
Noted by Dmitry Sivachenko in private mail.

Revision 1.164.2.2 / (download) - annotate - [select for diffs], Thu Sep 18 19:11:43 2008 UTC (6 years, 1 month ago) by bouyer
Branch: netbsd-3
Changes since 1.164.2.1: +4 -3 lines
Diff to previous 1.164.2.1 (colored) to branchpoint 1.164 (colored)

Pull up following revision(s) (requested by lukem in ticket #1958):
	libexec/ftpd/ftpd.c: revision 1.169
logxfer(): don't use the same buffer to store the results of two separate
concurrent realpath(3)s, otherwise we'll log the wrong information
for a rename.
Noted by Dmitry Sivachenko in private mail.

Revision 1.177.2.4 / (download) - annotate - [select for diffs], Thu Sep 18 18:24:59 2008 UTC (6 years, 1 month ago) by bouyer
Branch: netbsd-4
Changes since 1.177.2.3: +22 -11 lines
Diff to previous 1.177.2.3 (colored) to branchpoint 1.177 (colored) next main 1.178 (colored)

Pull up following revision(s) (requested by lukem in ticket #1202):
	libexec/ftpd/ftpd.c: revision 1.187
	libexec/ftpd/extern.h: revision 1.58
	libexec/ftpd/version.h: patch
	libexec/ftpd/ftpcmd.y: revision 1.88
Don't split large commands into multiple commands; just fail on them.
This prevents CSRF-like attacks, when a web browser is used to access
an ftp server.
Reported by Maksymilian Arciemowicz <cxib@securityreason.com>.
Fix mostly derived from OpenBSD, written by Moritz Jodeit <moritz@OpenBSD.o=
rg>

Revision 1.177.6.4 / (download) - annotate - [select for diffs], Thu Sep 18 18:24:39 2008 UTC (6 years, 1 month ago) by bouyer
Branch: netbsd-4-0
CVS Tags: netbsd-4-0-1-RELEASE
Changes since 1.177.6.3: +22 -11 lines
Diff to previous 1.177.6.3 (colored) to branchpoint 1.177 (colored) next main 1.178 (colored)

Pull up following revision(s) (requested by lukem in ticket #1202):
	libexec/ftpd/ftpd.c: revision 1.187
	libexec/ftpd/extern.h: revision 1.58
	libexec/ftpd/version.h: patch
	libexec/ftpd/ftpcmd.y: revision 1.88
Don't split large commands into multiple commands; just fail on them.
This prevents CSRF-like attacks, when a web browser is used to access
an ftp server.
Reported by Maksymilian Arciemowicz <cxib@securityreason.com>.
Fix mostly derived from OpenBSD, written by Moritz Jodeit <moritz@OpenBSD.o=
rg>

Revision 1.177.2.3 / (download) - annotate - [select for diffs], Thu Sep 18 18:18:32 2008 UTC (6 years, 1 month ago) by bouyer
Branch: netbsd-4
Changes since 1.177.2.2: +119 -33 lines
Diff to previous 1.177.2.2 (colored) to branchpoint 1.177 (colored)

Pull up following revision(s) (requested by lukem in ticket #1201):
	libexec/ftpd/ftpd.c: revision 1.183
	libexec/ftpd/Makefile: revision 1.58
	libexec/ftpd/version.h: revision 1.66
Reorganize USE_PAM support so that the reply(331,) from USER is
performed by the pam_conv (PAM conversation) callback, which then
getline()s the PASS reply internally.  This involves calling
auth_pam() from user() and caching the result to use later in pass().
This allows the PAM modules to present a different password prompt
dialog if necesary.  For example:
  Name (localhost:lukem):
  331 User lukem accepted, provide password [ otp-md4 89 xxxx12345 ].
versus
  Name (localhost:lukem): root
  331 User root accepted, provide password.
This is independent of (and effectively exclusive to) USE_SKEY support.
Previously ftpd with USE_SKEY=yes would provide the skey prompt
if the user had an skey configured, even if /etc/pam.d/ftpd didn't
have pam_skey in use.
I.e., ftpd shouldn't need special support for custom password prompts
(such as skey) if PAM is in use.

Revision 1.177.6.3 / (download) - annotate - [select for diffs], Thu Sep 18 18:17:00 2008 UTC (6 years, 1 month ago) by bouyer
Branch: netbsd-4-0
Changes since 1.177.6.2: +119 -33 lines
Diff to previous 1.177.6.2 (colored) to branchpoint 1.177 (colored)

Pull up following revision(s) (requested by lukem in ticket #1201):
	libexec/ftpd/ftpd.c: revision 1.183
	libexec/ftpd/Makefile: revision 1.58
	libexec/ftpd/version.h: revision 1.66
Reorganize USE_PAM support so that the reply(331,) from USER is
performed by the pam_conv (PAM conversation) callback, which then
getline()s the PASS reply internally.  This involves calling
auth_pam() from user() and caching the result to use later in pass().
This allows the PAM modules to present a different password prompt
dialog if necesary.  For example:
  Name (localhost:lukem):
  331 User lukem accepted, provide password [ otp-md4 89 xxxx12345 ].
versus
  Name (localhost:lukem): root
  331 User root accepted, provide password.
This is independent of (and effectively exclusive to) USE_SKEY support.
Previously ftpd with USE_SKEY=yes would provide the skey prompt
if the user had an skey configured, even if /etc/pam.d/ftpd didn't
have pam_skey in use.
I.e., ftpd shouldn't need special support for custom password prompts
(such as skey) if PAM is in use.

Revision 1.177.6.2 / (download) - annotate - [select for diffs], Thu Sep 18 18:13:12 2008 UTC (6 years, 1 month ago) by bouyer
Branch: netbsd-4-0
Changes since 1.177.6.1: +4 -5 lines
Diff to previous 1.177.6.1 (colored) to branchpoint 1.177 (colored)

Pull up following revision(s) (requested by lukem in ticket #1200):
	libexec/ftpd/ftpd.c: revision 1.182
Rename cred_t to ftpd_cred_t; the former causes a nameclash on Solaris.

Revision 1.177.2.2 / (download) - annotate - [select for diffs], Thu Sep 18 18:12:57 2008 UTC (6 years, 1 month ago) by bouyer
Branch: netbsd-4
Changes since 1.177.2.1: +4 -5 lines
Diff to previous 1.177.2.1 (colored) to branchpoint 1.177 (colored)

Pull up following revision(s) (requested by lukem in ticket #1200):
	libexec/ftpd/ftpd.c: revision 1.182
Rename cred_t to ftpd_cred_t; the former causes a nameclash on Solaris.

Revision 1.177.2.1 / (download) - annotate - [select for diffs], Thu Sep 18 18:10:30 2008 UTC (6 years, 1 month ago) by bouyer
Branch: netbsd-4
Changes since 1.177: +13 -2 lines
Diff to previous 1.177 (colored)

Pull up following revision(s) (requested by lukem in ticket #1199):
	libexec/ftpd/ftpd.c: revision 1.179
PR/35449: Shigeya Suzuki: ftpd does not register socket address into PAM +FIX

Revision 1.177.6.1 / (download) - annotate - [select for diffs], Thu Sep 18 18:09:21 2008 UTC (6 years, 1 month ago) by bouyer
Branch: netbsd-4-0
Changes since 1.177: +13 -2 lines
Diff to previous 1.177 (colored)

Pull up following revision(s) (requested by lukem in ticket #1199):
	libexec/ftpd/ftpd.c: revision 1.179
PR/35449: Shigeya Suzuki: ftpd does not register socket address into PAM +FIX

Revision 1.184.2.2 / (download) - annotate - [select for diffs], Thu Sep 18 04:39:17 2008 UTC (6 years, 1 month ago) by wrstuden
Branch: wrstuden-revivesa
Changes since 1.184.2.1: +4 -5 lines
Diff to previous 1.184.2.1 (colored) to branchpoint 1.184 (colored)

Sync with wrstuden-revivesa-base-2.

Revision 1.188 / (download) - annotate - [select for diffs], Tue Sep 16 12:30:38 2008 UTC (6 years, 1 month ago) by lukem
Branch: MAIN
CVS Tags: wrstuden-revivesa-base-3, matt-mips64-base2
Changes since 1.187: +49 -11 lines
Diff to previous 1.187 (colored)

Enhance -C to support an optional @host ('-C user[@host]'):
checks whether user as connecting from host would be granted
access by ftpusers(5).

Support IPv6 in the host directive of ftpusers(5).
(May resolve PR 26555)

Both features from Rudolf Cejka <cejkar@fit.vutbr.cz>
(FreeBSD's tnftpd port maintainer).

Revision 1.187 / (download) - annotate - [select for diffs], Sat Sep 13 03:30:35 2008 UTC (6 years, 1 month ago) by lukem
Branch: MAIN
Changes since 1.186: +22 -11 lines
Diff to previous 1.186 (colored)

Don't split large commands into multiple commands; just fail on them.
This prevents CSRF-like attacks, when a web browser is used to access
an ftp server.
Reported by Maksymilian Arciemowicz <cxib@securityreason.com>.
Fix mostly derived from OpenBSD, written by Moritz Jodeit <moritz@OpenBSD.org>

Revision 1.186 / (download) - annotate - [select for diffs], Sun Jul 20 01:09:07 2008 UTC (6 years, 3 months ago) by lukem
Branch: MAIN
CVS Tags: wrstuden-revivesa-base-2
Changes since 1.185: +4 -5 lines
Diff to previous 1.185 (colored)

Remove the \n and tabs from the __COPYRIGHT() strings.

Revision 1.184.2.1 / (download) - annotate - [select for diffs], Mon Jun 23 04:29:54 2008 UTC (6 years, 4 months ago) by wrstuden
Branch: wrstuden-revivesa
Changes since 1.184: +25 -16 lines
Diff to previous 1.184 (colored)

Sync w/ -current. 34 merge conflicts to follow.

Revision 1.183.2.2 / (download) - annotate - [select for diffs], Tue Jun 17 09:13:39 2008 UTC (6 years, 4 months ago) by yamt
Branch: yamt-pf42
Changes since 1.183.2.1: +25 -16 lines
Diff to previous 1.183.2.1 (colored) to branchpoint 1.183 (colored) next main 1.184 (colored)

sync with head.

Revision 1.185 / (download) - annotate - [select for diffs], Mon Jun 9 00:33:39 2008 UTC (6 years, 4 months ago) by lukem
Branch: MAIN
CVS Tags: yamt-pf42-base4, wrstuden-revivesa-base-1, wrstuden-revivesa-base
Changes since 1.184: +25 -16 lines
Diff to previous 1.184 (colored)

Don't use non-standard "u_<foo>" types.
Strip trailing whitespace (as well as ':'s) off PAM password prompts.
Improve some debug logging related to PAM.

Revision 1.183.2.1 / (download) - annotate - [select for diffs], Sun May 18 12:30:43 2008 UTC (6 years, 5 months ago) by yamt
Branch: yamt-pf42
Changes since 1.183: +2 -9 lines
Diff to previous 1.183 (colored)

sync with head.

Revision 1.184 / (download) - annotate - [select for diffs], Mon Apr 28 20:23:03 2008 UTC (6 years, 5 months ago) by martin
Branch: MAIN
CVS Tags: yamt-pf42-base3, yamt-pf42-base2, hpcarm-cleanup-nbase
Branch point for: wrstuden-revivesa
Changes since 1.183: +2 -9 lines
Diff to previous 1.183 (colored)

Remove clause 3 and 4 from TNF licenses

Revision 1.183 / (download) - annotate - [select for diffs], Thu Mar 27 08:12:09 2008 UTC (6 years, 6 months ago) by lukem
Branch: MAIN
CVS Tags: yamt-pf42-baseX, yamt-pf42-base
Branch point for: yamt-pf42
Changes since 1.182: +119 -33 lines
Diff to previous 1.182 (colored)

Reorganize USE_PAM support so that the reply(331,) from USER is
performed by the pam_conv (PAM conversation) callback, which then
getline()s the PASS reply internally.  This involves calling
auth_pam() from user() and caching the result to use later in pass().
This allows the PAM modules to present a different password prompt
dialog if necesary.  For example:
  Name (localhost:lukem):
  331 User lukem accepted, provide password [ otp-md4 89 xxxx12345 ].
versus
  Name (localhost:lukem): root
  331 User root accepted, provide password.

This is independent of (and effectively exclusive to) USE_SKEY support.

Previously ftpd with USE_SKEY=yes would provide the skey prompt
if the user had an skey configured, even if /etc/pam.d/ftpd didn't
have pam_skey in use.
I.e., ftpd shouldn't need special support for custom password prompts
(such as skey) if PAM is in use.

Revision 1.182.10.2 / (download) - annotate - [select for diffs], Mon Jul 23 10:41:06 2007 UTC (7 years, 3 months ago) by lukem
Branch: matt-mips64
Changes since 1.182.10.1: +3817 -0 lines
Diff to previous 1.182.10.1 (colored) to branchpoint 1.182 (colored) next main 1.183 (colored)

Rename cred_t to ftpd_cred_t; the former causes a nameclash on Solaris.

Revision 1.182.10.1, Mon Jul 23 10:41:05 2007 UTC (7 years, 3 months ago) by lukem
Branch: matt-mips64
Changes since 1.182: +0 -3817 lines
FILE REMOVED

file ftpd.c was added on branch matt-mips64 on 2007-07-23 10:41:06 +0000

Revision 1.182 / (download) - annotate - [select for diffs], Mon Jul 23 10:41:05 2007 UTC (7 years, 3 months ago) by lukem
Branch: MAIN
CVS Tags: matt-mips64-base, matt-armv6-prevmlocking, matt-armv6-nbase, matt-armv6-base, matt-armv6, keiichi-mipv6-base, keiichi-mipv6, hpcarm-cleanup-base, hpcarm-cleanup, cube-autoconf-base, cube-autoconf
Branch point for: matt-mips64
Changes since 1.181: +6 -7 lines
Diff to previous 1.181 (colored)

Rename cred_t to ftpd_cred_t; the former causes a nameclash on Solaris.

Revision 1.181 / (download) - annotate - [select for diffs], Sun Jul 22 05:06:45 2007 UTC (7 years, 3 months ago) by lukem
Branch: MAIN
Changes since 1.180: +8 -8 lines
Diff to previous 1.180 (colored)

Rename HAVE_SOCKADDR_SA_LEN to HAVE_STRUCT_SOCKADDR_SA_LEN.
Use defined(HAVE_foo) instead of just testing HAVE_foo.

Revision 1.180 / (download) - annotate - [select for diffs], Sun Jun 10 20:24:31 2007 UTC (7 years, 4 months ago) by christos
Branch: MAIN
Changes since 1.179: +13 -6 lines
Diff to previous 1.179 (colored)

PR/36468: Andreas Wrede: ftpd(8) always logs hostnames. Add -n option to display
addresses.

Revision 1.179 / (download) - annotate - [select for diffs], Sat Jan 20 17:26:32 2007 UTC (7 years, 9 months ago) by christos
Branch: MAIN
Changes since 1.178: +13 -2 lines
Diff to previous 1.178 (colored)

PR/35449: Shigeya Suzuki: ftpd does not register socket address into PAM +FIX

Revision 1.178 / (download) - annotate - [select for diffs], Sun Dec 17 20:04:09 2006 UTC (7 years, 10 months ago) by christos
Branch: MAIN
Changes since 1.177: +21 -23 lines
Diff to previous 1.177 (colored)

fix volatile and initialization issues, from Anon Ymous

Revision 1.177 / (download) - annotate - [select for diffs], Tue Sep 26 06:47:20 2006 UTC (8 years ago) by lukem
Branch: MAIN
CVS Tags: wrstuden-fixsa-newbase, wrstuden-fixsa-base-1, wrstuden-fixsa-base, wrstuden-fixsa, netbsd-4-base, netbsd-4-0-RELEASE, netbsd-4-0-RC5, netbsd-4-0-RC4, netbsd-4-0-RC3, netbsd-4-0-RC2, netbsd-4-0-RC1
Branch point for: netbsd-4-0, netbsd-4
Changes since 1.176: +4 -2 lines
Diff to previous 1.176 (colored)

Fix -ULOGIN_CAP compile.

Revision 1.176 / (download) - annotate - [select for diffs], Tue May 9 20:18:06 2006 UTC (8 years, 5 months ago) by mrg
Branch: MAIN
CVS Tags: abandoned-netbsd-4-base, abandoned-netbsd-4
Changes since 1.175: +8 -6 lines
Diff to previous 1.175 (colored)

change (mostly) int to socklen_t.  GCC 4 doesn't like that int and
socklen_t are different signness.

Revision 1.175 / (download) - annotate - [select for diffs], Fri Mar 17 21:28:21 2006 UTC (8 years, 7 months ago) by peter
Branch: MAIN
Changes since 1.174: +2 -4 lines
Diff to previous 1.174 (colored)

Remove unreachable code (res could never be NULL here).

Fixes Coverity CID 712.
Ok by lukem@.

Revision 1.174 / (download) - annotate - [select for diffs], Fri Mar 17 21:26:55 2006 UTC (8 years, 7 months ago) by peter
Branch: MAIN
Changes since 1.173: +3 -2 lines
Diff to previous 1.173 (colored)

Set file to NULL after calling fclose().

Fixes Coverity CID 2669.
Ok by lukem@.

Revision 1.173 / (download) - annotate - [select for diffs], Fri Mar 17 21:24:33 2006 UTC (8 years, 7 months ago) by peter
Branch: MAIN
Changes since 1.172: +4 -3 lines
Diff to previous 1.172 (colored)

Make sure that "su" is initialized before dereferencing it.

Fixes Coverity CID 1075.
Ok by lukem@.

Revision 1.172 / (download) - annotate - [select for diffs], Sat Feb 25 02:28:55 2006 UTC (8 years, 8 months ago) by wiz
Branch: MAIN
Changes since 1.171: +3 -3 lines
Diff to previous 1.171 (colored)

Fix some typos.

Revision 1.171 / (download) - annotate - [select for diffs], Wed Feb 1 14:20:14 2006 UTC (8 years, 8 months ago) by christos
Branch: MAIN
Changes since 1.170: +23 -23 lines
Diff to previous 1.170 (colored)

debug -> ftpd_debug
xstrdup -> ftpd_strdup

Revision 1.170 / (download) - annotate - [select for diffs], Thu Nov 24 23:47:23 2005 UTC (8 years, 11 months ago) by lukem
Branch: MAIN
Changes since 1.169: +7 -7 lines
Diff to previous 1.169 (colored)

NLST should return 450 instead of 550 upon error, per RFC 959.

Revision 1.169 / (download) - annotate - [select for diffs], Mon Oct 3 00:02:25 2005 UTC (9 years ago) by lukem
Branch: MAIN
Changes since 1.168: +6 -5 lines
Diff to previous 1.168 (colored)

logxfer(): don't use the same buffer to store the results of two separate
concurrent realpath(3)s, otherwise we'll log the wrong information
for a rename.
Noted by Dmitry Sivachenko in private mail.

Revision 1.168 / (download) - annotate - [select for diffs], Wed Aug 24 15:51:41 2005 UTC (9 years, 2 months ago) by ginsbach
Branch: MAIN
Changes since 1.167: +33 -6 lines
Diff to previous 1.167 (colored)

* Add recvbufsize configuration option
  This allows for setting the passive socket's SO_RCVBUF.  Option works
  similarly to the current sendbufsize configuration option.
* Change how recveive_data() works
  When reading data from the socket for passive transfers to the server,
  receive_data() now works very similar to send_data_with_read().  Reads
  from the network are now done using either the filesystem block size or
  the configuration option readsize chunks.
* Crank version.h
  [Changes discussed with lukem.]

Revision 1.167 / (download) - annotate - [select for diffs], Thu Aug 4 17:41:35 2005 UTC (9 years, 2 months ago) by peter
Branch: MAIN
Changes since 1.166: +122 -4 lines
Diff to previous 1.166 (colored)

Implement option "-D", for running ftpd in standalone mode (daemon).
ftpd will listen on the default FTP port for incoming connections and fork
a child for each connection.  This is lower overhead than starting ftpd from
inetd(8) and thus might be useful on busy servers to reduce load.

Inspired by FreeBSD.
Reviewed by lukem@.

Revision 1.164.2.1 / (download) - annotate - [select for diffs], Tue Jul 5 21:48:49 2005 UTC (9 years, 3 months ago) by tron
Branch: netbsd-3
CVS Tags: netbsd-3-1-RELEASE, netbsd-3-1-RC4, netbsd-3-1-RC3, netbsd-3-1-RC2, netbsd-3-1-RC1, netbsd-3-1-1-RELEASE, netbsd-3-0-RELEASE, netbsd-3-0-RC6, netbsd-3-0-RC5, netbsd-3-0-RC4, netbsd-3-0-RC3, netbsd-3-0-RC2, netbsd-3-0-RC1, netbsd-3-0-3-RELEASE, netbsd-3-0-2-RELEASE, netbsd-3-0-1-RELEASE
Branch point for: netbsd-3-1, netbsd-3-0
Changes since 1.164: +3 -3 lines
Diff to previous 1.164 (colored)

Pull up revision 1.165 (requested by lukem in ticket #538):
s/getpwnam/sgetpwnam/ Found by John Nemeth.

Revision 1.166 / (download) - annotate - [select for diffs], Thu Jun 23 04:20:41 2005 UTC (9 years, 4 months ago) by christos
Branch: MAIN
Changes since 1.165: +20 -12 lines
Diff to previous 1.165 (colored)

cleanup utmp and utmpx support.
	- make them symmetric
	- add a function to open the wtmp file explicitly very early in the game

Revision 1.165 / (download) - annotate - [select for diffs], Sun Apr 10 08:21:36 2005 UTC (9 years, 6 months ago) by christos
Branch: MAIN
Changes since 1.164: +3 -3 lines
Diff to previous 1.164 (colored)

s/getpwnam/sgetpwnam/ Found by John Nemeth.

Revision 1.164 / (download) - annotate - [select for diffs], Sun Feb 20 01:45:17 2005 UTC (9 years, 8 months ago) by christos
Branch: MAIN
CVS Tags: netbsd-3-base
Branch point for: netbsd-3
Changes since 1.163: +270 -4 lines
Diff to previous 1.163 (colored)

Add PAM and LOGIN_CAP support. Mostly from FreeBSD. If pam is defined,
then we don't fall back to other authentications even if PAM fails due
to a system error (e.g. configuration problem).

Revision 1.163 / (download) - annotate - [select for diffs], Sat Dec 11 18:37:26 2004 UTC (9 years, 10 months ago) by christos
Branch: MAIN
Changes since 1.162: +9 -9 lines
Diff to previous 1.162 (colored)

change _PATH_FOO to _NAME_FOO where FOO is not a path. I'll discuss with
luke what is the best way to fix this.

Revision 1.162 / (download) - annotate - [select for diffs], Thu Dec 9 20:58:39 2004 UTC (9 years, 10 months ago) by ginsbach
Branch: MAIN
Changes since 1.161: +3 -3 lines
Diff to previous 1.161 (colored)

Fix inverted test for expired passwords.  Mea culpa.

Revision 1.161 / (download) - annotate - [select for diffs], Fri Nov 19 16:03:58 2004 UTC (9 years, 11 months ago) by ginsbach
Branch: MAIN
Changes since 1.160: +7 -5 lines
Diff to previous 1.160 (colored)

* Don't allow accounts with age expired passwords to login.  Any account
  that is required to change their password will not be allowed FTP
  access.  Inspired by similar functionality in other FTP daemons.
  (approved by lukem)

* Crank version to 20041119 per lukem's request.

Revision 1.160 / (download) - annotate - [select for diffs], Thu Nov 11 01:14:10 2004 UTC (9 years, 11 months ago) by christos
Branch: MAIN
Changes since 1.159: +11 -7 lines
Diff to previous 1.159 (colored)

Don't write trash in ut_ss; either initialize it to 0, or put in the proper
information.

Revision 1.159 / (download) - annotate - [select for diffs], Fri Nov 5 21:45:36 2004 UTC (9 years, 11 months ago) by dsl
Branch: MAIN
Changes since 1.158: +4 -4 lines
Diff to previous 1.158 (colored)

Add (unsigned char) cast to ctype functions

Revision 1.138.2.3 / (download) - annotate - [select for diffs], Tue Aug 31 01:35:38 2004 UTC (10 years, 1 month ago) by jmc
Branch: netbsd-1-6
Changes since 1.138.2.2: +583 -207 lines
Diff to previous 1.138.2.2 (colored) to branchpoint 1.138 (colored) next main 1.139 (colored)

Pullup rev 1.139-1.158 (requested by he in ticket #1739)

Update to NetBSD ftpd 20040809.  Fixes SA#2004-009.

Revision 1.95.2.6 / (download) - annotate - [select for diffs], Thu Aug 26 05:00:19 2004 UTC (10 years, 2 months ago) by jmc
Branch: netbsd-1-5
Changes since 1.95.2.5: +778 -347 lines
Diff to previous 1.95.2.5 (colored) to branchpoint 1.95 (colored) next main 1.96 (colored)

Pullup rev 1.123-1.158 (requested by he in ticket #158)

Update to NetBSD ftpd 20040809.  Fixes SA#2004-009.

Revision 1.157.2.1 / (download) - annotate - [select for diffs], Thu Aug 12 20:44:30 2004 UTC (10 years, 2 months ago) by jmc
Branch: netbsd-2-0
CVS Tags: netbsd-2-base, netbsd-2-1-RELEASE, netbsd-2-1-RC6, netbsd-2-1-RC5, netbsd-2-1-RC4, netbsd-2-1-RC3, netbsd-2-1-RC2, netbsd-2-1-RC1, netbsd-2-1, netbsd-2-0-RELEASE, netbsd-2-0-RC5, netbsd-2-0-RC4, netbsd-2-0-RC3, netbsd-2-0-RC2, netbsd-2-0-RC1, netbsd-2-0-3-RELEASE, netbsd-2-0-2-RELEASE, netbsd-2-0-1-RELEASE, netbsd-2
Changes since 1.157: +143 -52 lines
Diff to previous 1.157 (colored) next main 1.158 (colored)

Pullup rev 1.158 (requested by lukem in ticket #757)

* Fix yacc parser error recovery so that setjmp(3)/longjmp(3) is unnecessary.
* Fix SIGURG handler to set an urgflag that's later tested, rather than
  abusing setjmp(3)/longjmp(3).
* Use "volatile sig_atomic_t" as the type of variables modified by sig handlers.
* Use sigaction(3) instead of signal(3) to set the signal handlers.
* Only set the main SIGALRM handler once.  If we need to change it,
  cache the old handler and restore appropriately...
* Remove a bunch of signal races by improving the signal handlers.
* Fix memory leak with 'ESPV ALL'.
* Clean up the debug message in reply(); use vsnprintf(3) instead of vsyslog(3).
* Rework parsing of OOB commands to _not_ use the yacc parser, since the
  latter isn't reentrant and the hacks to work around that are ugly.
  We now examine urgflag at appropriate locations and call handleoobcmd()
  if it's set.  Since the only OOB commands we currently implement are
  ABOR and STAT, this isn't an issue.

Revision 1.158 / (download) - annotate - [select for diffs], Mon Aug 9 12:56:47 2004 UTC (10 years, 2 months ago) by lukem
Branch: MAIN
Changes since 1.157: +143 -52 lines
Diff to previous 1.157 (colored)

Fixes from (or inspired by) OpenBSD:
* Fix yacc parser error recovery so that setjmp(3)/longjmp(3) is unnecessary.
* Fix SIGURG handler to set an urgflag that's later tested, rather than
  abusing setjmp(3)/longjmp(3).
* Use "volatile sig_atomic_t" as the type of variables modified by sig handlers.
* Use sigaction(3) instead of signal(3) to set the signal handlers.
* Only set the main SIGALRM handler once.  If we need to change it,
  cache the old handler and restore appropriately...
* Remove a bunch of signal races by improving the signal handlers.
* Fix memory leak with 'ESPV ALL'.

My stuff:
* Clean up the debug message in reply(); use vsnprintf(3) instead of vsyslog(3).
* Rework parsing of OOB commands to _not_ use the yacc parser, since the
  latter isn't reentrant and the hacks to work around that are ugly.
  We now examine urgflag at appropriate locations and call handleoobcmd()
  if it's set.  Since the only OOB commands we currently implement are
  ABOR and STAT, this isn't an issue.  (I also can't find the reference in
  RFC2228 where MIC, CONF & ENC are OOB-only commands.  Go figure.)
  I could clean up the is_oob stuff some more, but the remaining stuff
  in ftpcmd.y is harmless and it's unnecessary churn right this moment.

Revision 1.138.2.2 / (download) - annotate - [select for diffs], Fri Jul 23 15:03:57 2004 UTC (10 years, 3 months ago) by tron
Branch: netbsd-1-6
Changes since 1.138.2.1: +7 -7 lines
Diff to previous 1.138.2.1 (colored) to branchpoint 1.138 (colored)

Apply patch (requested by dbj in ticket 1724):
Fix problems when building the netbsd-1-6 branch with GCC 3.3.3.

Revision 1.157 / (download) - annotate - [select for diffs], Wed Dec 10 01:18:56 2003 UTC (10 years, 10 months ago) by lukem
Branch: MAIN
CVS Tags: netbsd-2-0-base
Branch point for: netbsd-2-0
Changes since 1.156: +23 -4 lines
Diff to previous 1.156 (colored)

Use sysconf(_SC_LOGIN_NAME_MAX) to determine the length of login
names, rather than assuming LOGIN_NAME_MAX.
Based on patch from Garrett Wollman via David O'Brien (both at FreeBSD.org)

Revision 1.156 / (download) - annotate - [select for diffs], Thu Aug 7 09:46:39 2003 UTC (11 years, 2 months ago) by agc
Branch: MAIN
Changes since 1.155: +3 -7 lines
Diff to previous 1.155 (colored)

Move UCB-licensed code from 4-clause to 3-clause licence.

Patches provided by Joel Baker in PR 22284, verified by myself.

Revision 1.155 / (download) - annotate - [select for diffs], Mon Jun 30 03:06:06 2003 UTC (11 years, 3 months ago) by tacha
Branch: MAIN
Changes since 1.154: +5 -5 lines
Diff to previous 1.154 (colored)

Add ftpd_loginx() and ftpd_logwtmpx() and use them to hold wtmpx file
open while a session.

Close bin/21692 by bqt@Krille.Update.UU.SE.

Revision 1.154 / (download) - annotate - [select for diffs], Wed Feb 26 12:27:04 2003 UTC (11 years, 7 months ago) by lukem
Branch: MAIN
Changes since 1.153: +36 -16 lines
Diff to previous 1.153 (colored)

Add '-L xferlogfile', to write xferlog entries there rather than syslog them.
Based on work from Dmitry Sivachenko.

Revision 1.153 / (download) - annotate - [select for diffs], Mon Feb 24 19:26:49 2003 UTC (11 years, 8 months ago) by erh
Branch: MAIN
Changes since 1.152: +4 -3 lines
Diff to previous 1.152 (colored)

Fix uninitialized variable "notglob" in send_file_list() that was causing
transfers to fail due to an abort in free().

Revision 1.152 / (download) - annotate - [select for diffs], Sun Feb 23 13:04:37 2003 UTC (11 years, 8 months ago) by lukem
Branch: MAIN
Changes since 1.151: +6 -7 lines
Diff to previous 1.151 (colored)

rename local copies of login(), logout() and logwtmp() to
ftpd_login(), ftpd_logout() and ftpd_logwtmp() respectively.
(makes utmp support much easier in tnftpd).

per suggestion in mail from Mike Heffner <mheffner@vt.edu>, who
forwarded patch from Michael Ranner <mranner@inode.at>.

Revision 1.151 / (download) - annotate - [select for diffs], Wed Feb 19 18:26:48 2003 UTC (11 years, 8 months ago) by dsl
Branch: MAIN
Changes since 1.150: +8 -3 lines
Diff to previous 1.150 (colored)

Stop ftpd changing inetd's 'logname'
Stop buffer overrun if {NGROUPS_MAX} is greater than the compile time
NGROUPS_MAX.
(approved by christos)

Revision 1.150 / (download) - annotate - [select for diffs], Wed Jan 22 04:46:08 2003 UTC (11 years, 9 months ago) by lukem
Branch: MAIN
Changes since 1.149: +31 -23 lines
Diff to previous 1.149 (colored)

Apply DoS fix as described by Crist J. Clark <crist.clark@attbi.com>
on <security@freebsd.org>, and subsequently in FreeBSD's cvs repository
as libexec/ftpd/ftpd.c rev 1.133:

	The FTP daemon was vulnerable to a DoS where an attacker could bind()
	up port 20 for an extended period of time and thus lock out all other
	users from establishing PORT data connections. Don't hold on to the
	bind() while we loop around waiting to see if we can make our
	connection.

Bump version to 20030122.

Revision 1.149 / (download) - annotate - [select for diffs], Wed Jan 22 04:33:35 2003 UTC (11 years, 9 months ago) by lukem
Branch: MAIN
Changes since 1.148: +3 -4 lines
Diff to previous 1.148 (colored)

Fixes from Dmitry Sivachenko <demon@freebsd.org>:
- always set "curname" to something appropriate (even when logging is
  not in effect).
- fix usage for "PORT" command

Revision 1.148 / (download) - annotate - [select for diffs], Fri Dec 6 01:59:22 2002 UTC (11 years, 10 months ago) by thorpej
Branch: MAIN
CVS Tags: fvdl_fs64_base
Changes since 1.147: +7 -7 lines
Diff to previous 1.147 (colored)

Avoid conflict with reserved identifier "log".

Revision 1.147 / (download) - annotate - [select for diffs], Fri Nov 29 14:40:00 2002 UTC (11 years, 10 months ago) by lukem
Branch: MAIN
Changes since 1.146: +40 -15 lines
Diff to previous 1.146 (colored)

- convert to using libc's strsuftoll(3)
- use LLT (aka 'long long type') for all numeric class parameters
- improve description of various ftpd.conf(5) options
- statcmd(): print out:  mmapsize readsize writesize sendbufsize sendlowat

Revision 1.146 / (download) - annotate - [select for diffs], Sat Nov 16 03:10:34 2002 UTC (11 years, 11 months ago) by itojun
Branch: MAIN
Changes since 1.145: +14 -7 lines
Diff to previous 1.145 (colored)

audit use of strto* - beware of ERANGE, as well as typecast on result.

Revision 1.145 / (download) - annotate - [select for diffs], Mon Oct 7 13:29:59 2002 UTC (12 years ago) by lukem
Branch: MAIN
Changes since 1.144: +5 -4 lines
Diff to previous 1.144 (colored)

Change arguments of login_utmp(line, name, host) (to be consistent
with logwtmp(3)/logwtmpx(3)), and call correctly.
Resolves [bin/18498] by Geoff Wing, who identified that the previous
version was being called incorrectly, albiet in a different manner.

Revision 1.138.2.1 / (download) - annotate - [select for diffs], Mon Sep 30 13:07:15 2002 UTC (12 years ago) by lukem
Branch: netbsd-1-6
CVS Tags: netbsd-1-6-PATCH002-RELEASE, netbsd-1-6-PATCH002-RC4, netbsd-1-6-PATCH002-RC3, netbsd-1-6-PATCH002-RC2, netbsd-1-6-PATCH002-RC1, netbsd-1-6-PATCH002, netbsd-1-6-PATCH001-RELEASE, netbsd-1-6-PATCH001-RC3, netbsd-1-6-PATCH001-RC2, netbsd-1-6-PATCH001-RC1, netbsd-1-6-PATCH001
Changes since 1.138: +3 -3 lines
Diff to previous 1.138 (colored)

Pull up revision 1.142 (requested by lukem in ticket #843):
Use LOGIN_NAME_MAX instead of `10' for the size of the curname[] buffer.
Allows /etc/ftpchroot to work correctly for usernames > 9 characters.
Noted by Max Khon in the freebsd-stable mailing list, via Thomas Vogt in
private email.

Revision 1.144 / (download) - annotate - [select for diffs], Fri Sep 13 02:58:54 2002 UTC (12 years, 1 month ago) by itojun
Branch: MAIN
Changes since 1.143: +8 -8 lines
Diff to previous 1.143 (colored)

revert previous.  wtmp{,x} entries need not be \0-terminated, so
strncpy is more proper.

Revision 1.143 / (download) - annotate - [select for diffs], Thu Sep 12 08:55:31 2002 UTC (12 years, 1 month ago) by itojun
Branch: MAIN
Changes since 1.142: +8 -8 lines
Diff to previous 1.142 (colored)

use strl*, not strn*.

Revision 1.142 / (download) - annotate - [select for diffs], Thu Sep 12 06:40:43 2002 UTC (12 years, 1 month ago) by lukem
Branch: MAIN
Changes since 1.141: +3 -3 lines
Diff to previous 1.141 (colored)

Use LOGIN_NAME_MAX instead of `10' for the size of the curname[] buffer.
Allows /etc/ftpchroot to work correctly for usernames > 9 characters.

Noted by Max Khon in the freebsd-stable mailing list, via Thomas Vogt in
private email.

Revision 1.141 / (download) - annotate - [select for diffs], Tue Aug 20 13:55:58 2002 UTC (12 years, 2 months ago) by christos
Branch: MAIN
Changes since 1.140: +14 -3 lines
Diff to previous 1.140 (colored)

Disable UTMPX support for now, because ftpd might chroot and we need
to keep files open.

Revision 1.140 / (download) - annotate - [select for diffs], Tue Aug 20 13:51:09 2002 UTC (12 years, 2 months ago) by christos
Branch: MAIN
Changes since 1.139: +69 -28 lines
Diff to previous 1.139 (colored)

utmpx support

Revision 1.139 / (download) - annotate - [select for diffs], Thu May 30 00:24:47 2002 UTC (12 years, 4 months ago) by enami
Branch: MAIN
Changes since 1.138: +221 -68 lines
Diff to previous 1.138 (colored)

Add optional mmap(2)/write(2) support for binary file transfer.
The default is read(2)/write(2).  Note that the sosend_loan needs
some more work for better performance when a file isn't cached.

Revision 1.138 / (download) - annotate - [select for diffs], Mon Feb 11 11:45:07 2002 UTC (12 years, 8 months ago) by lukem
Branch: MAIN
CVS Tags: netbsd-1-6-base, netbsd-1-6-RELEASE, netbsd-1-6-RC3, netbsd-1-6-RC2, netbsd-1-6-RC1
Branch point for: netbsd-1-6
Changes since 1.137: +19 -9 lines
Diff to previous 1.137 (colored)

Don't log an xferlog-style entry if bytes == -1.
Per suggestion by Kimmo Suominen and observation of wu-ftpd in similar
circumstances.

Revision 1.137 / (download) - annotate - [select for diffs], Fri Feb 1 04:35:31 2002 UTC (12 years, 8 months ago) by lukem
Branch: MAIN
Changes since 1.136: +5 -8 lines
Diff to previous 1.136 (colored)

fix previous, and ensure that closedataconn() is only called after dataconn()
and with a non-NULL file pointer.  active transfers now work correctly again,
passive transfers work, and the data stream is only closed after a PASV or
EPSV if a successful connection was initiated with dataconn().

Revision 1.136 / (download) - annotate - [select for diffs], Mon Jan 21 11:25:20 2002 UTC (12 years, 9 months ago) by lukem
Branch: MAIN
Changes since 1.135: +5 -4 lines
Diff to previous 1.135 (colored)

in closedataconn(), only close the passive data fd if the main data
descriptor was set by dataconn().  this fixes a problem for clients (such
as lynx and netscape) that only sent PASV/EPSV after a transfer (RETR, LIST,
STOR) started and returned 150.  certain command sequences could return 550
(etc) before setting up the dataconn(), and would run into this bug. netbsd's
ftp didn't hit this bug because it always sends PASV/EPSV before a new
transfer command.

Revision 1.135 / (download) - annotate - [select for diffs], Wed Dec 12 08:13:33 2001 UTC (12 years, 10 months ago) by lukem
Branch: MAIN
Changes since 1.134: +3 -3 lines
Diff to previous 1.134 (colored)

remove extraneous ": " from message

Revision 1.134 / (download) - annotate - [select for diffs], Thu Dec 6 02:00:06 2001 UTC (12 years, 10 months ago) by lukem
Branch: MAIN
Changes since 1.133: +3 -3 lines
Diff to previous 1.133 (colored)

Fix skey password challenge.  Problem reported in [bin/14848] by John F. Woods.

Revision 1.133 / (download) - annotate - [select for diffs], Tue Dec 4 13:54:12 2001 UTC (12 years, 10 months ago) by lukem
Branch: MAIN
Changes since 1.132: +107 -72 lines
Diff to previous 1.132 (colored)

Add two new ftpd.conf(5) directives:
- 'denyquick'; deny a connection so tagged by ftpusers(5) after the USER
  command instead of the PASS command. whilst this might provide some
  info leakage of accounts names if you have some `real' or `chroot'
  users enabled and not others, it does prevent accidental entering of
  such passwords if you have all such users denied. This option is
  strongly recommended on anonymous-only servers.
  Functionality requested by Rob Windsor in [bin/12602]
- 'private'; don't display class related information in the output of STAT.
  For paranoid admins.

Revision 1.132 / (download) - annotate - [select for diffs], Sat Dec 1 10:25:30 2001 UTC (12 years, 10 months ago) by lukem
Branch: MAIN
Changes since 1.131: +36 -38 lines
Diff to previous 1.131 (colored)

- enable case insensitive fnmatch(3)ing for hostname globs in ftpusers(5)
- enable WARNS=2

Revision 1.131 / (download) - annotate - [select for diffs], Tue Nov 27 23:42:40 2001 UTC (12 years, 10 months ago) by lukem
Branch: MAIN
Changes since 1.130: +6 -5 lines
Diff to previous 1.130 (colored)

- Don't try and use the motd if it's empty.
  Problem reported in [bin/14751] by Kimmo Suominen
- Display conffilename() version of limitfile and motd in status output

Revision 1.130 / (download) - annotate - [select for diffs], Mon Sep 24 13:22:30 2001 UTC (13 years, 1 month ago) by wiz
Branch: MAIN
Changes since 1.129: +6 -2 lines
Diff to previous 1.129 (colored)

va_{start,end} audit:
Make sure that each va_start has one and only one matching va_end,
especially in error cases.
If the va_list is used multiple times, do multiple va_starts/va_ends.
If a function gets va_list as argument, don't let it use va_end (since
it's the callers responsibility).

Improved by comments from enami and christos -- thanks!

Heimdal/krb4/KAME changes already fed back, rest to follow.

Inspired by, but not not based on, OpenBSD.

Revision 1.129 / (download) - annotate - [select for diffs], Wed Sep 19 00:50:52 2001 UTC (13 years, 1 month ago) by lukem
Branch: MAIN
Changes since 1.128: +3 -5 lines
Diff to previous 1.128 (colored)

a few changes from Mike Heffner <mheffner@vt.edu> in private email:
- totally clear a glob buffer before use, because FreeBSD depends on
  some of the other fields being cleared (other than just gl_offs)
- in strend(), ensure that the source string isn't too large
- remove unnecessarily complicated sizing of proctitle, since snprintf()
  will truncate it anyway

Revision 1.128 / (download) - annotate - [select for diffs], Sun Jul 8 07:27:14 2001 UTC (13 years, 3 months ago) by lukem
Branch: MAIN
Changes since 1.127: +3 -3 lines
Diff to previous 1.127 (colored)

Alan Barrett informs me that "advertise" (instead of "advertize") is
the norm even in American English.

Revision 1.127 / (download) - annotate - [select for diffs], Tue Jun 26 19:30:45 2001 UTC (13 years, 4 months ago) by lukem
Branch: MAIN
Changes since 1.126: +3 -3 lines
Diff to previous 1.126 (colored)

s/tise/tize/ in docco, add "advertize" as synonym for "advertise"

Revision 1.126 / (download) - annotate - [select for diffs], Mon Jun 11 01:50:51 2001 UTC (13 years, 4 months ago) by wiz
Branch: MAIN
Changes since 1.125: +3 -3 lines
Diff to previous 1.125 (colored)

Fix various misspellings of compatible/compatibility.

Revision 1.125 / (download) - annotate - [select for diffs], Wed Apr 25 01:46:26 2001 UTC (13 years, 6 months ago) by lukem
Branch: MAIN
Changes since 1.124: +3 -5 lines
Diff to previous 1.124 (colored)

crank copyrights of files changed this year
remove superfluous byte_count update in send_file_list
crank version

Revision 1.124 / (download) - annotate - [select for diffs], Thu Apr 12 02:28:59 2001 UTC (13 years, 6 months ago) by lukem
Branch: MAIN
Changes since 1.123: +8 -4 lines
Diff to previous 1.123 (colored)

minor knf post aidan's oob rototill

Revision 1.123 / (download) - annotate - [select for diffs], Sun Apr 1 23:04:31 2001 UTC (13 years, 6 months ago) by aidan
Branch: MAIN
Changes since 1.122: +31 -22 lines
Diff to previous 1.122 (colored)

As threatened, handle OOB commands from within ftpcmd.y.
This involved changing the yacc syntax to be line-oriented, rather than
having it run against the entire input at once, and adding a flag to
struct tab, to indicate if or not it's acceptable for a command to occur
OOB.

Revision 1.61.2.5 / (download) - annotate - [select for diffs], Sun Apr 1 16:08:36 2001 UTC (13 years, 6 months ago) by he
Branch: netbsd-1-4
Changes since 1.61.2.4: +3 -3 lines
Diff to previous 1.61.2.4 (colored) to branchpoint 1.61 (colored) next main 1.62 (colored)

Pull up revision 1.122 (requested by christos):
  Fixes buffer overflow problems in glob(3).  Adds and uses GLOB_LIMIT
  to prevent denial of service attacks.

Revision 1.95.2.5 / (download) - annotate - [select for diffs], Thu Mar 29 14:14:18 2001 UTC (13 years, 6 months ago) by lukem
Branch: netbsd-1-5
CVS Tags: netbsd-1-5-PATCH003, netbsd-1-5-PATCH002, netbsd-1-5-PATCH001
Changes since 1.95.2.4: +632 -247 lines
Diff to previous 1.95.2.4 (colored) to branchpoint 1.95 (colored)

sync ftpd to -current with the following revisions (for lukem/christos):
	Makefile	1.43-1.44
	cmds.c		1.7-1.8,  1.10-1.12
	conf.c		1.35-1.40
	extern.h	1.32-1.38
	ftpcmd.y	1.53-1.59
	ftpd.8		1.58-1.63
	ftpd.c		1.102-1.104,  1.106-1.122
	ftpd.conf.5	1.12-1.15
	ftpusers.5	1.8
	logwtmp.c	1.16
	popen.c		1.23-1.25
	version.h	1.28

a quick summary of user-visible changes;
	- fix glob DoS by using GLOB_LIMIT
	- add ftpd.conf directives `advertise', `maxfilesize', `sanenames'
	- add flags: -P dataport, -X - wuftpd style log entries,
	  -q/-Q - (en|dis)able pidfiles, -u/-U - (en|dis)able utmp,
	  -w/-W - (en|dis)able wtmp

Revision 1.122 / (download) - annotate - [select for diffs], Fri Mar 16 20:42:13 2001 UTC (13 years, 7 months ago) by christos
Branch: MAIN
Changes since 1.121: +3 -3 lines
Diff to previous 1.121 (colored)

Use GLOB_LIMIT. Also fix a bug where gl_offs was not initialized and could
contain trash.

Revision 1.121 / (download) - annotate - [select for diffs], Sun Feb 4 22:04:12 2001 UTC (13 years, 8 months ago) by christos
Branch: MAIN
Changes since 1.120: +2 -3 lines
Diff to previous 1.120 (colored)

fix redundant declarations.

Revision 1.120 / (download) - annotate - [select for diffs], Tue Jan 16 02:50:29 2001 UTC (13 years, 9 months ago) by cgd
Branch: MAIN
Changes since 1.119: +3 -3 lines
Diff to previous 1.119 (colored)

comment or delete text after CPP directives.

Revision 1.119 / (download) - annotate - [select for diffs], Wed Jan 10 00:20:49 2001 UTC (13 years, 9 months ago) by lukem
Branch: MAIN
Changes since 1.118: +9 -9 lines
Diff to previous 1.118 (colored)

consistently use syslog priorities

Revision 1.118 / (download) - annotate - [select for diffs], Mon Dec 18 02:32:51 2000 UTC (13 years, 10 months ago) by lukem
Branch: MAIN
Changes since 1.117: +173 -62 lines
Diff to previous 1.117 (colored)

Features:

* Add ftpd.conf(5) directive `advertise'; change the address that is
  advertised to the client for PASV transfers. this may be useful in
  certain firewall/NAT environments.

  Feature requested in [bin/9606] by Scott Presnell.

* Add -X option; syslog wu-ftpd style xferlog messages, prefixed with
  `xferlog: '.  An example line from syslog (wrapped):
	Dec 16 18:50:24 odysseus ftpd[571]: xferlog: Sat Dec 16 18:50:24 2000
	2 localhost 3747328 /pub/WLW2K601.EXE b _ o a lukem@ FTP 0 * c

  These messages can be converted to a wu-ftpd style xferlog file
  suitable for parsing with third-party tools with something like:
	grep 'xferlog: ' /var/log/xferlog | \
	    sed -e 's/^.*xferlog: //' >wuxferlog

  The format is the same as the wu-ftpd xferlog entries (with the leading
  syslog stuff), but different from the wu-ftpd syslogged xferlog entries
  because the latter is not as easy to convert into the standard xferlog
  file format.

  The choice to only syslog the xferlog messages rather than append to
  a /var/log/xferlog file was made because the latter doesn't work to
  well in the situation where the logfile is rotated and compressed and
  a long-running ftpd still has a file-descriptor to the now nonexistant
  xferlog file, and the log message will then get lost.

  Feature requested in [bin/11651] by Hubert Feyrer.


Fixes:

* In ftpd(8), clarify the -a and -c options.

* More clarifications in ftpd.conf(5).

* Ensure that all ftpd.conf commands set a parameter back to sane defaults
  if an argument of `none' or bad settings are given.

* Support the `chroot' directive for `REAL' users too (for consistency).

* For `GUEST' users, store the supplied password in pw->pw_passwd for use
  later in the xferlog.

* If show_chdir_messages() is given a code of -1, flush the cache of
  visited directories.  Invoke show_chdir_messages(-1) in end_login().

* Only syslog session stats if logging is requested.

* Rename logcmd() -> logxfer(), and dolog() -> logremotehost().

* Use cprintf() instead of fprintf() where appropriate.

* Minor KNF, and make a couple of functions static that were declared static.

Revision 1.61.2.4 / (download) - annotate - [select for diffs], Thu Dec 14 22:33:47 2000 UTC (13 years, 10 months ago) by he
Branch: netbsd-1-4
Changes since 1.61.2.3: +16 -10 lines
Diff to previous 1.61.2.3 (colored) to branchpoint 1.61 (colored)

Apply patch (requested by bouyer):
  Fix a one-byte buffer overrun.
  Bump version to 7.1.0a.

Revision 1.117 / (download) - annotate - [select for diffs], Thu Nov 30 08:33:33 2000 UTC (13 years, 10 months ago) by lukem
Branch: MAIN
Changes since 1.116: +3 -3 lines
Diff to previous 1.116 (colored)

initialise confdir to _DEFAULT_CONFDIR again, so that -C works...

Revision 1.116 / (download) - annotate - [select for diffs], Thu Nov 30 06:06:08 2000 UTC (13 years, 10 months ago) by lukem
Branch: MAIN
Changes since 1.115: +30 -25 lines
Diff to previous 1.115 (colored)

- rename valid_passwd() -> checkpassword()
- move check for expired accounts from pass() into checkpassword()

Revision 1.115 / (download) - annotate - [select for diffs], Thu Nov 30 02:59:11 2000 UTC (13 years, 10 months ago) by lukem
Branch: MAIN
Changes since 1.114: +32 -10 lines
Diff to previous 1.114 (colored)

- move password checking into separate valid_passwd() function, to assist
  in porting to other systems.
- don't syslog() or setproctitle() "ACCT" lines (as per "PASS")
- replace #ifdef HASSETPROCTITLE with #if HAVE_SETPROCTITLE, and set the
  latter #ifdef BSD4_4
- don't compile in internal `ls' #ifdef NO_INTERNAL_LS. will need Makefile
  support if this is to be used on NetBSD.

Revision 1.114 / (download) - annotate - [select for diffs], Tue Nov 28 09:46:34 2000 UTC (13 years, 10 months ago) by lukem
Branch: MAIN
Changes since 1.113: +7 -7 lines
Diff to previous 1.113 (colored)

modify dolog() to take a struct sockinet * instead of struct sockaddr *

Revision 1.113 / (download) - annotate - [select for diffs], Tue Nov 28 09:31:29 2000 UTC (13 years, 10 months ago) by lukem
Branch: MAIN
Changes since 1.112: +6 -2 lines
Diff to previous 1.112 (colored)

- ensure all uses of AF_INET6 are wrapped in #ifdef INET6
- don't define `ALL' as a token twice in the grammar

Revision 1.112 / (download) - annotate - [select for diffs], Fri Nov 24 12:56:45 2000 UTC (13 years, 11 months ago) by itojun
Branch: MAIN
Changes since 1.111: +27 -19 lines
Diff to previous 1.111 (colored)

cope with 2292bis-01 getaddrinfo (no NI_WITHSCOPEID, always attach
scope identifier).
always check error result from getnameinfo.

Revision 1.111 / (download) - annotate - [select for diffs], Thu Nov 16 13:15:14 2000 UTC (13 years, 11 months ago) by lukem
Branch: MAIN
Changes since 1.110: +106 -34 lines
Diff to previous 1.110 (colored)

- new ftpd.conf directives:
	maxfilesize	set the maximum size of uploaded files
	sanenames	if set, only permit uploaded filenames that contain
			characters from the set "-+,._A-Za-z0-9" and that
			don't start with `.'

- new/changed command line options:
	-e emailaddr	define email address for %E (see below)
	-P dataport	use dataport as the dataport (instead of ctrlport-1)
	-q		use pid files to count users	[default]
	-Q		don't use pid files to count users
	-u		write entries to utmp
	-U		don't write entries to utmp	[default]
	-w		write entries to wtmp		[default]
	-W		don't write entries to wtmp

	  NOTE:	-U used to mean `write utmp entries'. Its meaning has changed
		so that it's orthogonal with -q/-Q and -w/-W. This isn't
		considered a major problem, because using -U isn't going to
		enable something you don't want, but will disable something
		you did want (which is safer).

- new display file escape sequences:
	%E	email address
	%s	literal `s' if the previous %M or %N wasn't ``1''.
	%S	literal `S' if the previous %M or %N wasn't ``1''.

- expand the description of building ~ftp/incoming to cover the
  appropriate ftpd.conf(5) directives (which are defaults, but it pays
  to explicitly explain them)

- replace strsuftoi() with strsuftoll(), which returns a long long if
  supported, otherwise a long

- rework the way that check_modify and check_upload are done in the yacc
  parser; they're merged into a common check_write() function which is
  called explicitly

- merge all ftpclass `flag variables' into a single bitfield-based flag element

- move various common bits of parse_conf() into a couple of macros

- clean up some comments

Revision 1.110 / (download) - annotate - [select for diffs], Wed Nov 15 04:07:07 2000 UTC (13 years, 11 months ago) by itojun
Branch: MAIN
Changes since 1.109: +4 -13 lines
Diff to previous 1.109 (colored)

we can assume presense of getaddrinfo.
use NI_MAXHOST for the hostname buffer used with getnameinfo.

Revision 1.109 / (download) - annotate - [select for diffs], Wed Nov 15 02:32:30 2000 UTC (13 years, 11 months ago) by lukem
Branch: MAIN
Changes since 1.108: +134 -176 lines
Diff to previous 1.108 (colored)

changes to improve portability:
* replace union sockunion {} with struct sockinet {}, and modify the code
  accordingly. this is possibly more portable, as it doesn't rely upon
  the structure alignment within the union for our own stuff.  uses local
  su_len unless HAVE_SOCKADDR_SA_LEN is defined (set ifdef BSD4_4)
  (XXX: haven't tested the ipv6 stuff)
* always use getaddrinfo() and getnameinfo() instead of maintaining two code
  paths. (lukemftpd will provide replacements for these on older systems)
* use lockf() instead of open(.., O_EXLOCK) to lock the pid file
* minor KNF
* clean up long long support: create helper #defines and use as appropriate:
        #define		NO_LONG_LONG	! NO_LONG_LONG
        -------		------------	--------------
        LLF		"%ld"		"%lld"
        LLFP(x)		"%" x "ld"	"%" x "lld"
        LLT		long		long long
        ULLF		"%lu"		"%llu"
        ULLFP(x)	"%" x "lu"	"%" x "llu"
        ULLT		unsigned long	unsigned long long
        STRTOLL(x,y,z)	strtol(x,y,z)	strtoll(x,y,z)

Revision 1.108 / (download) - annotate - [select for diffs], Mon Nov 13 15:11:57 2000 UTC (13 years, 11 months ago) by itojun
Branch: MAIN
Changes since 1.107: +3 -3 lines
Diff to previous 1.107 (colored)

correct result code on invalid port number against EPRT.

Revision 1.107 / (download) - annotate - [select for diffs], Mon Nov 13 11:52:41 2000 UTC (13 years, 11 months ago) by itojun
Branch: MAIN
Changes since 1.106: +10 -2 lines
Diff to previous 1.106 (colored)

plug memory leak

Revision 1.106 / (download) - annotate - [select for diffs], Mon Nov 13 11:50:46 2000 UTC (13 years, 11 months ago) by itojun
Branch: MAIN
Changes since 1.105: +163 -26 lines
Diff to previous 1.105 (colored)

- improve RFC2428 conformance.
  return 522 on unknown protocol identifier on EPRT.
- clarify EPSV/EPRT/LPSV/LPRT behavior.
- repair memory leak and lack of boundary check on EPRT.
- make sure we do not resolve DNS on EPRT.
sync with kame.

Revision 1.95.2.4 / (download) - annotate - [select for diffs], Thu Sep 28 18:37:42 2000 UTC (14 years ago) by jdolecek
Branch: netbsd-1-5
CVS Tags: netbsd-1-5-RELEASE, netbsd-1-5-BETA2, netbsd-1-5-BETA
Changes since 1.95.2.3: +3 -2 lines
Diff to previous 1.95.2.3 (colored) to branchpoint 1.95 (colored)

pullup rev. 1.105 from trunk (approved by thorpej):
call setlogin() before dropping root privileges, so that process
would have correct p_login value

Revision 1.105 / (download) - annotate - [select for diffs], Thu Sep 28 17:49:06 2000 UTC (14 years ago) by jdolecek
Branch: MAIN
Changes since 1.104: +3 -2 lines
Diff to previous 1.104 (colored)

call setlogin() before dropping root privileges, so that process
would have correct p_login value

Revision 1.104 / (download) - annotate - [select for diffs], Fri Sep 15 14:55:16 2000 UTC (14 years, 1 month ago) by christos
Branch: MAIN
Changes since 1.103: +75 -14 lines
Diff to previous 1.103 (colored)

Make this compile again without -DINET6 and without get{addr,name}info(3)
This ftpd now compiles and runs on NetBSD/1.4.2 with:

CPPFLAGS+= \
    '-Dstrlcpy(a,b,c)=(strncpy(a,b,c),strlen(a))' \
    '-Dstrlcat=strncat' \
    '-Dsl_add(a,b)=(sl_add(a,b),0)'

Revision 1.103 / (download) - annotate - [select for diffs], Sat Jul 29 08:20:02 2000 UTC (14 years, 2 months ago) by martin
Branch: MAIN
Changes since 1.102: +3 -3 lines
Diff to previous 1.102 (colored)

Fixed s/key compile bug.

Revision 1.102 / (download) - annotate - [select for diffs], Wed Jul 26 13:53:34 2000 UTC (14 years, 3 months ago) by lukem
Branch: MAIN
Changes since 1.101: +16 -7 lines
Diff to previous 1.101 (colored)

add support for -W; don't log to wtmp (orthogonal of -U which logs to utmp).
inspired by similar option in wuftpd.

Revision 1.95.2.3 / (download) - annotate - [select for diffs], Tue Jul 25 08:38:39 2000 UTC (14 years, 3 months ago) by lukem
Branch: netbsd-1-5
CVS Tags: netbsd-1-5-ALPHA2
Changes since 1.95.2.2: +176 -66 lines
Diff to previous 1.95.2.2 (colored) to branchpoint 1.95 (colored)

user visible changes (besides checking the cvs log):
* make checkportcmd the default
* add -r; force permanent drop of root privs after login
* add -V vers; change version string to vers
* add -H; act as -h `hostname`
* permanently drop root privs if it makes sense to do so (e.g; logging in as
  guest/chroot user on a port > 1024)
* fix reference to draft-ietf-ftpext-mlst-11
* add ftpd.conf directives: chroot, homedir
* fix base64_encode() and generation of the unique fact
* crank version to 20000723

Revision 1.101 / (download) - annotate - [select for diffs], Sun Jul 23 14:40:48 2000 UTC (14 years, 3 months ago) by lukem
Branch: MAIN
Changes since 1.100: +96 -43 lines
Diff to previous 1.100 (colored)

* make checkportcmd the default. this breaks third-party proxy ftp but
  prevents the ftp bounce attack, and we should be secure out of the
  box, not require users to tweak obscure stuff.
* allow the version string reported to clients to be changed with '-V vers'.
  if vers is empty or `-', don't report a version.
* if -r is given, permanently drop root privs
* if not a REAL user (i.e, GUEST or CHROOT), and ftpd is running on a port
  > IPPORT_RESERVED+1, permanently drop root privs
* don't bother reverting to root privs to logout of wtmp/utmp; since the
  file descriptor is already open this isn't necessary.
* fix the binding of the port for the PORT/LPRT/EPRT connection to be the
  ctrl_addr.su_port-1, not hardcoded to `20' (this was broken in the ipv6
  merge). if root privs have been dropped, and this would be a port <
  IPPORT_RESERVED, use a random port instead (which isn't RFC959 compliant
  but it doesn't appear that many clients care).
* prevent login of a new user if privs have been dropped and already logged
  in as a REAL user (existing check already stops GUEST & CHROOT users).
* move the port check stuff into a separate port_check() function, and use
  for PORT, LPRT, and EPRT checks. inspired by freebsd
* minor KNF
* minor man page cleanup

Revision 1.100 / (download) - annotate - [select for diffs], Mon Jul 17 02:30:54 2000 UTC (14 years, 3 months ago) by lukem
Branch: MAIN
Changes since 1.99: +74 -23 lines
Diff to previous 1.99 (colored)

* add two new ftpd.conf(5) directives:
	chroot	specify dir to chroot to for GUEST and CHROOT users, to
		override -a anondir or the user's homedir.
	homedir	specify dir to change to upon login; also used for ~ expansion
		and $HOME for subprocesses)
  both of these can take % escapes: %u (username), %d (homedir), %c (class).
* fix NLST to take a pathname not a STRING, so that ~ expansion works
* modify CWD to use the homedir parsed from curclass.homedir
* implement format_path(dst, src), to parse src expanding % escapes (see above)
  into dst.
* rename format_file() to display_file()

Revision 1.99 / (download) - annotate - [select for diffs], Sat Jul 15 03:45:20 2000 UTC (14 years, 3 months ago) by lukem
Branch: MAIN
Changes since 1.98: +9 -3 lines
Diff to previous 1.98 (colored)

* add -H, which acts like -h `hostname`. (requested by kim@)
* refer to draft-ietf-ftpext-mlst-11 instead of -10

Revision 1.61.2.3 / (download) - annotate - [select for diffs], Sat Jul 8 18:58:10 2000 UTC (14 years, 3 months ago) by he
Branch: netbsd-1-4
CVS Tags: netbsd-1-4-PATCH003
Changes since 1.61.2.2: +5 -5 lines
Diff to previous 1.61.2.2 (colored) to branchpoint 1.61 (colored)

Pull up revision 1.97 (requested by itojun):
  Do not use user-supplied data as format string to setproctitle().

Revision 1.98 / (download) - annotate - [select for diffs], Sat Jul 8 18:24:28 2000 UTC (14 years, 3 months ago) by sommerfeld
Branch: MAIN
Changes since 1.97: +4 -4 lines
Diff to previous 1.97 (colored)

More format paranoia.

Revision 1.95.2.2 / (download) - annotate - [select for diffs], Fri Jul 7 11:33:33 2000 UTC (14 years, 3 months ago) by itojun
Branch: netbsd-1-5
Changes since 1.95.2.1: +5 -5 lines
Diff to previous 1.95.2.1 (colored) to branchpoint 1.95 (colored)

pullup, approved by releng-1-5
udit setproctitle() - don't use variable alone, use with "%s".
from openbsd

usr.sbin/faithd/faithd.c 1.12 -> 1.13
libexec/ftpd/ftpd.c 1.96 -> 1.97
usr.sbin/rpc.lockd/lockd_lock.c 1.2 -> 1.3

Revision 1.97 / (download) - annotate - [select for diffs], Wed Jul 5 22:15:04 2000 UTC (14 years, 3 months ago) by itojun
Branch: MAIN
Changes since 1.96: +5 -5 lines
Diff to previous 1.96 (colored)

setproctitle(), and for any other printf variants, it is not a good idea
to pass variable directly like foo(x).  use foo("%s", x) to avoid misuse.
from: openbsd

Revision 1.89.2.1 / (download) - annotate - [select for diffs], Thu Jun 22 15:58:17 2000 UTC (14 years, 4 months ago) by minoura
Branch: minoura-xpg4dl
Changes since 1.89: +153 -327 lines
Diff to previous 1.89 (colored) next main 1.90 (colored)

Sync w/ netbsd-1-5-base.

Revision 1.95.2.1 / (download) - annotate - [select for diffs], Thu Jun 22 08:45:10 2000 UTC (14 years, 4 months ago) by lukem
Branch: netbsd-1-5
Changes since 1.95: +6 -8 lines
Diff to previous 1.95 (colored)

Pull up revision 1.96:
  - fix RATE{GET,PUT} when the client is slower than the rate limit
  - document units RATE{GET,PUT} use
Fixes PR#10390

Revision 1.96 / (download) - annotate - [select for diffs], Tue Jun 20 07:39:46 2000 UTC (14 years, 4 months ago) by lukem
Branch: MAIN
Changes since 1.95: +6 -8 lines
Diff to previous 1.95 (colored)

fix problems noted by <dogcow@redback.com> in [bin/10390] and private email:
* fix RATE{GET,PUT} under some situations when the client is slower than
  the server (something i missed when migrating the rate limiting code
  i wrote in ftp(1) to ftpd(8))
* document what units RATE{GET,PUT} use

Revision 1.95 / (download) - annotate - [select for diffs], Mon Jun 19 15:15:04 2000 UTC (14 years, 4 months ago) by lukem
Branch: MAIN
CVS Tags: netbsd-1-5-base
Branch point for: netbsd-1-5
Changes since 1.94: +114 -130 lines
Diff to previous 1.94 (colored)

various fixes suggested by Robert Elz:
* implement closedataconn() and use appropriately (including in mlsd())
* only put leading space in front of MLST output (not MLSD output)
* MLSD: only output pdir and cdir entries when the type fact is requested.
* change error code for giving MLSD a non-directory from 550 to 501
* remove MLSx Type fact support for UNIX.* for now; it's not standardised yet.
* do a check_login when MLSD and MLST are given no args
* detect & complain about null facts in OPTS MLST
* cache getgroups() at login instead of calling each time in fact_perm()

other mods:
* implement cprintf(); as per fprintf() but increments total_bytes{,_out}
* implement CPUTC(); as per putc() but increments total_bytes{,_out}
* implement base64_encode()
* fact_unique() display base64 encoding of dev_t and ino_t rather than
  hex output; should scale if size of those changes
* change reply() so that a negative code acts as the initial line in a reply,
  code == 0 prefixes the line with 4 spaces, and code > 0 works as before.
  deprecate lreply(code, ) and lreply(0, ) in favour of reply(-code, ) and
  reply(0, ) respectively.
* use cprintf() and CPUTC() appropriately (often instead of printf(),
  lreply(-2, ) or lreply(-1, ).
  now we actually account for the data sent by MLST and MLSD.
* remove DEBUG support for sending MLSD output to control connection instead
  of data connection (my ftp client now supports MLSD :-)

Revision 1.94 / (download) - annotate - [select for diffs], Wed Jun 14 13:55:15 2000 UTC (14 years, 4 months ago) by itojun
Branch: MAIN
Changes since 1.93: +4 -6 lines
Diff to previous 1.93 (colored)

correct LPSV/LPRT display on STAT command.
(did not crank the version since the change is on the same day)

Revision 1.93 / (download) - annotate - [select for diffs], Wed Jun 14 13:44:24 2000 UTC (14 years, 4 months ago) by lukem
Branch: MAIN
Changes since 1.92: +50 -223 lines
Diff to previous 1.92 (colored)

major overhaul (just before netbsd 1.5 :-):

* implement draft-ietf-ftpext-mlst-10 commands, especially MLST and MLSD.
  we already supported SIZE and MDTM. add the appropriate FEAT output lines.

* migrate a lot of the command code from ftpcmd.y and ftpd.c to cmds.c

* make dataconn(), feat(), lookup(), opts() and sizecmd() public

* modify struct tab so that it has a `flags' instead of `implemented' element,
  and remove the `hasopts' element.  If flags == 1, the command is implemented.
  if flags == 2, the command is implemented and takes options

* add macros ISDOTDIR(x) (is x ".") and ISDOTDOTDIR(x) (is x "..")

* modify lreply() so that lreply(-2, ...) just outputs the given info without
  a prefix or trailing \r\n. this saves doing b = printf(); total_* += b;

* enhance statcmd(). still needs work in the LPRT status stuff.

* crank version

Revision 1.92 / (download) - annotate - [select for diffs], Fri Jun 2 14:47:19 2000 UTC (14 years, 4 months ago) by explorer
Branch: MAIN
Changes since 1.91: +19 -5 lines
Diff to previous 1.91 (colored)

make this compile with KERBEROS5 defined.  Note:  only one of KERBEROS or KERBEROS5 may be defined in this file...

Revision 1.91 / (download) - annotate - [select for diffs], Fri Jun 2 00:19:04 2000 UTC (14 years, 4 months ago) by fredb
Branch: MAIN
Changes since 1.90: +4 -3 lines
Diff to previous 1.90 (colored)

Make this build again with crypto-us, after recent changes to k{,5}login.c.

Revision 1.90 / (download) - annotate - [select for diffs], Tue May 30 05:31:31 2000 UTC (14 years, 4 months ago) by itojun
Branch: MAIN
Changes since 1.89: +4 -2 lines
Diff to previous 1.89 (colored)

add comment on IPv4 mapped address twist

Revision 1.89 / (download) - annotate - [select for diffs], Sat May 20 23:34:55 2000 UTC (14 years, 5 months ago) by lukem
Branch: MAIN
CVS Tags: minoura-xpg4dl-base
Branch point for: minoura-xpg4dl
Changes since 1.88: +31 -26 lines
Diff to previous 1.88 (colored)

- Always close(pdata) if it was a valid filedescriptor before setting it to -1.
  Problem noted in [bin/9642] by Takahiro Kambe <taca@sky.yamashina.kyoto.jp>,
  (part of which already had been solved by itojun a while ago), and provided
  patch covered most of the fixes needed. (Thanks Takahiro!)
- Consistently indent goto labels by one space.

Revision 1.88 / (download) - annotate - [select for diffs], Sat May 20 02:20:18 2000 UTC (14 years, 5 months ago) by lukem
Branch: MAIN
Changes since 1.87: +63 -133 lines
Diff to previous 1.87 (colored)

convert to ANSI C as per style guide

Revision 1.61.2.2 / (download) - annotate - [select for diffs], Thu May 11 10:14:37 2000 UTC (14 years, 5 months ago) by he
Branch: netbsd-1-4
Changes since 1.61.2.1: +2 -4 lines
Diff to previous 1.61.2.1 (colored) to branchpoint 1.61 (colored)

Apply patch (requested by sommerfeld):
  Back out unnecessary half of revision 1.70 which breaks parsing
  of /etc/ftpchroot.

Revision 1.87 / (download) - annotate - [select for diffs], Sun Mar 5 06:12:19 2000 UTC (14 years, 7 months ago) by lukem
Branch: MAIN
Changes since 1.86: +8 -42 lines
Diff to previous 1.86 (colored)

* don't bother with a version[] string, just use the macro as appropriate
* clean some more of the GLOBAL stuff
* fix unused var if -UHASSETPROCTITLE

Revision 1.86 / (download) - annotate - [select for diffs], Mon Feb 14 03:26:06 2000 UTC (14 years, 8 months ago) by aidan
Branch: MAIN
Changes since 1.85: +3 -3 lines
Diff to previous 1.85 (colored)

Move include/kerberosIV/com_err.h to include/com_err.h

Revision 1.85 / (download) - annotate - [select for diffs], Thu Jan 13 00:04:31 2000 UTC (14 years, 9 months ago) by lukem
Branch: MAIN
Changes since 1.84: +9 -2 lines
Diff to previous 1.84 (colored)

suppress verbose messages from CWD and post-login if the first
character of the anonymous password is `-'.

Revision 1.84 / (download) - annotate - [select for diffs], Wed Jan 12 22:39:28 2000 UTC (14 years, 9 months ago) by lukem
Branch: MAIN
Changes since 1.83: +47 -11 lines
Diff to previous 1.83 (colored)

* add ftpd.conf directive `portrange class min max', which allows specification
  of the port range used by passive connections. based on work in [bin/9158]
  from Takahiro Kambe <taca@sky.yamashina.kyoto.jp>
* change the way global variables are defined and extern-ed to be more
  consistent.

Revision 1.83 / (download) - annotate - [select for diffs], Sat Jan 8 11:14:36 2000 UTC (14 years, 9 months ago) by lukem
Branch: MAIN
Changes since 1.82: +3 -3 lines
Diff to previous 1.82 (colored)

missing "." on reply

Revision 1.82 / (download) - annotate - [select for diffs], Sat Jan 8 11:09:56 2000 UTC (14 years, 9 months ago) by lukem
Branch: MAIN
Changes since 1.81: +39 -19 lines
Diff to previous 1.81 (colored)

features:
* add connection limits (`limit' keyword in ftpd.conf)
* move initialisation of curclass from parse_conf() to new function
  init_curclass()
* implement count_users(), which determines the number of users in a given
  class. a file - /var/run/ftpd.pids-<class> - is used to store a list
  of pids in use (effectively an array of pid_t's), and its size is reduced
  as necessary.
* new % modifiers in format_file:
	%c	class
	%M	maximum connection count
	%N	current connection count
* always end_login()s, even for refused connections

bugs fixed:
* remove \n from %T output
* fix some inconsistencies in the man pages
* ensure that both `ftp' *and* `anonymous' are allowed in ftpusers.
  (this was accidently broken in a recent commit to be ``or'' not ``and'')
* use MAXPATHLEN not MAXPATHLEN+1
* crank copyright date on modified files
* crank version

Revision 1.69.2.1 / (download) - annotate - [select for diffs], Mon Dec 27 18:30:12 1999 UTC (14 years, 10 months ago) by wrstuden
Branch: wrstuden-devbsize
Changes since 1.69: +496 -273 lines
Diff to previous 1.69 (colored) next main 1.70 (colored)

Pull up to last week's -current.

Revision 1.81 / (download) - annotate - [select for diffs], Tue Dec 21 12:56:15 1999 UTC (14 years, 10 months ago) by lukem
Branch: MAIN
CVS Tags: wrstuden-devbsize-base, wrstuden-devbsize-19991221
Changes since 1.80: +61 -14 lines
Diff to previous 1.80 (colored)

* add support for optional groupglob in ftpuser entry. the syntax is now:
	userglob[:groupglob][@host] [directive [class]]
* append ``(class: CLASSNAME, type: TYPE)'' to the syslogged login messages

Revision 1.80 / (download) - annotate - [select for diffs], Sun Dec 19 00:09:31 1999 UTC (14 years, 10 months ago) by lukem
Branch: MAIN
Changes since 1.79: +15 -16 lines
Diff to previous 1.79 (colored)

* add back support for `-h hostname'; it still may be useful to override
  the name advertised to the client, even if ftpd can determine it from
  the ip address that ftpd is bound to. requested by mrg.
* remove -4/-6; they were effectively no-ops since itojun's change in 1.75.
* crank version

Revision 1.79 / (download) - annotate - [select for diffs], Sat Dec 18 06:33:54 1999 UTC (14 years, 10 months ago) by lukem
Branch: MAIN
Changes since 1.78: +12 -21 lines
Diff to previous 1.78 (colored)

deprecate -h hostname in favour of automatic determination of local hostname.
this is a much cleaner solution for supporting multihomed virtual servers.
from Geoff C. Wing <gcw@pobox.com> in [bin/8137].

Revision 1.78 / (download) - annotate - [select for diffs], Sat Dec 18 05:51:35 1999 UTC (14 years, 10 months ago) by lukem
Branch: MAIN
Changes since 1.77: +37 -11 lines
Diff to previous 1.77 (colored)

* move version to separate header file
* use .Dv and .Tn in the man pages as appropriate
* KNF a bit

The following were inspired by similar changes in openbsd, but may
have additional improvements by me:
* add more check_login tests to the parser rules
* nuke a few memory leaks in the parser rules
* clear passwords before free()ing them, for safety
* don't display \r\n in setproctitle() output
* add support for -U, which enables managing /var/run/utmp entries for
  connections. solves [bin/2217] by Jason Downs <downsj@teeny.org>
* fix oob handling for STAT command
* use SIG_ERR instead of -1

Revision 1.77 / (download) - annotate - [select for diffs], Thu Dec 16 07:01:23 1999 UTC (14 years, 10 months ago) by lukem
Branch: MAIN
Changes since 1.76: +3 -3 lines
Diff to previous 1.76 (colored)

crank version

Revision 1.76 / (download) - annotate - [select for diffs], Thu Dec 16 02:21:40 1999 UTC (14 years, 10 months ago) by lukem
Branch: MAIN
Changes since 1.75: +30 -10 lines
Diff to previous 1.75 (colored)

* add support for `-h hostname', which defines the hostname to advertise
  as (useful for virtual ftp servers in conjunction with inetd.conf(5)'s
  ability to bind to a specific address).
  if this option is used, add `hostname' to the syslog messages.
* improve documentation of command-line options
* don't allow class names of `all' or `none' in ftpusers

Revision 1.75 / (download) - annotate - [select for diffs], Mon Dec 13 16:30:37 1999 UTC (14 years, 10 months ago) by itojun
Branch: MAIN
Changes since 1.74: +14 -8 lines
Diff to previous 1.74 (colored)

do not perform setsockopt(IP_TOS) on mapped connections (IPv4 connection
toward AF_INET6 socket).

Revision 1.74 / (download) - annotate - [select for diffs], Mon Dec 13 04:36:10 1999 UTC (14 years, 10 months ago) by itojun
Branch: MAIN
Changes since 1.73: +5 -4 lines
Diff to previous 1.73 (colored)

avoid use of s6_addr32, as it is non-standard.
(sync with KAME)

Revision 1.73 / (download) - annotate - [select for diffs], Sun Dec 12 14:05:54 1999 UTC (14 years, 10 months ago) by lukem
Branch: MAIN
Changes since 1.72: +334 -212 lines
Diff to previous 1.72 (colored)

* change format of /etc/ftpusers lines from
	userglob [allow|deny]
  to
	userglob[@host] [allow|deny  [classname]]
  where class is a userdefined classname.
  - if host is given it may either be a CIDR address (e.g, `1.2.3.0/24') or a
    hostglob (e.g, `*.foo.com'), and the remote host is matched against that.
  - if classname is given, use that to match entries in ftpd.conf (defaults
    to `guest' for `anonymous'/`ftp' logins, `chroot' for users found in
    /etc/ftpchroot, and `real' for everyone else.

* implement new /etc/ftpd.conf directives:
    classtype classname type	set type of classname to GUEST, CHROOT, or REAL
    motd classname file		file to use instead of /etc/motd
    rateget classname rate	set rateget throttle to rate
    rateput classname rate	set rateput throttle to rate
    upload classname		allow/deny uploads (STOU, STOR, APPE). if
				denied, also acts as `modify deny'.

* implement new `SITE' commands:
    RATEGET	as per /etc/ftpd.conf rateget, but cannot exceed that
    RATEPUT	as per /etc/ftpd.conf rateput, but cannot exceed that

* implement format_file(), which outputs a file to the user, parsing %
  escapes. use to print /etc/ftpwelcome, /etc/motd, and the `display' file.

* implement strsuftoi() (from ftp(1)), which parses a number and
  optional suffix (for use with rateget, etc)

* don't bother seteuid(0) ; bind(...) ; seteuid(pw->pw_uid), since
  we don't need reserved ports (at wasn't getting them anyway).

* update & reorder copyrights

* use strlcpy() as appropriate

Revision 1.72 / (download) - annotate - [select for diffs], Thu Dec 9 11:18:05 1999 UTC (14 years, 10 months ago) by itojun
Branch: MAIN
Changes since 1.71: +6 -2 lines
Diff to previous 1.71 (colored)

close pdata when it is kept opened till call to {,long_}passive().

Revision 1.71 / (download) - annotate - [select for diffs], Tue Dec 7 05:30:54 1999 UTC (14 years, 10 months ago) by lukem
Branch: MAIN
Changes since 1.70: +32 -27 lines
Diff to previous 1.70 (colored)

* change ftpd_popen() to take char *argv[] instead of char *cmd.
  the string tokenisation must be performed by the caller (which is
  generally easy because it's almost always a static command).
* change do_conversion() to return a char *argv[] instead of char *cmd.
  tokenisation of the command is done internally.
* change retrieve() to take char *argv[] instead of char *cmd.
  (to take advantage of the above changes).  fixes [bin/8173]
* use fparseln() instead of fgetln()
* store conversions in listed order (rather than reverse order)
* use stringlists instead of handrolling code to manage an argv.

Revision 1.61.2.1 / (download) - annotate - [select for diffs], Fri Oct 1 12:08:06 1999 UTC (15 years ago) by he
Branch: netbsd-1-4
CVS Tags: netbsd-1-4-PATCH002
Changes since 1.61: +5 -3 lines
Diff to previous 1.61 (colored)

Pull up revision 1.70 (requested by tron):
  Avoid segmentation fault if there is an empty line in /etc/ftpusers,
  fixing PR#8504.

Revision 1.70 / (download) - annotate - [select for diffs], Thu Sep 30 18:12:34 1999 UTC (15 years ago) by tron
Branch: MAIN
CVS Tags: comdex-fall-1999-base, comdex-fall-1999
Changes since 1.69: +5 -3 lines
Diff to previous 1.69 (colored)

Avoid segmention fault if there is an empty line in "/etc/ftpusers".
Problem noted by Emmanuel Dreyfus in PR bin/8504.

Revision 1.69 / (download) - annotate - [select for diffs], Wed Aug 25 16:23:52 1999 UTC (15 years, 2 months ago) by christos
Branch: MAIN
Branch point for: wrstuden-devbsize
Changes since 1.68: +4 -3 lines
Diff to previous 1.68 (colored)

Make this compile with krb5.

Revision 1.68 / (download) - annotate - [select for diffs], Tue Jul 27 15:41:49 1999 UTC (15 years, 3 months ago) by itojun
Branch: MAIN
Changes since 1.67: +34 -9 lines
Diff to previous 1.67 (colored)

handle IPv4 TCP control connection, toward AF_INET6 socket.
this happens when you have the following line in inetd.conf,
but not with tcp4 line:
>>>ftp  stream tcp6 nowait root /usr/libexec/ftpd ftpd -ll

Revision 1.67 / (download) - annotate - [select for diffs], Fri Jul 2 05:52:14 1999 UTC (15 years, 3 months ago) by itojun
Branch: MAIN
Changes since 1.66: +325 -67 lines
Diff to previous 1.66 (colored)

dual-stack ftpd.  run this from inetd, like:
>>ftp  stream tcp6 nowait root /usr/libexec/ftpd ftpd -ll

Revision 1.66 / (download) - annotate - [select for diffs], Sat Jun 5 13:49:53 1999 UTC (15 years, 4 months ago) by briggs
Branch: MAIN
Changes since 1.65: +20 -4 lines
Diff to previous 1.65 (colored)

Set keepalives on the sockets to force logouts on connections that have
disappeared.

Revision 1.65 / (download) - annotate - [select for diffs], Mon May 24 21:57:19 1999 UTC (15 years, 5 months ago) by ross
Branch: MAIN
Changes since 1.64: +19 -15 lines
Diff to previous 1.64 (colored)

* Cast %q[ud] arguments to fix ILP32/LP64 off_t variation.
* Fix bug in 213 reply: correct ordering of format string args.

Revision 1.64 / (download) - annotate - [select for diffs], Wed May 19 21:44:29 1999 UTC (15 years, 5 months ago) by thorpej
Branch: MAIN
Changes since 1.63: +4 -4 lines
Diff to previous 1.63 (colored)

Cast away a const for now; const poisoning kerberos #0.

Revision 1.63 / (download) - annotate - [select for diffs], Tue May 18 08:14:18 1999 UTC (15 years, 5 months ago) by lukem
Branch: MAIN
Changes since 1.62: +44 -25 lines
Diff to previous 1.62 (colored)

* fix a problem in retrieve() where arguments to commands weren't working
  (this was broken in the last commit). problem noticed by simonb@
* don't display the stderr output of the internal ls.
* modify usage of lreply so that generally only one `XXX-' code per
  `block' is displayed; the rest of the lines have four spaces instead.
  i find this easier to read.
* fix a couple places where byte accounting wasn't correct

Revision 1.62 / (download) - annotate - [select for diffs], Mon May 17 15:14:54 1999 UTC (15 years, 5 months ago) by lukem
Branch: MAIN
Changes since 1.61: +450 -163 lines
Diff to previous 1.61 (colored)

features/fixes:
* implement xferstats. full stats are displayed for `STAT', and a
  summary is displayed upon exit (and syslogged).  inspired by wu-ftpd.
* wrap data xfers in {send,receive}_data with alarm() timeouts. this
  should remove the majority of the `hanging ftpd' problems that
  people were still seeing.  inspired by wu-ftpd.
* link with ../../bin/ls, so that bin/ls is not required under a
  chroot()ed area for `LIST' to work.  based on [bin/4497] from
  "Soren S.  Jorvang" <soren@t.dk>
* migrate code from util.c into ftpd.c, so that it doesn't conflict
  with ls' util.c.
* remove man page comment about ~ftp/bin/ls being necessary.
* bump version to 7.2.0.
* syslog xfer time with xfer stats.
* if appropriate, syslog error message with command.

internal code stuff:
* change arguments of various functions from `char *' to `const char *'.
* define PLURAL(x) macro, which returns `' if x == 1, `s' otherwise.
  use macro appropriately
* lreply(): a code of -1 means ``send line as is''. a code of 0
  means ``send line with 4 space prefix''. don't print a space after
  the `-' for any other code.
* logcmd(): add `const struct timeval *elapsed' and `const char *error'
  for more flexible error reporting

Revision 1.61 / (download) - annotate - [select for diffs], Mon Dec 28 04:54:01 1998 UTC (15 years, 10 months ago) by lukem
Branch: MAIN
CVS Tags: netbsd-1-4-base, netbsd-1-4-RELEASE, netbsd-1-4-PATCH001
Branch point for: netbsd-1-4
Changes since 1.60: +15 -62 lines
Diff to previous 1.60 (colored)

* replace LOG(CMD|BYTES) macros with logcmd(), which is a cleaner
  solution with less code replication. use realpath() in logcmd() so
  that all logged filenames are sane.
* support `REST STREAM' in `FEAT' reply (from draft-ietf-ftpext-mlst-05)
* in 'HELP', suffix unimplemented commands with `-' instead of `*'; the
  former is easier to differentiate from `+'.
* deprecate curdir() now that logcmd() doesn't use it.
* ensure all filename buffers are at least MAXPATHLEN+1 in size.
* move jmp_buf errcatch out of extern.h, removing need to #include <setjmp.h>
  in every file.

Revision 1.60 / (download) - annotate - [select for diffs], Mon Sep 7 08:17:39 1998 UTC (16 years, 1 month ago) by lukem
Branch: MAIN
Changes since 1.59: +3 -3 lines
Diff to previous 1.59 (colored)

bump version from 7.03 to 7.1.0 (new commands available)

Revision 1.59 / (download) - annotate - [select for diffs], Mon Sep 7 08:15:25 1998 UTC (16 years, 1 month ago) by lukem
Branch: MAIN
Changes since 1.58: +2 -10 lines
Diff to previous 1.58 (colored)

remove nack() - missed in previous work

Revision 1.58 / (download) - annotate - [select for diffs], Mon Sep 7 08:11:20 1998 UTC (16 years, 1 month ago) by lukem
Branch: MAIN
Changes since 1.57: +74 -88 lines
Diff to previous 1.57 (colored)

new features:
* implement FEAT and OPTS from RFC2389. FEAT returns SIZE and MDTM.
  OPTS only works on NOOP (as a test).
* extend format of /etc/ftpchroot similar to /etc/ftpusers; each entry
  can take an optional trailing `yes' or `no' which indicates if
  chroot should be done (defaults to `yes').
  based on patches from Ty Sarna <tsarna@endicor.com> in [bin/4769]

cleanups/bugs:
* reorder and reformat entries in yacc parser to match cmdtab[].
  add a blank line between each rule.
* add short hasopts and char *options to struct tab, to support OPTS.
* deprecate upper(); use strcasecmp() instead of strcmp()
* remove unnecessary for (;;) { } in yylex();
* replace copy() and sgetsave() with xstrdup()
* fix a couple of `hasyyerrored = 1' that were accidently removed.

Revision 1.57 / (download) - annotate - [select for diffs], Sun Sep 6 10:39:40 1998 UTC (16 years, 1 month ago) by lukem
Branch: MAIN
Changes since 1.56: +8 -27 lines
Diff to previous 1.56 (colored)

* complete fix for `multiple replies returned for single parse error'
  problem; move `hasyyerrored' state flag out of yylex() so that
  check_{login,modify} can also set it.
* check result of check_login for PORT command
* set initial timeout before the "setjmp(); for(;;) yyparse()",
  otherwise an invalid command after login incorrectly sets the timeout
  to 5 minutes (rather than what was set in ftpd.conf)
* replace (char *)0 with NULL
* move yyerror() from ftpd.c to ftpcmd.y
* remove need for -Dunix, by using the version string from ftpd.c
  (instead of `BSD-199506')
* move all extern-ed vars into extern.h

Revision 1.56 / (download) - annotate - [select for diffs], Sat Sep 5 17:00:01 1998 UTC (16 years, 1 month ago) by lukem
Branch: MAIN
Changes since 1.55: +3 -4 lines
Diff to previous 1.55 (colored)

replace malloc/strcpy with strdup

Revision 1.55 / (download) - annotate - [select for diffs], Mon Jul 27 01:55:23 1998 UTC (16 years, 3 months ago) by mycroft
Branch: MAIN
Changes since 1.54: +4 -4 lines
Diff to previous 1.54 (colored)

const poisoning.

Revision 1.54 / (download) - annotate - [select for diffs], Mon Jul 27 01:51:23 1998 UTC (16 years, 3 months ago) by mycroft
Branch: MAIN
Changes since 1.53: +16 -16 lines
Diff to previous 1.53 (colored)

const poisoning.

Revision 1.53 / (download) - annotate - [select for diffs], Sun Jul 26 14:57:56 1998 UTC (16 years, 3 months ago) by mycroft
Branch: MAIN
Changes since 1.52: +3 -3 lines
Diff to previous 1.52 (colored)

const poisoning.

Revision 1.52 / (download) - annotate - [select for diffs], Mon Jul 6 06:47:58 1998 UTC (16 years, 3 months ago) by mrg
Branch: MAIN
Changes since 1.51: +9 -7 lines
Diff to previous 1.51 (colored)

- use an array MAXHOSTNAMELEN+1 size to hold hostnames
- ensure hostname from gethostname() is nul-terminated in all cases
- minor KNF
- use MAXHOSTNAMELEN over various other values/defines
- be safe will buffers that hold hostnames

Revision 1.51 / (download) - annotate - [select for diffs], Fri Jun 26 17:41:38 1998 UTC (16 years, 4 months ago) by msaitoh
Branch: MAIN
Changes since 1.50: +10 -4 lines
Diff to previous 1.50 (colored)

add "-s" flag (SecureID).

Revision 1.50 / (download) - annotate - [select for diffs], Fri Jun 19 22:59:01 1998 UTC (16 years, 4 months ago) by kleink
Branch: MAIN
Changes since 1.49: +3 -3 lines
Diff to previous 1.49 (colored)

GLOB_QUOTE is dead; per POSIX, backslash quoting of special characters being
enabled is the default behaviour.

Revision 1.49 / (download) - annotate - [select for diffs], Mon Jun 8 07:13:13 1998 UTC (16 years, 4 months ago) by lukem
Branch: MAIN
Changes since 1.48: +71 -28 lines
Diff to previous 1.48 (colored)

support displaying the stderr output from a LIST or a conversion to
the user at the end of a transfer.
this generates a file in /tmp, so anonymous requires a
writable ~ftp/tmp, which you may not want to do (because it may
allow people to unwanted upload files).

XXX:	a better method of storing the stderr output would be nice, but
	is a lot more effort to implement. this feature can at least be
	used temporarily whilst debugging why an ftp conversion doesn't
	work.

Revision 1.48 / (download) - annotate - [select for diffs], Wed Jun 3 13:21:42 1998 UTC (16 years, 4 months ago) by mouse
Branch: MAIN
Changes since 1.47: +4 -3 lines
Diff to previous 1.47 (colored)

Show/log the strerror(errno) string when getcwd fails

Revision 1.47 / (download) - annotate - [select for diffs], Wed Jun 3 09:21:45 1998 UTC (16 years, 4 months ago) by hubertf
Branch: MAIN
Changes since 1.46: +3 -3 lines
Diff to previous 1.46 (colored)

Fix some problems with failed getcwd commands, reported in PR bin/5531
by Saitoh Masanobu <msaitoh@spa.is.uec.ac.jp>.

Revision 1.46 / (download) - annotate - [select for diffs], Mon Feb 23 23:10:34 1998 UTC (16 years, 8 months ago) by cjs
Branch: MAIN
Changes since 1.45: +3 -3 lines
Diff to previous 1.45 (colored)

Send back an error message rather than dumping core when an invalid
username is entered. The latter, while effective, does not appear to
me to be an appropriate response.

Revision 1.45 / (download) - annotate - [select for diffs], Sun Feb 1 14:10:22 1998 UTC (16 years, 8 months ago) by christos
Branch: MAIN
Changes since 1.44: +12 -9 lines
Diff to previous 1.44 (colored)

- #endif foo -> #endif /* foo */
- #if __STDC__ -> #ifdef __STDC__
- Don't allow expired accounts to login.

Revision 1.39.2.4 / (download) - annotate - [select for diffs], Thu Jan 29 13:06:32 1998 UTC (16 years, 8 months ago) by mellon
Branch: netbsd-1-3
CVS Tags: netbsd-1-3-PATCH003-CANDIDATE2, netbsd-1-3-PATCH003-CANDIDATE1, netbsd-1-3-PATCH003-CANDIDATE0, netbsd-1-3-PATCH003, netbsd-1-3-PATCH002, netbsd-1-3-PATCH001
Changes since 1.39.2.3: +9 -4 lines
Diff to previous 1.39.2.3 (colored) to branchpoint 1.39 (colored) next main 1.40 (colored)

Pull up 1.44 (lukem)

Revision 1.44 / (download) - annotate - [select for diffs], Sun Dec 28 04:28:17 1997 UTC (16 years, 10 months ago) by lukem
Branch: MAIN
Changes since 1.43: +9 -4 lines
Diff to previous 1.43 (colored)

set $HOME to "/" for guest or chroot users, pw->pw_dir otherwise.
fixes expansion of `~/...' pathnames.

Revision 1.39.2.3 / (download) - annotate - [select for diffs], Mon Dec 1 20:06:36 1997 UTC (16 years, 10 months ago) by mellon
Branch: netbsd-1-3
CVS Tags: netbsd-1-3-RELEASE
Changes since 1.39.2.2: +9 -6 lines
Diff to previous 1.39.2.2 (colored) to branchpoint 1.39 (colored)

Pull rev 1.42 and 1.43 up from trunk (lukem) (reviewed by mellon)

Revision 1.43 / (download) - annotate - [select for diffs], Fri Nov 28 23:42:36 1997 UTC (16 years, 10 months ago) by lukem
Branch: MAIN
Changes since 1.42: +3 -3 lines
Diff to previous 1.42 (colored)

use 300 seconds (as per login(1)) for initial timeout, rather than 900 secs

Revision 1.42 / (download) - annotate - [select for diffs], Fri Nov 28 23:32:30 1997 UTC (16 years, 10 months ago) by lukem
Branch: MAIN
Changes since 1.41: +7 -5 lines
Diff to previous 1.41 (colored)

* initialise curclass.timeout to 900 in main(), so that operations that
  want to timeout using this value that are executed before the conf file
  is parsed will work. fixes ``stale ftpd stuck in connection phase''
* in PASV mode, wrap accept() in an alarm timeout. fixes ``stale ftpd because
  of client disappearing in pasv mode (usually browsers)''
* main() doesn't need envp argument

Revision 1.39.2.2 / (download) - annotate - [select for diffs], Mon Nov 17 16:43:14 1997 UTC (16 years, 11 months ago) by mrg
Branch: netbsd-1-3
CVS Tags: netbsd-1-3-BETA
Changes since 1.39.2.1: +5 -3 lines
Diff to previous 1.39.2.1 (colored) to branchpoint 1.39 (colored)

pull up from trunk:  fixes from lukem.

Revision 1.41 / (download) - annotate - [select for diffs], Tue Nov 11 12:42:39 1997 UTC (16 years, 11 months ago) by lukem
Branch: MAIN
Changes since 1.40: +5 -3 lines
Diff to previous 1.40 (colored)

* change checkportcmd syntax to `checkportcmd class [off]' (as per `modify')
* display current setting of checkportcmd in STAT
* ensure that curclass.checkportcmd is initialised to 0
* document default setting of checkportcmd in ftpd(8)
* cleanup code a bit, putting code for "checkportcmd" in alphabetical order

Revision 1.39.2.1 / (download) - annotate - [select for diffs], Tue Nov 11 06:38:28 1997 UTC (16 years, 11 months ago) by mrg
Branch: netbsd-1-3
Changes since 1.39: +3 -3 lines
Diff to previous 1.39 (colored)

pull up from trunk: increment version.

Revision 1.40 / (download) - annotate - [select for diffs], Tue Nov 11 06:32:17 1997 UTC (16 years, 11 months ago) by mrg
Branch: MAIN
Changes since 1.39: +3 -3 lines
Diff to previous 1.39 (colored)

increment version.

Revision 1.39 / (download) - annotate - [select for diffs], Sun Oct 19 18:16:19 1997 UTC (17 years ago) by mycroft
Branch: MAIN
CVS Tags: netbsd-1-3-base
Branch point for: netbsd-1-3
Changes since 1.38: +5 -19 lines
Diff to previous 1.38 (colored)

Use remove(3) rather than stat(2)ing the file, yadda yadda.
Simpler, and DTRT for symlinks.

Revision 1.38 / (download) - annotate - [select for diffs], Sun Oct 12 14:04:37 1997 UTC (17 years ago) by mycroft
Branch: MAIN
Changes since 1.37: +35 -6 lines
Diff to previous 1.37 (colored)

Add some krb5 hooks, though it probably doesn't work yet.

Revision 1.37 / (download) - annotate - [select for diffs], Sun Oct 12 13:52:51 1997 UTC (17 years ago) by mycroft
Branch: MAIN
Changes since 1.36: +11 -12 lines
Diff to previous 1.36 (colored)

Actually, do Kerberos first, since we want to get a TGT if possible.
Also, clean up some minor cruft.

Revision 1.36 / (download) - annotate - [select for diffs], Sun Oct 12 13:18:56 1997 UTC (17 years ago) by mycroft
Branch: MAIN
Changes since 1.35: +15 -13 lines
Diff to previous 1.35 (colored)

Format police.
Also, try s/key before Kerberos.

Revision 1.35 / (download) - annotate - [select for diffs], Tue Sep 23 14:25:31 1997 UTC (17 years, 1 month ago) by lukem
Branch: MAIN
Changes since 1.34: +37 -29 lines
Diff to previous 1.34 (colored)

- add '-C user', which runs checkaccess(user) and exits with the result
  (0 == user allowed in /etc/ftpusers, 1 == user denied in /etc/ftpusers).
  from Jim Bernard <jbernard@tater.mines.edu> in [security/4061] with mods
- getopt returns -1 not EOF
- in lostcon(), call dologout(1) not dologout(-1);

Revision 1.34 / (download) - annotate - [select for diffs], Tue Sep 23 13:56:42 1997 UTC (17 years, 1 month ago) by lukem
Branch: MAIN
Changes since 1.33: +25 -7 lines
Diff to previous 1.33 (colored)

implement '-c confdir', which allows the specification of an alternate
directory to look for the various configuration files, overriding /etc.
From Matthias Scheler <tron@lyssa.owl.de> in [bin/4133]

Revision 1.33 / (download) - annotate - [select for diffs], Thu Sep 18 07:27:35 1997 UTC (17 years, 1 month ago) by lukem
Branch: MAIN
Changes since 1.32: +30 -8 lines
Diff to previous 1.32 (colored)

- ensure 257 reply codes from PWD and MKD are RFC959 compliant:
	257 "dirname" some message
  (any "s in dirname should be doubled, per the RFC)
- don't put an extra / in the output of NLST if the last char in the
  directory is a /
- bump the version to 7.01 because of these fixes

Revision 1.32 / (download) - annotate - [select for diffs], Tue Aug 26 13:10:39 1997 UTC (17 years, 2 months ago) by lukem
Branch: MAIN
Changes since 1.31: +3 -3 lines
Diff to previous 1.31 (colored)

fix grammo

Revision 1.31 / (download) - annotate - [select for diffs], Mon Aug 25 19:31:48 1997 UTC (17 years, 2 months ago) by kleink
Branch: MAIN
Changes since 1.30: +4 -4 lines
Diff to previous 1.30 (colored)

Lseek(2) usage cleanup: the use of L_SET/L_INCR/L_XTND is deprecated,
use SEEK_SET/SEEK_CUR/SEEK_END instead.

Revision 1.30 / (download) - annotate - [select for diffs], Thu Aug 14 02:06:17 1997 UTC (17 years, 2 months ago) by lukem
Branch: MAIN
Changes since 1.29: +7 -7 lines
Diff to previous 1.29 (colored)

* don't depend upon buffer returned by fgetln() to remain. fix mainly
  from Tatoku Ogaito <tacha@tera.fukui-med.ac.jp> in [bin/3967]
* fgetln() doesn't \0 terminate its string. look for the \n and replace
  it with \0 (if no \n, ignore the line - it's most likely corrupt)
* more intensive checks on strdup() returns (not a current mem leak,
  but depended upon code elsewhere to cleanup - not good)
* cleanup some syslog error messages

Revision 1.29 / (download) - annotate - [select for diffs], Mon Jul 21 05:13:10 1997 UTC (17 years, 3 months ago) by mrg
Branch: MAIN
Changes since 1.28: +16 -10 lines
Diff to previous 1.28 (colored)

be safe with some buffers.

Revision 1.28 / (download) - annotate - [select for diffs], Sun Jun 22 22:33:13 1997 UTC (17 years, 4 months ago) by christos
Branch: MAIN
Changes since 1.27: +4 -4 lines
Diff to previous 1.27 (colored)

missed some warnings.

Revision 1.27 / (download) - annotate - [select for diffs], Sat Jun 21 18:01:35 1997 UTC (17 years, 4 months ago) by cjs
Branch: MAIN
Changes since 1.26: +5 -4 lines
Diff to previous 1.26 (colored)

%qd wants long long. Thus, if you're going to turn on warnings for
printf format strings, you've got to make sure you cast quantities
passed to %qd to long long because on 64-bit machines they're often
just long, which is not the same, even when it's the same size.

Revision 1.26 / (download) - annotate - [select for diffs], Sat Jun 21 04:38:54 1997 UTC (17 years, 4 months ago) by mellon
Branch: MAIN
Changes since 1.25: +6 -2 lines
Diff to previous 1.25 (colored)

Need prototype for klogin() - probably ought to go in a header file, but klogin probably ought to go in a library first

Revision 1.25 / (download) - annotate - [select for diffs], Wed Jun 18 19:05:50 1997 UTC (17 years, 4 months ago) by christos
Branch: MAIN
Changes since 1.24: +22 -7 lines
Diff to previous 1.24 (colored)

- Pass gcc -Wall
- Fix incorrect const poisoning
- Fix ftpd_popen to dynamically allocate strings to avoid buffer overruns.

Revision 1.24 / (download) - annotate - [select for diffs], Sat Jun 14 08:43:31 1997 UTC (17 years, 4 months ago) by lukem
Branch: MAIN
Changes since 1.23: +83 -67 lines
Diff to previous 1.23 (colored)

* implement /etc/ftpd.conf, which adds support for the following features,
  controllable on a per class (which is one of: real, chroot, guest,
  all or none) basis:
    * on-the-fly execution of a command to build the file (a ``conversion''),
      providing support for "get dirname.tar" and the like.
    * displaying the contents of a file when a directory is entered
      for the first time.
    * maximum value for timeout (replaces -T).
    * control usage of CHMOD, DELE, MKD, RMD, UMASK; replacing -DINSECURE_GUEST.
    * notifying the user of the existance of a files matching a glob
      pattern when a directory is entered for the first time.
    * default value for timeout (replaces -t).
    * default umask (replaces -DGUEST_CMASK and -u).
  The conversion, display, and notify functionality was based on code by
  Simon Burge <simonb@telstra.com.au>.
* clean up and re-order parts of the man page into subsections.
* STAT displays the settings defined for the class of the current user.
* bump version from 6.00 to 7.00, because of ftpd.conf.
* deprecate -DGUEST_CMASK and -DINSECURE_GUEST in the Makefile, and
  -t, -T and -u, as ftpd.conf allows finer control of these.
* add "nostderr" argument to ftpd_popen(), because you don't want the
  stderr stream mixing with the stdout stream during a conversion,
  as this can corrupt the stream.

Revision 1.23 / (download) - annotate - [select for diffs], Thu May 29 10:31:48 1997 UTC (17 years, 5 months ago) by lukem
Branch: MAIN
Changes since 1.22: +7 -4 lines
Diff to previous 1.22 (colored)

* don't log failed usernames to ftp.notice; use authpriv.notice instead.
  closes [bin/1571]
* don't quit if "PASV" is received without the user being logged in.
  closes [bin/2401], albiet with a modified test.

Revision 1.22 / (download) - annotate - [select for diffs], Fri May 23 22:09:53 1997 UTC (17 years, 5 months ago) by cjs
Branch: MAIN
Changes since 1.21: +10 -8 lines
Diff to previous 1.21 (colored)

Allow setting the directory to which anonymous users chdir from
the command line. Document -u option. A couple of minor cleanups.

Revision 1.21 / (download) - annotate - [select for diffs], Tue Apr 29 04:00:40 1997 UTC (17 years, 5 months ago) by cjs
Branch: MAIN
Changes since 1.20: +20 -21 lines
Diff to previous 1.20 (colored)

/etc/ftpusers now matches globs against the username. mycroft suggested this.

Revision 1.20 / (download) - annotate - [select for diffs], Sun Apr 27 03:21:41 1997 UTC (17 years, 6 months ago) by lukem
Branch: MAIN
Changes since 1.19: +5 -5 lines
Diff to previous 1.19 (colored)

* fix "cd ~" so that it works (from Simon Burge <simonb@telstra.com.au>
* move resetting of CFLAGS on powerpc to before optional CFLAGS settings
* minor code & man page cleanups

Revision 1.19 / (download) - annotate - [select for diffs], Sun Apr 6 07:53:11 1997 UTC (17 years, 6 months ago) by cjs
Branch: MAIN
Changes since 1.18: +88 -24 lines
Diff to previous 1.18 (colored)

Change the syntax of /etc/ftpusers to have both allow and deny
information in the same file by following the username with `allow'
or `deny'. Also, the user `*' can be used to set the default for
users not listed in the file. This is entirely backward compatable
with old /etc/ftpusers files.
  Also, do the /etc/ftpusers and the valid login shell checks after
the password is verified, rather than before, so as not to give away
whether or not a particular user ID is present on the system.

Revision 1.18 / (download) - annotate - [select for diffs], Sun Mar 30 22:53:40 1997 UTC (17 years, 6 months ago) by cjs
Branch: MAIN
Changes since 1.17: +11 -3 lines
Diff to previous 1.17 (colored)

Changes to make anonymous uploads more secure. For anonymous users:
* Set umask to 707;
* Disable UMASK, CHMOD, DELE, RMD and MKD commands.
Compile-time options let you change that umask and go back to the
old, insecure way if you like.

Revision 1.1.1.3 / (download) - annotate - [select for diffs] (vendor branch), Sat Mar 29 23:56:30 1997 UTC (17 years, 6 months ago) by cjs
Branch: WFJ-920714, CSRG
CVS Tags: lite-2
Changes since 1.1.1.2: +2 -2 lines
Diff to previous 1.1.1.2 (colored)

4.4BSD-lite2 import.

Revision 1.1.1.2 / (download) - annotate - [select for diffs] (vendor branch), Sat Mar 29 23:55:58 1997 UTC (17 years, 6 months ago) by cjs
Branch: WFJ-920714, CSRG
CVS Tags: lite-1
Changes since 1.1.1.1: +384 -207 lines
Diff to previous 1.1.1.1 (colored)

Lite-1 Import.

Revision 1.17 / (download) - annotate - [select for diffs], Fri Mar 28 21:55:41 1997 UTC (17 years, 7 months ago) by cjs
Branch: MAIN
Changes since 1.16: +3 -3 lines
Diff to previous 1.16 (colored)

4.4lite2 update. (The one minor bugfix between 4.4lite and 4.4lite2
was already in our sources, thus just the sccsid line is changed.)

Revision 1.15.6.1 / (download) - annotate - [select for diffs], Thu Jan 23 06:07:18 1997 UTC (17 years, 9 months ago) by mrg
Branch: netbsd-1-2
CVS Tags: netbsd-1-2-PATCH001
Changes since 1.15: +7 -2 lines
Diff to previous 1.15 (colored) next main 1.16 (colored)

from trunk: set transflag to 0 in dologout, to prevent a SIGURG taking us back to the main loop.

Revision 1.16 / (download) - annotate - [select for diffs], Thu Jan 23 05:57:55 1997 UTC (17 years, 9 months ago) by mrg
Branch: MAIN
Changes since 1.15: +7 -2 lines
Diff to previous 1.15 (colored)

set transflag to 0 in dologout, to prevent a SIGURG taking us back to the main loop.

Revision 1.15 / (download) - annotate - [select for diffs], Sat Jun 3 22:46:47 1995 UTC (19 years, 4 months ago) by mycroft
Branch: MAIN
CVS Tags: netbsd-1-2-base, netbsd-1-2-RELEASE, netbsd-1-2-BETA, netbsd-1-1-base, netbsd-1-1-RELEASE, netbsd-1-1-PATCH001, netbsd-1-1
Branch point for: netbsd-1-2
Changes since 1.14: +3 -2 lines
Diff to previous 1.14 (colored)

Fill in sin_len.

Revision 1.14 / (download) - annotate - [select for diffs], Tue Apr 11 02:58:40 1995 UTC (19 years, 6 months ago) by cgd
Branch: MAIN
Changes since 1.13: +2 -2 lines
Diff to previous 1.13 (colored)

typo.

Revision 1.13 / (download) - annotate - [select for diffs], Tue Apr 11 02:44:55 1995 UTC (19 years, 6 months ago) by cgd
Branch: MAIN
Changes since 1.12: +11 -6 lines
Diff to previous 1.12 (colored)

clean up RCS Id's and a couple of stype nits.
Also, fix bug 947 (reported by Luke Mewburn, extraneous vers.c)

Revision 1.12 / (download) - annotate - [select for diffs], Wed Mar 22 16:55:35 1995 UTC (19 years, 7 months ago) by mycroft
Branch: MAIN
Changes since 1.11: +2 -2 lines
Diff to previous 1.11 (colored)

Use IPTOS_THROUGHPUT for passive mode data connection.

Revision 1.11 / (download) - annotate - [select for diffs], Wed Mar 8 19:50:54 1995 UTC (19 years, 7 months ago) by brezak
Branch: MAIN
Changes since 1.10: +7 -5 lines
Diff to previous 1.10 (colored)

Fill in ttyname for cred file uniquifier under KERBEROS (From Michael Graff)

Revision 1.10 / (download) - annotate - [select for diffs], Fri Dec 23 14:29:31 1994 UTC (19 years, 10 months ago) by cgd
Branch: MAIN
Changes since 1.9: +2 -2 lines
Diff to previous 1.9 (colored)

be a bit more careful with types, casts, and and function declarations.

Revision 1.8.2.1 / (download) - annotate - [select for diffs], Sun Sep 25 05:45:09 1994 UTC (20 years, 1 month ago) by cgd
Branch: netbsd-1-0
CVS Tags: netbsd-1-0-RELEASE, netbsd-1-0-PATCH1, netbsd-1-0-PATCH06, netbsd-1-0-PATCH05, netbsd-1-0-PATCH04, netbsd-1-0-PATCH03, netbsd-1-0-PATCH02, netbsd-1-0-PATCH0
Changes since 1.8: +2 -2 lines
Diff to previous 1.8 (colored) next main 1.9 (colored)

from trunk, per mycroft

Revision 1.9 / (download) - annotate - [select for diffs], Tue Sep 20 23:09:14 1994 UTC (20 years, 1 month ago) by jtc
Branch: MAIN
Changes since 1.8: +2 -2 lines
Diff to previous 1.8 (colored)

Fix PR #491, what could have been a big security hole

Revision 1.8 / (download) - annotate - [select for diffs], Wed Jun 29 01:49:45 1994 UTC (20 years, 4 months ago) by deraadt
Branch: MAIN
CVS Tags: netbsd-1-0-base
Branch point for: netbsd-1-0
Changes since 1.7: +385 -211 lines
Diff to previous 1.7 (colored)

4.4-lite, plus our local changes

Revision 1.7 / (download) - annotate - [select for diffs], Tue May 24 06:53:38 1994 UTC (20 years, 5 months ago) by deraadt
Branch: MAIN
Changes since 1.6: +24 -5 lines
Diff to previous 1.6 (colored)

add skey support

Revision 1.6 / (download) - annotate - [select for diffs], Thu Apr 14 03:15:41 1994 UTC (20 years, 6 months ago) by cgd
Branch: MAIN
Changes since 1.5: +9 -56 lines
Diff to previous 1.5 (colored)

use setproctitle

Revision 1.5 / (download) - annotate - [select for diffs], Wed Apr 6 20:50:05 1994 UTC (20 years, 6 months ago) by cgd
Branch: MAIN
Changes since 1.4: +19 -6 lines
Diff to previous 1.4 (colored)

Jarle.F.Greipsland@idt.unit.no's changes to allow for password-protected
chrooted ftp logins.

Revision 1.4 / (download) - annotate - [select for diffs], Wed Mar 30 02:50:29 1994 UTC (20 years, 7 months ago) by cgd
Branch: MAIN
Changes since 1.3: +29 -8 lines
Diff to previous 1.3 (colored)

some changes to make Kerberos a bit easier to use.  from
Michael Graff <explorer@vorpal.com>, with some work by myself...

Revision 1.3 / (download) - annotate - [select for diffs], Sun Aug 1 18:30:47 1993 UTC (21 years, 2 months ago) by mycroft
Branch: MAIN
Changes since 1.2: +2 -1 lines
Diff to previous 1.2 (colored)

Add RCS identifiers.

Revision 1.2 / (download) - annotate - [select for diffs], Mon Apr 26 14:33:31 1993 UTC (21 years, 6 months ago) by cgd
Branch: MAIN
CVS Tags: netbsd-0-9-base, netbsd-0-9-RELEASE, netbsd-0-9-BETA, netbsd-0-9-ALPHA2, netbsd-0-9-ALPHA, netbsd-0-9
Changes since 1.1: +0 -4 lines
Diff to previous 1.1 (colored)

changed to use new libcrypt scheme.

Revision 1.1.1.1 / (download) - annotate - [select for diffs] (vendor branch), Sun Mar 21 09:45:37 1993 UTC (21 years, 7 months ago) by cgd
Branch: WFJ-920714, CSRG
CVS Tags: patchkit-0-2-2, netbsd-alpha-1, netbsd-0-8, WFJ-386bsd-01
Changes since 1.1: +0 -0 lines
Diff to previous 1.1 (colored)

initial import of 386bsd-0.1 sources

Revision 1.1 / (download) - annotate - [select for diffs], Sun Mar 21 09:45:37 1993 UTC (21 years, 7 months ago) by cgd
Branch: MAIN

Initial revision

This form allows you to request diff's between any two revisions of a file. You may select a symbolic revision name using the selection box or you may type in a numeric name using the type-in text box.




CVSweb <webmaster@jp.NetBSD.org>