OpenBSD CVS

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


[BACK] Up to [local] / src / libexec / ftpd

Request diff between arbitrary revisions


Default branch: MAIN


Revision 1.234 / (download) - annotate - [select for diffs], Thu May 9 08:35:03 2024 UTC (4 weeks, 2 days ago) by florian
Branch: MAIN
CVS Tags: HEAD
Changes since 1.233: +6 -2 lines
Diff to previous 1.233 (colored)

ctime(3) and ctime_r(3) can fail when timestamps are way off.
Add missing error checks to all calls under libexec/

Input kettenis, millert
OK millert

Revision 1.233 / (download) - annotate - [select for diffs], Wed Mar 8 04:43:05 2023 UTC (15 months ago) by guenther
Branch: MAIN
CVS Tags: OPENBSD_7_5_BASE, OPENBSD_7_5, OPENBSD_7_4_BASE, OPENBSD_7_4, OPENBSD_7_3_BASE, OPENBSD_7_3
Changes since 1.232: +1 -5 lines
Diff to previous 1.232 (colored)

Delete obsolete /* ARGSUSED */ lint comments.

ok miod@ millert@

Revision 1.232 / (download) - annotate - [select for diffs], Sun May 23 17:01:21 2021 UTC (3 years ago) by jan
Branch: MAIN
CVS Tags: OPENBSD_7_2_BASE, OPENBSD_7_2, OPENBSD_7_1_BASE, OPENBSD_7_1, OPENBSD_7_0_BASE, OPENBSD_7_0
Changes since 1.231: +24 -24 lines
Diff to previous 1.231 (colored)

Constify function parameters.

OK martijn@

Revision 1.231 / (download) - annotate - [select for diffs], Sat May 22 14:30:46 2021 UTC (3 years ago) by jan
Branch: MAIN
Changes since 1.230: +1 -5 lines
Diff to previous 1.230 (colored)

Remove useless fflush(3) calls.  lreply() already called fflush(3).

OK martijn@

Revision 1.230 / (download) - annotate - [select for diffs], Thu May 20 15:21:03 2021 UTC (3 years ago) by jan
Branch: MAIN
Changes since 1.229: +2 -2 lines
Diff to previous 1.229 (colored)

Removes the useless FILE* parameter of get_line().
While here fix minor whitespace mistake.

"looks fine to me" chris@

Revision 1.229 / (download) - annotate - [select for diffs], Wed Jan 15 22:06:59 2020 UTC (4 years, 4 months ago) by jan
Branch: MAIN
CVS Tags: OPENBSD_6_9_BASE, OPENBSD_6_9, OPENBSD_6_8_BASE, OPENBSD_6_8, OPENBSD_6_7_BASE, OPENBSD_6_7
Changes since 1.228: +3 -3 lines
Diff to previous 1.228 (colored)

Simplify globbing of ftpd(8)s list and nlst commands.
Also avoid command option injection for ls(1).

OK martijn@

Revision 1.228 / (download) - annotate - [select for diffs], Wed Jul 3 03:24:04 2019 UTC (4 years, 11 months ago) by deraadt
Branch: MAIN
CVS Tags: OPENBSD_6_6_BASE, OPENBSD_6_6
Changes since 1.227: +2 -2 lines
Diff to previous 1.227 (colored)

snprintf/vsnprintf return < 0 on error, rather than -1.

Revision 1.227 / (download) - annotate - [select for diffs], Fri Jun 28 13:32:53 2019 UTC (4 years, 11 months ago) by deraadt
Branch: MAIN
Changes since 1.226: +56 -56 lines
Diff to previous 1.226 (colored)

When system calls indicate an error they return -1, not some arbitrary
value < 0.  errno is only updated in this case.  Change all (most?)
callers of syscalls to follow this better, and let's see if this strictness
helps us in the future.

Revision 1.226 / (download) - annotate - [select for diffs], Wed May 8 23:56:48 2019 UTC (5 years, 1 month ago) by tedu
Branch: MAIN
Changes since 1.225: +11 -18 lines
Diff to previous 1.225 (colored)

rm dead code and simplify ftpd_popen. this code has only called
its statically linked ls_main for some time now.
from Jan Klemkow
ok deraadt

Revision 1.225 / (download) - annotate - [select for diffs], Tue Dec 11 18:19:55 2018 UTC (5 years, 5 months ago) by bluhm
Branch: MAIN
CVS Tags: OPENBSD_6_5_BASE, OPENBSD_6_5
Changes since 1.224: +2 -2 lines
Diff to previous 1.224 (colored)

Flip snprintf(3) error check to align it with the man page example.
No functional change.
suggested by tb@; from Jan Klemkow

Revision 1.224 / (download) - annotate - [select for diffs], Tue Dec 11 18:03:11 2018 UTC (5 years, 5 months ago) by bluhm
Branch: MAIN
Changes since 1.223: +7 -6 lines
Diff to previous 1.223 (colored)

Convert some variables with non-negative values to unsigned type
to avoid comparison of integers of different signs.
from Jan Klemkow; OK tb@

Revision 1.223 / (download) - annotate - [select for diffs], Sat Sep 3 15:00:48 2016 UTC (7 years, 9 months ago) by jca
Branch: MAIN
CVS Tags: OPENBSD_6_4_BASE, OPENBSD_6_4, OPENBSD_6_3_BASE, OPENBSD_6_3, OPENBSD_6_2_BASE, OPENBSD_6_2, OPENBSD_6_1_BASE, OPENBSD_6_1
Changes since 1.222: +13 -12 lines
Diff to previous 1.222 (colored)

Use a single "opt" variable for all setsockopt calls in getdatasock().

on = 65536;
if (setsockopt(... &on ...)

is slightly misleading.

Revision 1.222 / (download) - annotate - [select for diffs], Sat Sep 3 14:53:20 2016 UTC (7 years, 9 months ago) by jca
Branch: MAIN
Changes since 1.221: +21 -7 lines
Diff to previous 1.221 (colored)

Set "lowdelay" and "throughput" Traffic Class on command & data IPv6 sockets.

Revision 1.221 / (download) - annotate - [select for diffs], Wed Aug 31 13:43:36 2016 UTC (7 years, 9 months ago) by jca
Branch: MAIN
Changes since 1.220: +5 -37 lines
Diff to previous 1.220 (colored)

Don't attempt to support IPv4-mapped IPv6 addresses.

We don't consider support for those addreses as desirable, so let's not
give a bad example by keeping application code to handle them.  This is
dead code on OpenBSD anyway since we do not support IPv4-mapped stuff.
But let's keep the check to log and warn the admin if the code gets
ported elsewhere.  Porters of this code should ensure that IPv6 sockets
can't see IPv4-mapped addresses by using the IPV6_V6ONLY sockopt.

Discussed with & ok tedu@

For a rationale, see https://tools.ietf.org/html/draft-itojun-v6ops-v4mapped-harmful-02

Revision 1.220 / (download) - annotate - [select for diffs], Tue Aug 30 14:56:39 2016 UTC (7 years, 9 months ago) by tedu
Branch: MAIN
Changes since 1.219: +1 -16 lines
Diff to previous 1.219 (colored)

remove ifdef for all the features we have.
retain disabled ip4in6 code until its future is decided.
ok deraadt jca

Revision 1.219 / (download) - annotate - [select for diffs], Fri Aug 26 06:32:10 2016 UTC (7 years, 9 months ago) by tedu
Branch: MAIN
Changes since 1.218: +2 -6 lines
Diff to previous 1.218 (colored)

trim down some NBBY references. 8 bits ought to be enough for anyone.

Revision 1.218 / (download) - annotate - [select for diffs], Sun Aug 14 22:56:29 2016 UTC (7 years, 9 months ago) by guenther
Branch: MAIN
Changes since 1.217: +23 -23 lines
Diff to previous 1.217 (colored)

Convert %q to %ll with long long casts for printf()
Delete pointless casts to off_t, void*, and uid_t

ok krw@

Revision 1.217 / (download) - annotate - [select for diffs], Mon Jul 4 03:24:48 2016 UTC (7 years, 11 months ago) by guenther
Branch: MAIN
CVS Tags: OPENBSD_6_0_BASE, OPENBSD_6_0
Changes since 1.216: +16 -14 lines
Diff to previous 1.216 (colored)

Use fstatat() instead of crafting a filename to use with stat()

ok millert@

Revision 1.216 / (download) - annotate - [select for diffs], Wed May 4 19:48:08 2016 UTC (8 years, 1 month ago) by jca
Branch: MAIN
Changes since 1.215: +1 -5 lines
Diff to previous 1.215 (colored)

Kill #ifdef INET6 occurrences in userland.

Prompted by and ok millert@

(tcpdump and libpcap left untouched, the #ifdef force is too strong with
those)

Revision 1.215 / (download) - annotate - [select for diffs], Mon Apr 25 15:43:34 2016 UTC (8 years, 1 month ago) by deraadt
Branch: MAIN
Changes since 1.214: +3 -3 lines
Diff to previous 1.214 (colored)

prefer setres{u,g}id() rather than manipulating both real and effective
ids, it clarifies these are full revocation situations.
ok millert

Revision 1.214 / (download) - annotate - [select for diffs], Wed Apr 6 07:14:17 2016 UTC (8 years, 2 months ago) by semarie
Branch: MAIN
Changes since 1.213: +8 -7 lines
Diff to previous 1.213 (colored)

compare pointer to NULL instead of 0

from fritjof ! alokat.org

ok ratchov@ natano@

Revision 1.213 / (download) - annotate - [select for diffs], Wed Mar 16 15:41:10 2016 UTC (8 years, 2 months ago) by krw
Branch: MAIN
Changes since 1.212: +2 -2 lines
Diff to previous 1.212 (colored)

More "(<blah> *)0" -> NULL, avoiding any stdarg functions.

Feedback millert@ kettenis@

Revision 1.212 / (download) - annotate - [select for diffs], Sat Dec 12 20:09:28 2015 UTC (8 years, 5 months ago) by mmcc
Branch: MAIN
CVS Tags: OPENBSD_5_9_BASE, OPENBSD_5_9
Changes since 1.211: +6 -11 lines
Diff to previous 1.211 (colored)

Remove NULL-checks before free(). ok tb@

Revision 1.211 / (download) - annotate - [select for diffs], Mon Nov 16 17:31:14 2015 UTC (8 years, 6 months ago) by tedu
Branch: MAIN
Changes since 1.210: +1 -9 lines
Diff to previous 1.210 (colored)

don't need to ifdef setproctitle

Revision 1.210 / (download) - annotate - [select for diffs], Sun Oct 25 23:10:53 2015 UTC (8 years, 7 months ago) by millert
Branch: MAIN
Changes since 1.209: +1 -5 lines
Diff to previous 1.209 (colored)

No longer create /var/run/ftpd.pid in daemon mode; OK jung@ jca@

Revision 1.209 / (download) - annotate - [select for diffs], Sun Oct 4 11:58:09 2015 UTC (8 years, 8 months ago) by tedu
Branch: MAIN
Changes since 1.208: +14 -10 lines
Diff to previous 1.208 (colored)

fix custom popen to return pid to caller instead of tracking in a giant
array. this implies we can't use a function pointer for close, but also
means we get to repair some abuse of the comma operator.
ok miod

Revision 1.208 / (download) - annotate - [select for diffs], Tue Sep 1 06:50:53 2015 UTC (8 years, 9 months ago) by jsg
Branch: MAIN
Changes since 1.207: +4 -4 lines
Diff to previous 1.207 (colored)

test pointers with NULL not '\0'

Revision 1.207 / (download) - annotate - [select for diffs], Mon Jan 19 01:24:39 2015 UTC (9 years, 4 months ago) by deraadt
Branch: MAIN
CVS Tags: OPENBSD_5_8_BASE, OPENBSD_5_8, OPENBSD_5_7_BASE, OPENBSD_5_7
Changes since 1.206: +2 -6 lines
Diff to previous 1.206 (colored)

CMASK went out of scope with the recent <sys/param.h> removal.  But oh
golly gee, ftpd can handle that itself due to the glorious old practice
of #ifndef #define.  Remove that junk.
ok guenther

Revision 1.206 / (download) - annotate - [select for diffs], Fri Jan 16 06:39:50 2015 UTC (9 years, 4 months ago) by deraadt
Branch: MAIN
Changes since 1.205: +18 -18 lines
Diff to previous 1.205 (colored)

Replace <sys/param.h> with <limits.h> and other less dirty headers where
possible.  Annotate <sys/param.h> lines with their current reasons.  Switch
to PATH_MAX, NGROUPS_MAX, HOST_NAME_MAX+1, LOGIN_NAME_MAX, etc.  Change
MIN() and MAX() to local definitions of MINIMUM() and MAXIMUM() where
sensible to avoid pulling in the pollution.  These are the files confirmed
through binary verification.
ok guenther, millert, doug (helped with the verification protocol)

Revision 1.205 / (download) - annotate - [select for diffs], Sat Oct 25 03:19:22 2014 UTC (9 years, 7 months ago) by lteo
Branch: MAIN
Changes since 1.204: +1 -2 lines
Diff to previous 1.204 (colored)

Remove unnecessary netinet/in_systm.h include.

ok millert@

Revision 1.204 / (download) - annotate - [select for diffs], Mon Aug 25 07:50:25 2014 UTC (9 years, 9 months ago) by doug
Branch: MAIN
Changes since 1.203: +2 -2 lines
Diff to previous 1.203 (colored)

Delete secret or secret-derived data with explicit_bzero.

concept ok deraadt@
diff looks ok tedu@

Revision 1.203 / (download) - annotate - [select for diffs], Mon Mar 24 16:41:27 2014 UTC (10 years, 2 months ago) by tedu
Branch: MAIN
CVS Tags: OPENBSD_5_6_BASE, OPENBSD_5_6
Changes since 1.202: +1 -49 lines
Diff to previous 1.202 (colored)

remove tcpwrappers support. ok deraadt

Revision 1.202 / (download) - annotate - [select for diffs], Mon Mar 17 23:23:37 2014 UTC (10 years, 2 months ago) by sthen
Branch: MAIN
Changes since 1.201: +2 -2 lines
Diff to previous 1.201 (colored)

args! fix argstr. from LEVAI Daniel.

Revision 1.201 / (download) - annotate - [select for diffs], Mon Mar 17 21:02:49 2014 UTC (10 years, 2 months ago) by sthen
Branch: MAIN
Changes since 1.200: +2 -2 lines
Diff to previous 1.200 (colored)

typo, spotted by okan@

Revision 1.200 / (download) - annotate - [select for diffs], Mon Mar 17 20:54:10 2014 UTC (10 years, 2 months ago) by sthen
Branch: MAIN
Changes since 1.199: +22 -2 lines
Diff to previous 1.199 (colored)

Add an option to disallow ftp access to accounts with uid below a certain
number (idea borrowed from pure-ftpd). Enabled by default with minimum uid
1000 to prevent access to admin accounts. tweak/OK millert@, OK deraadt@,
gsoares@ and aja@ like it too.

Revision 1.199 / (download) - annotate - [select for diffs], Wed Jan 8 17:31:36 2014 UTC (10 years, 5 months ago) by jca
Branch: MAIN
CVS Tags: OPENBSD_5_5_BASE, OPENBSD_5_5
Changes since 1.198: +7 -1 lines
Diff to previous 1.198 (colored)

If the file size is zero, there's nothing to transmit so avoid spamming
syslog with mmap failures.  Noticed by and ok henning@, "looks right"
deraadt@

Revision 1.198 / (download) - annotate - [select for diffs], Thu Aug 22 04:43:40 2013 UTC (10 years, 9 months ago) by guenther
Branch: MAIN
Changes since 1.197: +3 -3 lines
Diff to previous 1.197 (colored)

Correct format string mismatches turned up by -Wformat=2

suggestions and ok millert@

Revision 1.197 / (download) - annotate - [select for diffs], Fri Jul 26 18:13:02 2013 UTC (10 years, 10 months ago) by guenther
Branch: MAIN
CVS Tags: OPENBSD_5_4_BASE, OPENBSD_5_4
Changes since 1.196: +2 -2 lines
Diff to previous 1.196 (colored)

Make sure tmpline[] is always NUL terminated, to avoid possible
read-beyond-end in get_line().

Analysis and patch by Maxime Villard (rustyBSD (at) gmx.fr)
ok millert@ deraadt@

Revision 1.196 / (download) - annotate - [select for diffs], Tue Dec 4 02:24:47 2012 UTC (11 years, 6 months ago) by deraadt
Branch: MAIN
CVS Tags: OPENBSD_5_3_BASE, OPENBSD_5_3
Changes since 1.195: +1 -2 lines
Diff to previous 1.195 (colored)

remove some unnecessary sys/param.h inclusions

Revision 1.195 / (download) - annotate - [select for diffs], Sun Mar 4 04:05:15 2012 UTC (12 years, 3 months ago) by fgsch
Branch: MAIN
CVS Tags: OPENBSD_5_2_BASE, OPENBSD_5_2
Changes since 1.194: +2 -2 lines
Diff to previous 1.194 (colored)

In preparation for getline and getdelim additions to libc, rename getline()
occurrences to get_line().
Based on a diff from Jan Klemkow <j-dot-klemkow-at-wemelug-dot-de> to tech.

Revision 1.194 / (download) - annotate - [select for diffs], Wed Dec 14 18:01:55 2011 UTC (12 years, 5 months ago) by ajacoutot
Branch: MAIN
CVS Tags: OPENBSD_5_1_BASE, OPENBSD_5_1
Changes since 1.193: +19 -6 lines
Diff to previous 1.193 (colored)

Add a new '-W' option to prevent saving login records to /var/run/wtmp.
This can become pretty handy on busy anonymous servers to avoid filling
up /var with unused wtmp records.
Note that 'U' and 'W' are mutually exclusive.

ok sthen@ millert@

Revision 1.193 / (download) - annotate - [select for diffs], Wed Feb 9 21:13:31 2011 UTC (13 years, 4 months ago) by millert
Branch: MAIN
CVS Tags: OPENBSD_5_0_BASE, OPENBSD_5_0, OPENBSD_4_9_BASE, OPENBSD_4_9
Changes since 1.192: +18 -3 lines
Diff to previous 1.192 (colored)

Set SO_KEEPALIVE on sockets.  OK miod@.  Also tested by landry@
"Makes sense" markus@ and "i don't see a reason not to" henning@

Revision 1.192 / (download) - annotate - [select for diffs], Fri Aug 27 12:00:21 2010 UTC (13 years, 9 months ago) by lum
Branch: MAIN
Changes since 1.191: +1 -9 lines
Diff to previous 1.191 (colored)

In revision 1.14 of ftpd.c the ident variable was removed from its only meaningful usage when a snprintf call was removed, rendering ident useless. Time to remove remaining code.

ok tobias@

Revision 1.191 / (download) - annotate - [select for diffs], Sun Aug 1 16:53:57 2010 UTC (13 years, 10 months ago) by tobias
Branch: MAIN
CVS Tags: OPENBSD_4_8_BASE, OPENBSD_4_8
Changes since 1.190: +2 -1 lines
Diff to previous 1.190 (colored)

Properly reset states when a login phase is interrupted by another one.
Prevents ftpd from letting regular users logging in during anonymous-only
mode (-A).

ok millert, ray

Revision 1.190 / (download) - annotate - [select for diffs], Fri Jul 30 11:02:56 2010 UTC (13 years, 10 months ago) by ray
Branch: MAIN
Changes since 1.189: +9 -7 lines
Diff to previous 1.189 (colored)

Don't set "success" flags before error checks.
Add check for login_getclass() failure, pointed out by tobias.

OK tobias

Revision 1.189 / (download) - annotate - [select for diffs], Fri Jun 18 06:02:57 2010 UTC (13 years, 11 months ago) by tobias
Branch: MAIN
Changes since 1.188: +5 -1 lines
Diff to previous 1.188 (colored)

Prevent a segmentation fault on ftpd_popen error (memory, file descriptor,
pipe ...) during status command.

ok millert

Revision 1.188 / (download) - annotate - [select for diffs], Sun Jun 13 15:27:46 2010 UTC (13 years, 11 months ago) by tobias
Branch: MAIN
Changes since 1.187: +4 -4 lines
Diff to previous 1.187 (colored)

Adjust FTP reply codes (in error conditions) to conform to RFC 959.

ok millert, schwarze

Revision 1.187 / (download) - annotate - [select for diffs], Tue Oct 27 23:59:31 2009 UTC (14 years, 7 months ago) by deraadt
Branch: MAIN
CVS Tags: OPENBSD_4_7_BASE, OPENBSD_4_7
Changes since 1.186: +1 -16 lines
Diff to previous 1.186 (colored)

rcsid[] and sccsid[] and copyright[] are essentially unmaintained (and
unmaintainable).  these days, people use source.  these id's do not provide
any benefit, and do hurt the small install media
(the 33,000 line diff is essentially mechanical)
ok with the idea millert, ok dms

Revision 1.186 / (download) - annotate - [select for diffs], Mon Apr 20 21:04:25 2009 UTC (15 years, 1 month ago) by schwarze
Branch: MAIN
CVS Tags: OPENBSD_4_6_BASE, OPENBSD_4_6
Changes since 1.185: +9 -4 lines
Diff to previous 1.185 (colored)

When receiving a new connection, log the remote IP number
in addition to the remote hostname.

Feature requested by Mark Bucciarelli mkbucc at gmail dot com on misc@.
"seems OK" millert@

Revision 1.185 / (download) - annotate - [select for diffs], Tue Sep 30 16:16:21 2008 UTC (15 years, 8 months ago) by deraadt
Branch: MAIN
CVS Tags: OPENBSD_4_5_BASE, OPENBSD_4_5
Changes since 1.184: +3 -6 lines
Diff to previous 1.184 (colored)

Always say "User %s access denied", in all cases, to avoid some stupid
spinny things which parse those messages.  Do not close the connection
as requested by Josh Grosse, since a 530 is not supposed to do that.
ok millert

Revision 1.184 / (download) - annotate - [select for diffs], Fri Sep 12 16:12:08 2008 UTC (15 years, 8 months ago) by moritz
Branch: MAIN
Changes since 1.183: +8 -3 lines
Diff to previous 1.183 (colored)

Don't split large commands into multiple commands on a 512-byte
boundary but 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>.

ok millert@ martynas@

Revision 1.183 / (download) - annotate - [select for diffs], Mon Jun 30 12:03:51 2008 UTC (15 years, 11 months ago) by ragge
Branch: MAIN
CVS Tags: OPENBSD_4_4_BASE, OPENBSD_4_4
Changes since 1.182: +3 -3 lines
Diff to previous 1.182 (colored)

Include file order must be "monitor.h" before "extern.h" otherwise enum
auth_ret is referenced before it is declared, which is not allowed by C99.

Ok krw@, millert@, gilles@

Revision 1.182 / (download) - annotate - [select for diffs], Sun Apr 13 00:22:16 2008 UTC (16 years, 2 months ago) by djm
Branch: MAIN
Changes since 1.181: +3 -3 lines
Diff to previous 1.181 (colored)

Use arc4random_buf() when requesting more than a single word of output

Use arc4random_uniform() when the desired random number upper bound
is not a power of two

ok deraadt@ millert@

Revision 1.181 / (download) - annotate - [select for diffs], Sun Sep 2 15:19:20 2007 UTC (16 years, 9 months ago) by deraadt
Branch: MAIN
CVS Tags: OPENBSD_4_3_BASE, OPENBSD_4_3
Changes since 1.180: +4 -4 lines
Diff to previous 1.180 (colored)

use calloc() to avoid malloc(n * m) overflows; checked by djm canacar jsg

Revision 1.180 / (download) - annotate - [select for diffs], Tue Jul 31 03:35:04 2007 UTC (16 years, 10 months ago) by ray
Branch: MAIN
CVS Tags: OPENBSD_4_2_BASE, OPENBSD_4_2
Changes since 1.179: +32 -25 lines
Diff to previous 1.179 (colored)

From Gilles Chehade:
 - Use strtonum instead of atoi.
 - Improve strtol error checking.
 - Change strchr calls to strcspn and eliminating some unused
   variables as a result.

OK moritz

Revision 1.179 / (download) - annotate - [select for diffs], Fri Jul 27 14:12:46 2007 UTC (16 years, 10 months ago) by moritz
Branch: MAIN
Changes since 1.178: +3 -3 lines
Diff to previous 1.178 (colored)

Fix potential memory leak, when snprintf(3) returns an empty buffer.

OK ray@

Revision 1.178 / (download) - annotate - [select for diffs], Thu Jun 21 02:22:51 2007 UTC (16 years, 11 months ago) by ray
Branch: MAIN
Changes since 1.177: +5 -9 lines
Diff to previous 1.177 (colored)

Adjust spacing, combine malloc + strlcpy + strlcat into a single
asprintf call.

OK moritz

Revision 1.177 / (download) - annotate - [select for diffs], Tue Jun 19 06:48:23 2007 UTC (16 years, 11 months ago) by ray
Branch: MAIN
Changes since 1.176: +22 -19 lines
Diff to previous 1.176 (colored)

Make sure perror_reply() is only called when errno is set.  When
changing perror_reply() -> reply(), increase error message detail
for ftp client.  Move free() statement to prevent errno clobbering.

OK moritz

Revision 1.176 / (download) - annotate - [select for diffs], Thu Mar 22 15:53:10 2007 UTC (17 years, 2 months ago) by cloder
Branch: MAIN
Changes since 1.175: +5 -8 lines
Diff to previous 1.175 (colored)

Do not advertise version in the ftp banner, because there is no reason to.
OK mbalmer@, xsa@, henning@, idea prompted by deraadt

Revision 1.175 / (download) - annotate - [select for diffs], Thu Mar 1 20:06:27 2007 UTC (17 years, 3 months ago) by otto
Branch: MAIN
CVS Tags: OPENBSD_4_1_BASE, OPENBSD_4_1
Changes since 1.174: +11 -8 lines
Diff to previous 1.174 (colored)

- use proper log facility and priority in the slave sig handlers
- if the monitor decides to kill the slave, log that
ok millert@ moritz@

Revision 1.174 / (download) - annotate - [select for diffs], Thu Dec 21 02:28:47 2006 UTC (17 years, 5 months ago) by krw
Branch: MAIN
Changes since 1.173: +3 -3 lines
Diff to previous 1.173 (colored)

'tranfer' -> 'transfer' in comments.

Revision 1.173 / (download) - annotate - [select for diffs], Wed Oct 18 21:46:09 2006 UTC (17 years, 7 months ago) by millert
Branch: MAIN
Changes since 1.172: +5 -4 lines
Diff to previous 1.172 (colored)

Avoid double fclose() of a file if we exceed retries.  Coverity ID 2669.
OK cloder@

Revision 1.172 / (download) - annotate - [select for diffs], Wed Oct 18 21:23:28 2006 UTC (17 years, 7 months ago) by deraadt
Branch: MAIN
Changes since 1.171: +3 -3 lines
Diff to previous 1.171 (colored)

you do not call fclose() on a file descriptor; ok cloder

Revision 1.171 / (download) - annotate - [select for diffs], Fri Apr 21 17:42:50 2006 UTC (18 years, 1 month ago) by deraadt
Branch: MAIN
CVS Tags: OPENBSD_4_0_BASE, OPENBSD_4_0
Changes since 1.170: +60 -80 lines
Diff to previous 1.170 (colored)

lint cleanup; ok ray moritz dhill

Revision 1.170 / (download) - annotate - [select for diffs], Sat Dec 3 18:23:30 2005 UTC (18 years, 6 months ago) by deraadt
Branch: MAIN
CVS Tags: OPENBSD_3_9_BASE, OPENBSD_3_9
Changes since 1.169: +5 -11 lines
Diff to previous 1.169 (colored)

remove shadowing variables; ok pval

Revision 1.169 / (download) - annotate - [select for diffs], Thu Dec 1 17:36:59 2005 UTC (18 years, 6 months ago) by pvalchev
Branch: MAIN
Changes since 1.168: +4 -4 lines
Diff to previous 1.168 (colored)

fix double var declarations in same scope, found by lint; ok deraadt cloder

Revision 1.168 / (download) - annotate - [select for diffs], Mon Aug 22 17:49:37 2005 UTC (18 years, 9 months ago) by mickey
Branch: MAIN
CVS Tags: OPENBSD_3_8_BASE, OPENBSD_3_8
Changes since 1.167: +14 -8 lines
Diff to previous 1.167 (colored)

EOF in ascii mode may also mean EOF so avoid printing a bogus error and behave same as bin mode; beck@ deraadt@ millert@ ok

Revision 1.163.2.1 / (download) - annotate - [select for diffs], Thu Jul 14 23:34:32 2005 UTC (18 years, 10 months ago) by brad
Branch: OPENBSD_3_7
Changes since 1.163: +3 -3 lines
Diff to previous 1.163 (colored) next main 1.164 (colored)

MFC:
Fix by moritz@

let root create the data socket. fixes PR 4287.

ok deraadt@

Revision 1.167 / (download) - annotate - [select for diffs], Thu Jul 14 14:48:47 2005 UTC (18 years, 10 months ago) by moritz
Branch: MAIN
Changes since 1.166: +3 -3 lines
Diff to previous 1.166 (colored)

let root create the data socket. fixes PR 4287.
ok millert@ henning@

Revision 1.166 / (download) - annotate - [select for diffs], Tue May 24 02:24:57 2005 UTC (19 years ago) by moritz
Branch: MAIN
Changes since 1.165: +3 -2 lines
Diff to previous 1.165 (colored)

readd endpwent()

Revision 1.165 / (download) - annotate - [select for diffs], Tue May 24 02:12:40 2005 UTC (19 years ago) by moritz
Branch: MAIN
Changes since 1.164: +2 -3 lines
Diff to previous 1.164 (colored)

no need for endpwent()

Revision 1.164 / (download) - annotate - [select for diffs], Thu Apr 21 00:12:20 2005 UTC (19 years, 1 month ago) by deraadt
Branch: MAIN
Changes since 1.163: +6 -5 lines
Diff to previous 1.163 (colored)

make code prettier so we can tell it is safe when we read it; ok beck cloder

Revision 1.163 / (download) - annotate - [select for diffs], Tue Mar 15 12:22:58 2005 UTC (19 years, 2 months ago) by niallo
Branch: MAIN
CVS Tags: OPENBSD_3_7_BASE
Branch point for: OPENBSD_3_7
Changes since 1.162: +26 -13 lines
Diff to previous 1.162 (colored)

better handling of cases where getnameinfo() returns non-zero.
upon failure, don't try to print the contents of the char buffers we passed it.

ok & feedback henning@, moritz@ (thanks!)

Revision 1.162 / (download) - annotate - [select for diffs], Mon Dec 6 23:04:14 2004 UTC (19 years, 6 months ago) by deraadt
Branch: MAIN
Changes since 1.161: +29 -2 lines
Diff to previous 1.161 (colored)

seperate reply_r, like earlier change but safer; moritz ok

Revision 1.161 / (download) - annotate - [select for diffs], Sat Dec 4 18:00:43 2004 UTC (19 years, 6 months ago) by deraadt
Branch: MAIN
Changes since 1.160: +15 -15 lines
Diff to previous 1.160 (colored)

reply() used to play a lot with stdout, expecially fflush(stdout).
The recent change is to avoid stdio.  That's good, except there are
nearly 130 calls to this function, yet what if one of them depended on
fflush() or something else in this code?  The semantic change was
never checked.  That is not how we do development -- back this out
until we know that checking work has been done.

Revision 1.160 / (download) - annotate - [select for diffs], Fri Dec 3 23:57:40 2004 UTC (19 years, 6 months ago) by moritz
Branch: MAIN
Changes since 1.159: +17 -17 lines
Diff to previous 1.159 (colored)

make reply() reentrant. fixes a signal race.
ok henning@

Revision 1.159 / (download) - annotate - [select for diffs], Sun Nov 28 22:29:44 2004 UTC (19 years, 6 months ago) by henning
Branch: MAIN
Changes since 1.158: +5 -5 lines
Diff to previous 1.158 (colored)

logging fixes:
-don't prefix ftpd: in syslog(), it does that for us
-replace a bad (too late) err() by syslog + exit
from moritz

Revision 1.158 / (download) - annotate - [select for diffs], Sun Nov 28 19:36:48 2004 UTC (19 years, 6 months ago) by henning
Branch: MAIN
Changes since 1.157: +3 -3 lines
Diff to previous 1.157 (colored)

bump version

Revision 1.157 / (download) - annotate - [select for diffs], Sun Nov 28 19:12:31 2004 UTC (19 years, 6 months ago) by henning
Branch: MAIN
Changes since 1.156: +3 -3 lines
Diff to previous 1.156 (colored)

fix ttyline setting, fixes proctitle.
notice independently by theo and pval, fix from moritz jodeit

Revision 1.156 / (download) - annotate - [select for diffs], Sun Nov 28 18:49:29 2004 UTC (19 years, 6 months ago) by henning
Branch: MAIN
Changes since 1.155: +84 -47 lines
Diff to previous 1.155 (colored)

privilege seperate ftpd
handle the pre-authentication phase (minus a tiny tiny tiny amount
of code after accept()) in an unprivileged process, asking the
privileged monitor for help where needed.
work by Moritz Jodeit <moritz@jodeit.org> with help from theo and me
tests theo ian@ matthieu@ ben@networkinsanity.com a.schlichting@lemarit.com

Revision 1.155 / (download) - annotate - [select for diffs], Mon Nov 22 00:05:15 2004 UTC (19 years, 6 months ago) by millert
Branch: MAIN
Changes since 1.154: +6 -3 lines
Diff to previous 1.154 (colored)

More sensible error when both the -n and -A flags are used.  Text OK jmc@

Revision 1.154 / (download) - annotate - [select for diffs], Thu Sep 30 20:33:52 2004 UTC (19 years, 8 months ago) by deraadt
Branch: MAIN
Changes since 1.153: +7 -5 lines
Diff to previous 1.153 (colored)

cope nicer with accept() failures, from freebsd; millert ok

Revision 1.145.2.2 / (download) - annotate - [select for diffs], Tue Dec 23 01:41:00 2003 UTC (20 years, 5 months ago) by brad
Branch: OPENBSD_3_4
Changes since 1.145.2.1: +4 -2 lines
Diff to previous 1.145.2.1 (colored) to branchpoint 1.145 (colored) next main 1.146 (colored)

MFC:
Fix by beck@

fix PR 3596 by making root create the socket

ok deraadt@ beck@

Revision 1.140.2.2 / (download) - annotate - [select for diffs], Sat Dec 20 20:44:29 2003 UTC (20 years, 5 months ago) by margarida
Branch: OPENBSD_3_3
Changes since 1.140.2.1: +4 -2 lines
Diff to previous 1.140.2.1 (colored) to branchpoint 1.140 (colored) next main 1.141 (colored)

Pull patch from -current:
Fix by beck@

fix PR 3596 by making root create the socket

ok deraadt@ beck@

Revision 1.153 / (download) - annotate - [select for diffs], Fri Dec 12 19:45:22 2003 UTC (20 years, 6 months ago) by deraadt
Branch: MAIN
CVS Tags: OPENBSD_3_6_BASE, OPENBSD_3_6, OPENBSD_3_5_BASE, OPENBSD_3_5
Changes since 1.152: +9 -8 lines
Diff to previous 1.152 (colored)

knf

Revision 1.152 / (download) - annotate - [select for diffs], Wed Dec 10 22:57:12 2003 UTC (20 years, 6 months ago) by deraadt
Branch: MAIN
Changes since 1.151: +12 -12 lines
Diff to previous 1.151 (colored)

spacing

Revision 1.151 / (download) - annotate - [select for diffs], Tue Dec 9 22:55:47 2003 UTC (20 years, 6 months ago) by deraadt
Branch: MAIN
Changes since 1.150: +3 -3 lines
Diff to previous 1.150 (colored)

knf

Revision 1.150 / (download) - annotate - [select for diffs], Tue Dec 9 07:22:10 2003 UTC (20 years, 6 months ago) by beck
Branch: MAIN
Changes since 1.149: +4 -2 lines
Diff to previous 1.149 (colored)

fix PR 3596 by making root create the socket, ok millert@

Revision 1.140.2.1 / (download) - annotate - [select for diffs], Thu Nov 20 22:50:32 2003 UTC (20 years, 6 months ago) by margarida
Branch: OPENBSD_3_3
Changes since 1.140: +63 -63 lines
Diff to previous 1.140 (colored)

MFC:
Fix by millert@

Don't hold on to the bind() while we loop around waiting to see if we can
make our connection.  Adapted from FreeBSD via danh@

ok millert@

Revision 1.145.2.1 / (download) - annotate - [select for diffs], Thu Nov 20 20:44:27 2003 UTC (20 years, 6 months ago) by brad
Branch: OPENBSD_3_4
Changes since 1.145: +63 -63 lines
Diff to previous 1.145 (colored)

MFC:
Fix by millert@

Don't hold on to the bind() while we loop around waiting to see if we can
make our connection.  Adapted from FreeBSD via danh@

ok millert@

Revision 1.149 / (download) - annotate - [select for diffs], Thu Nov 20 12:32:34 2003 UTC (20 years, 6 months ago) by jmc
Branch: MAIN
Changes since 1.148: +3 -3 lines
Diff to previous 1.148 (colored)

ftpd.8:
- simpler macros
- sort options
- some updates

ftpd.c:
- sync usage()

Revision 1.148 / (download) - annotate - [select for diffs], Wed Nov 12 19:32:01 2003 UTC (20 years, 7 months ago) by millert
Branch: MAIN
Changes since 1.147: +63 -63 lines
Diff to previous 1.147 (colored)

Don't hold on to the bind() while we loop around waiting to see if we can
make our connection.  Adapted from FreeBSD via danh@

Revision 1.147 / (download) - annotate - [select for diffs], Wed Oct 1 08:06:31 2003 UTC (20 years, 8 months ago) by itojun
Branch: MAIN
Changes since 1.146: +82 -48 lines
Diff to previous 1.146 (colored)

listen to bodh IPv4/v6 ftp port on -D by default.  deraadt ok.
comments from markus, millert.  tested by fries

Revision 1.146 / (download) - annotate - [select for diffs], Tue Sep 30 06:13:08 2003 UTC (20 years, 8 months ago) by jmc
Branch: MAIN
Changes since 1.145: +3 -3 lines
Diff to previous 1.145 (colored)

usage():

- add missing -n (from Jeff Ito PR 3496)
- remove deprecated -h
- sort -T and -t to match man page

Revision 1.145 / (download) - annotate - [select for diffs], Tue Jul 29 18:39:22 2003 UTC (20 years, 10 months ago) by deraadt
Branch: MAIN
CVS Tags: OPENBSD_3_4_BASE
Branch point for: OPENBSD_3_4
Changes since 1.144: +4 -4 lines
Diff to previous 1.144 (colored)

spaces

Revision 1.144 / (download) - annotate - [select for diffs], Mon Jul 7 03:18:11 2003 UTC (20 years, 11 months ago) by deraadt
Branch: MAIN
Changes since 1.143: +5 -5 lines
Diff to previous 1.143 (colored)

make this match protos; millert ok

Revision 1.143 / (download) - annotate - [select for diffs], Wed Jun 11 14:24:46 2003 UTC (21 years ago) by deraadt
Branch: MAIN
Changes since 1.142: +44 -94 lines
Diff to previous 1.142 (colored)

ansi cleanup; ok ian markus

Revision 1.142 / (download) - annotate - [select for diffs], Mon Jun 2 19:38:24 2003 UTC (21 years ago) by millert
Branch: MAIN
Changes since 1.141: +3 -7 lines
Diff to previous 1.141 (colored)

Remove the advertising clause in the UCB license which Berkeley
rescinded 22 July 1999.  Proofed by myself and Theo.

Revision 1.141 / (download) - annotate - [select for diffs], Thu Apr 10 00:04:58 2003 UTC (21 years, 2 months ago) by millert
Branch: MAIN
Changes since 1.140: +25 -28 lines
Diff to previous 1.140 (colored)

Replace strcpy() w/ strlcpy() from espie@

Don't try to free pw_dir -- it is no longer allocated separately.
Instead, add an extra param to sgetpwnam() to allow it to dupe an
existing struct passwd * (instead of doing a lookup by username)
and use this to reallocate pw in the case where pw_dir is the NULL
string.  deraadt@ OK

Revision 1.140 / (download) - annotate - [select for diffs], Mon Feb 17 06:52:58 2003 UTC (21 years, 3 months ago) by mpech
Branch: MAIN
CVS Tags: OPENBSD_3_3_BASE
Branch point for: OPENBSD_3_3
Changes since 1.139: +3 -3 lines
Diff to previous 1.139 (colored)

reply() -> perror_reply().

millert@ ok

Revision 1.136.2.1 / (download) - annotate - [select for diffs], Sat Feb 1 20:44:16 2003 UTC (21 years, 4 months ago) by margarida
Branch: OPENBSD_3_2
Changes since 1.136: +3 -3 lines
Diff to previous 1.136 (colored) next main 1.137 (colored)

Pull patch from current:
Fix by millert@
Avoid potential printf format string problem with challenge from
auth_challenge(). Currently, none of the auth modules put non-sanitized
data in the prompt so there are no real security implications with
this fix. Patch from Moritz Jodeit.

deraadt@ millert@ ok

Revision 1.139 / (download) - annotate - [select for diffs], Mon Nov 25 22:45:39 2002 UTC (21 years, 6 months ago) by millert
Branch: MAIN
Changes since 1.138: +7 -5 lines
Diff to previous 1.138 (colored)

Change a setuid() that should be seteuid(), not iced by grange@
Move a va_end so it gets called in an error condition as well

Revision 1.138 / (download) - annotate - [select for diffs], Fri Nov 15 19:52:15 2002 UTC (21 years, 6 months ago) by millert
Branch: MAIN
Changes since 1.137: +11 -38 lines
Diff to previous 1.137 (colored)

o Once a user is logged in, don't allow a change to another user.
o Run more code with the effective uid of the logged in user.
From Frank Denis

Revision 1.137 / (download) - annotate - [select for diffs], Sun Oct 13 21:09:13 2002 UTC (21 years, 8 months ago) by millert
Branch: MAIN
Changes since 1.136: +3 -3 lines
Diff to previous 1.136 (colored)

Avoid potential printf format string problem with challenge from
auth_challenge().  Currently, none of the auth modules put non-sanitized
data in the prompt so there are no real security implications with
this fix.  Patch from Moritz Jodeit.

Revision 1.136 / (download) - annotate - [select for diffs], Thu Aug 29 22:52:00 2002 UTC (21 years, 9 months ago) by deraadt
Branch: MAIN
CVS Tags: OPENBSD_3_2_BASE
Branch point for: OPENBSD_3_2
Changes since 1.135: +3 -3 lines
Diff to previous 1.135 (colored)

remove extra arg; jmegq@post.harvard.edu

Revision 1.135 / (download) - annotate - [select for diffs], Tue Aug 20 18:18:55 2002 UTC (21 years, 9 months ago) by deraadt
Branch: MAIN
Changes since 1.134: +10 -4 lines
Diff to previous 1.134 (colored)

-n: disallow anon ftp even if ftp account exists

Revision 1.134 / (download) - annotate - [select for diffs], Wed Jul 24 23:17:07 2002 UTC (21 years, 10 months ago) by millert
Branch: MAIN
Changes since 1.133: +9 -8 lines
Diff to previous 1.133 (colored)

Also check for snprintf() returning < 0

Revision 1.133 / (download) - annotate - [select for diffs], Wed Jul 24 23:10:01 2002 UTC (21 years, 10 months ago) by millert
Branch: MAIN
Changes since 1.132: +4 -4 lines
Diff to previous 1.132 (colored)

What on earth possessed me to use %p instead of %m in syslog() to
indicate the error string?

Revision 1.132 / (download) - annotate - [select for diffs], Sat Jul 20 17:55:45 2002 UTC (21 years, 10 months ago) by millert
Branch: MAIN
Changes since 1.131: +14 -5 lines
Diff to previous 1.131 (colored)

Exit on setusercontext() failure; noticed by deraadt@

Revision 1.131 / (download) - annotate - [select for diffs], Sun Jul 14 07:14:09 2002 UTC (21 years, 11 months ago) by jakob
Branch: MAIN
Changes since 1.130: +6 -15 lines
Diff to previous 1.130 (colored)

make ftpd always listen to a high tcp port for passive data connections.
deprecate and ignore the -h option. ok deraadt@.

Revision 1.130 / (download) - annotate - [select for diffs], Tue Jul 2 18:09:54 2002 UTC (21 years, 11 months ago) by danh
Branch: MAIN
Changes since 1.129: +25 -11 lines
Diff to previous 1.129 (colored)

* use lostconn() as the SIGALRM handler in receive_data() as originally
  done by downsj@ in revision 1.54.

* some -Wall cleanup
  - only declare check_host() if TCPWRAPPERS is defined.
  - use socklen_t where appropriate instead of int (pointer signedness
    warnings).
  - {u_}char * pointer signedness warnings.

ok millert@

Revision 1.129 / (download) - annotate - [select for diffs], Mon Jun 17 19:33:37 2002 UTC (21 years, 11 months ago) by danh
Branch: MAIN
Changes since 1.128: +5 -8 lines
Diff to previous 1.128 (colored)

Initialize SIGALRM handler once in main(), instead of in several
different locations.

This fixes a problem where the SIGALRM handler was being set to an
uninitialized pointer in receive_data().  Originally reported to the
misc@ list by Colin Harford.

ok millert@

Revision 1.128 / (download) - annotate - [select for diffs], Sun Jun 9 00:37:37 2002 UTC (22 years ago) by itojun
Branch: MAIN
Changes since 1.127: +8 -4 lines
Diff to previous 1.127 (colored)

do not present scopeid on wire format (as it is local to a node).

Revision 1.127 / (download) - annotate - [select for diffs], Wed May 29 18:57:05 2002 UTC (22 years ago) by deraadt
Branch: MAIN
Changes since 1.126: +3 -3 lines
Diff to previous 1.126 (colored)

a few more strlcat

Revision 1.126 / (download) - annotate - [select for diffs], Sun May 26 09:32:07 2002 UTC (22 years ago) by deraadt
Branch: MAIN
Changes since 1.125: +3 -3 lines
Diff to previous 1.125 (colored)

pid_t cleanup

Revision 1.125 / (download) - annotate - [select for diffs], Sat Mar 30 22:01:51 2002 UTC (22 years, 2 months ago) by deraadt
Branch: MAIN
CVS Tags: OPENBSD_3_1_BASE, OPENBSD_3_1
Changes since 1.124: +5 -3 lines
Diff to previous 1.124 (colored)

correct an auth_close() misuse; millert ok

Revision 1.124 / (download) - annotate - [select for diffs], Sat Mar 16 19:15:12 2002 UTC (22 years, 2 months ago) by millert
Branch: MAIN
Changes since 1.123: +8 -4 lines
Diff to previous 1.123 (colored)

o Don't allow password-less accounts to login (like in 2.9 and below)
o Stash copy of struct passwd via auth_setpwd() to avoid extra needless
  getpwnam() calls.

Revision 1.123 / (download) - annotate - [select for diffs], Tue Mar 12 02:22:33 2002 UTC (22 years, 3 months ago) by millert
Branch: MAIN
Changes since 1.122: +3 -3 lines
Diff to previous 1.122 (colored)

bsd_auth.h requires other headers so it can't be first

Revision 1.122 / (download) - annotate - [select for diffs], Tue Mar 12 02:15:39 2002 UTC (22 years, 3 months ago) by millert
Branch: MAIN
Changes since 1.121: +6 -9 lines
Diff to previous 1.121 (colored)

Fix a couple mis-sorted headers and sync usage() with man page.
From Brian Poole

Revision 1.121 / (download) - annotate - [select for diffs], Tue Feb 19 19:39:38 2002 UTC (22 years, 3 months ago) by millert
Branch: MAIN
Changes since 1.120: +5 -34 lines
Diff to previous 1.120 (colored)

We live in an ANSI C world.  Remove lots of gratuitous #ifdef __STDC__ cruft.

Revision 1.120 / (download) - annotate - [select for diffs], Sat Feb 16 21:27:29 2002 UTC (22 years, 3 months ago) by millert
Branch: MAIN
Changes since 1.119: +25 -25 lines
Diff to previous 1.119 (colored)

Part one of userland __P removal.  Done with a simple regexp with some minor hand editing to make comments line up correctly.  Another pass is forthcoming that handles the cases that could not be done automatically.

Revision 1.119 / (download) - annotate - [select for diffs], Fri Feb 1 05:02:49 2002 UTC (22 years, 4 months ago) by itojun
Branch: MAIN
Changes since 1.118: +6 -6 lines
Diff to previous 1.118 (colored)

strlcpy

Revision 1.118 / (download) - annotate - [select for diffs], Fri Feb 1 04:53:28 2002 UTC (22 years, 4 months ago) by itojun
Branch: MAIN
Changes since 1.117: +17 -2 lines
Diff to previous 1.117 (colored)

make sure pw_dir is big enough for strcpy(pw->pw_dir, "/").

Revision 1.117 / (download) - annotate - [select for diffs], Wed Jan 23 20:59:05 2002 UTC (22 years, 4 months ago) by millert
Branch: MAIN
Changes since 1.116: +30 -15 lines
Diff to previous 1.116 (colored)

Plug login_cap and bsd_auth related memory leaks.  Problem noticed
by mpech@.

Revision 1.116 / (download) - annotate - [select for diffs], Wed Jan 23 17:03:21 2002 UTC (22 years, 4 months ago) by mpech
Branch: MAIN
Changes since 1.115: +5 -3 lines
Diff to previous 1.115 (colored)

fix potential memory leak.

millert@ ok

Revision 1.115 / (download) - annotate - [select for diffs], Wed Jan 23 16:31:18 2002 UTC (22 years, 4 months ago) by mpech
Branch: MAIN
Changes since 1.114: +4 -4 lines
Diff to previous 1.114 (colored)

Use always '.' in the end of the fatal() message. Consistency is good.

millert@ ok.

Revision 1.114 / (download) - annotate - [select for diffs], Wed Jan 23 16:27:35 2002 UTC (22 years, 4 months ago) by mpech
Branch: MAIN
Changes since 1.113: +5 -5 lines
Diff to previous 1.113 (colored)

don't use \n in reply().

millert@ ok

Revision 1.113 / (download) - annotate - [select for diffs], Mon Jan 7 03:56:02 2002 UTC (22 years, 5 months ago) by millert
Branch: MAIN
Changes since 1.112: +3 -3 lines
Diff to previous 1.112 (colored)

To disable a SIGCHLD signal handler use SIG_DFL, *not* SIG_IGN
which now has a different meaning.

Revision 1.112 / (download) - annotate - [select for diffs], Tue Dec 18 00:27:57 2001 UTC (22 years, 5 months ago) by millert
Branch: MAIN
Changes since 1.111: +16 -13 lines
Diff to previous 1.111 (colored)

Don't use sigprocmask() in signal handlers when we can just set the
mask to be what we want with sigaction.  Pointed out by Yar Tikhiy.

Revision 1.111 / (download) - annotate - [select for diffs], Mon Dec 17 23:02:53 2001 UTC (22 years, 5 months ago) by millert
Branch: MAIN
Changes since 1.110: +3 -2 lines
Diff to previous 1.110 (colored)

Add missing sigaction() call from last commit

Revision 1.110 / (download) - annotate - [select for diffs], Fri Dec 7 18:45:32 2001 UTC (22 years, 6 months ago) by mpech
Branch: MAIN
Changes since 1.109: +3 -3 lines
Diff to previous 1.109 (colored)

kill more registers;

millert@ ok

Revision 1.109 / (download) - annotate - [select for diffs], Tue Dec 4 21:18:04 2001 UTC (22 years, 6 months ago) by millert
Branch: MAIN
Changes since 1.108: +80 -48 lines
Diff to previous 1.108 (colored)

Kill setjmp/longjmp
 o fix error recovery in the parser so there is no longer a need for jmping
 o make SIGURG handler interupt syscalls and just set a flag that we test
   for later.

Use waitpid() not wait3() for portability.  Restart waitpid() loop
if another signal interrupts us.

Calling dologout() from signal handlers is safe because it doesn't
use stdio, nor do the two functions it calls (logout and ftpdlogwtmp).

Revision 1.108 / (download) - annotate - [select for diffs], Sat Dec 1 23:27:20 2001 UTC (22 years, 6 months ago) by miod
Branch: MAIN
Changes since 1.107: +4 -9 lines
Diff to previous 1.107 (colored)

Use pidfile() instead of doing the equivalent thing by hand, and sometimes
forgetting to unlink the pid file at exit.
ok millert@ deraadt@

Revision 1.107 / (download) - annotate - [select for diffs], Sat Nov 17 19:54:56 2001 UTC (22 years, 6 months ago) by deraadt
Branch: MAIN
Changes since 1.106: +3 -3 lines
Diff to previous 1.106 (colored)

volatile sig_atomic_t

Revision 1.106 / (download) - annotate - [select for diffs], Mon Nov 5 09:51:13 2001 UTC (22 years, 7 months ago) by deraadt
Branch: MAIN
Changes since 1.105: +10 -6 lines
Diff to previous 1.105 (colored)

more signal marks, and some syslog_r in handlers

Revision 1.105 / (download) - annotate - [select for diffs], Tue Oct 2 17:43:47 2001 UTC (22 years, 8 months ago) by wilfried
Branch: MAIN
CVS Tags: OPENBSD_3_0_BASE, OPENBSD_3_0
Changes since 1.104: +2 -3 lines
Diff to previous 1.104 (colored)

as is aleady closed and freed by auth_userresponse, ok millert@

Revision 1.104 / (download) - annotate - [select for diffs], Wed Sep 5 22:32:36 2001 UTC (22 years, 9 months ago) by deraadt
Branch: MAIN
Changes since 1.103: +3 -2 lines
Diff to previous 1.103 (colored)

make sure that va_start() has matching va_end()

Revision 1.103 / (download) - annotate - [select for diffs], Sun Jul 8 21:18:07 2001 UTC (22 years, 11 months ago) by deraadt
Branch: MAIN
Changes since 1.102: +7 -6 lines
Diff to previous 1.102 (colored)

-Wall

Revision 1.102 / (download) - annotate - [select for diffs], Tue Jul 3 21:17:56 2001 UTC (22 years, 11 months ago) by millert
Branch: MAIN
Changes since 1.101: +9 -4 lines
Diff to previous 1.101 (colored)

Use the 'welcome' variable from login.conf instead of hard-coding
/etc/motd.

Revision 1.101 / (download) - annotate - [select for diffs], Mon Jun 25 16:39:54 2001 UTC (22 years, 11 months ago) by hin
Branch: MAIN
Changes since 1.100: +4 -4 lines
Diff to previous 1.100 (colored)

millert didn't compile this.

Revision 1.100 / (download) - annotate - [select for diffs], Mon Jun 25 16:24:27 2001 UTC (22 years, 11 months ago) by millert
Branch: MAIN
Changes since 1.99: +5 -3 lines
Diff to previous 1.99 (colored)

Set "login" and "notickets" BSD auth options.  We don't need to get
a kerb ticket but we do need AFS tokens.

Revision 1.99 / (download) - annotate - [select for diffs], Wed Jun 13 20:13:29 2001 UTC (23 years ago) by markus
Branch: MAIN
Changes since 1.98: +9 -2 lines
Diff to previous 1.98 (colored)

more va_start/end fixes, ok deraadt@

Revision 1.98 / (download) - annotate - [select for diffs], Mon Jun 11 15:18:49 2001 UTC (23 years ago) by mickey
Branch: MAIN
Changes since 1.97: +12 -8 lines
Diff to previous 1.97 (colored)

strncpy vs strlcpy, some strlen missuse.
some other related minor cleanups, and spaces.
millert@ ok

Revision 1.97 / (download) - annotate - [select for diffs], Tue May 29 21:35:16 2001 UTC (23 years ago) by millert
Branch: MAIN
Changes since 1.96: +125 -129 lines
Diff to previous 1.96 (colored)

use BSD authentication

Revision 1.96 / (download) - annotate - [select for diffs], Fri May 11 15:34:02 2001 UTC (23 years, 1 month ago) by art
Branch: MAIN
Changes since 1.95: +2 -2 lines
Diff to previous 1.95 (colored)

mmap returns MAP_FAILED on error, not 0.

Revision 1.79.2.2 / (download) - annotate - [select for diffs], Mon Apr 23 21:13:53 2001 UTC (23 years, 1 month ago) by jason
Branch: OPENBSD_2_8
Changes since 1.79.2.1: +4 -4 lines
Diff to previous 1.79.2.1 (colored) to branchpoint 1.79 (colored) next main 1.80 (colored)

Pull in patch from current:
Fix (deraadt):
Use the GLOB_LIMIT support in glob(3) to constrain a remote denial of
service against ftpd(1).

Revision 1.95 / (download) - annotate - [select for diffs], Sun Mar 18 17:20:13 2001 UTC (23 years, 2 months ago) by deraadt
Branch: MAIN
CVS Tags: OPENBSD_2_9_BASE, OPENBSD_2_9
Changes since 1.94: +4 -4 lines
Diff to previous 1.94 (colored)

use GLOB_LIMIT

Revision 1.94 / (download) - annotate - [select for diffs], Fri Mar 9 19:09:12 2001 UTC (23 years, 3 months ago) by millert
Branch: MAIN
Changes since 1.93: +10 -14 lines
Diff to previous 1.93 (colored)

Block all signals in lostconn() and sigprocmask() since we are headed
for _exit().  Fixes a signal handler race condition.

Revision 1.93 / (download) - annotate - [select for diffs], Fri Mar 9 18:38:25 2001 UTC (23 years, 3 months ago) by deraadt
Branch: MAIN
Changes since 1.92: +2 -3 lines
Diff to previous 1.92 (colored)

do not strerror() a signo

Revision 1.92 / (download) - annotate - [select for diffs], Sun Feb 4 20:33:23 2001 UTC (23 years, 4 months ago) by pjanzen
Branch: MAIN
Changes since 1.91: +4 -4 lines
Diff to previous 1.91 (colored)

Whoops, don't use strlcpy with utmp; millert@

Revision 1.91 / (download) - annotate - [select for diffs], Sat Feb 3 21:48:47 2001 UTC (23 years, 4 months ago) by pjanzen
Branch: MAIN
Changes since 1.90: +11 -17 lines
Diff to previous 1.90 (colored)

Long usernames; also some simple strncpy->strlcpy.

Revision 1.90 / (download) - annotate - [select for diffs], Fri Jan 19 18:02:25 2001 UTC (23 years, 4 months ago) by deraadt
Branch: MAIN
Changes since 1.89: +4 -3 lines
Diff to previous 1.89 (colored)

mark remaining signal races

Revision 1.89 / (download) - annotate - [select for diffs], Tue Jan 9 06:07:03 2001 UTC (23 years, 5 months ago) by itojun
Branch: MAIN
Changes since 1.88: +2 -2 lines
Diff to previous 1.88 (colored)

make sure replydirname() do not truncate names, even if the filename
is MAXPATHLEN doublequotes.
From: Paul Janzen <pjanzen@foatdi.harvard.edu>

Revision 1.88 / (download) - annotate - [select for diffs], Tue Jan 9 05:07:01 2001 UTC (23 years, 5 months ago) by itojun
Branch: MAIN
Changes since 1.87: +8 -5 lines
Diff to previous 1.87 (colored)

make sure we do not return stray " at the end of stirng, like bla"\0.
From: "William C. Allen" <allenwc@home.com>

Revision 1.87 / (download) - annotate - [select for diffs], Sun Jan 7 07:38:34 2001 UTC (23 years, 5 months ago) by angelos
Branch: MAIN
Changes since 1.86: +3 -3 lines
Diff to previous 1.86 (colored)

Make the -P option effective (rjmooney@mediaone.net)

Revision 1.86 / (download) - annotate - [select for diffs], Sat Jan 6 18:24:29 2001 UTC (23 years, 5 months ago) by millert
Branch: MAIN
Changes since 1.85: +66 -2 lines
Diff to previous 1.85 (colored)

Expand tilde (~) in ftp-dir login.conf variable.  Closes PR 1382

Revision 1.85 / (download) - annotate - [select for diffs], Sat Dec 30 06:08:58 2000 UTC (23 years, 5 months ago) by angelos
Branch: MAIN
Changes since 1.84: +2 -2 lines
Diff to previous 1.84 (colored)

Log the actual bytes transfered, rather than the original file size.

Revision 1.71.2.2 / (download) - annotate - [select for diffs], Fri Dec 15 19:51:27 2000 UTC (23 years, 5 months ago) by jason
Branch: OPENBSD_2_7
Changes since 1.71.2.1: +13 -7 lines
Diff to previous 1.71.2.1 (colored) to branchpoint 1.71 (colored) next main 1.72 (colored)

Pull in patch from current:
Errata (037):
OpenBSD 2.7's ftpd contains a one-byte overflow in the replydirname() function.
Fix:
in replydirname(), avoid one-byte overrun.
From: Kristian Vlaardingerbroek <kris@obit.nl>

Revision 1.79.2.1 / (download) - annotate - [select for diffs], Sun Dec 10 02:48:22 2000 UTC (23 years, 6 months ago) by jason
Branch: OPENBSD_2_8
Changes since 1.79: +13 -7 lines
Diff to previous 1.79 (colored)

Pull in patch from current:
Errata 005_ftpd:
OpenBSD 2.8's ftpd contains a one-byte overflow in the replydirname() function.
Fix (itojun):
in replydirname(), avoid one-byte overrun.
From: Kristian Vlaardingerbroek <kris@obit.nl>

Revision 1.84 / (download) - annotate - [select for diffs], Mon Dec 4 10:49:31 2000 UTC (23 years, 6 months ago) by itojun
Branch: MAIN
Changes since 1.83: +13 -7 lines
Diff to previous 1.83 (colored)

in replydirname(), avoid one-byte overrun.
From: Kristian Vlaardingerbroek <kris@obit.nl>

Revision 1.83 / (download) - annotate - [select for diffs], Sat Dec 2 18:01:11 2000 UTC (23 years, 6 months ago) by millert
Branch: MAIN
Changes since 1.82: +11 -6 lines
Diff to previous 1.82 (colored)

The man page says the default umask is 027 but it is really 022 since
that is the value of CMASK.

Have setusercontext() set the umask unless the -u flag was specified.
This allows the admin to set the umask either via -u or via a login
class in login.conf.

Revision 1.82 / (download) - annotate - [select for diffs], Sun Nov 26 19:52:56 2000 UTC (23 years, 6 months ago) by millert
Branch: MAIN
Changes since 1.81: +4 -4 lines
Diff to previous 1.81 (colored)

setusercontext should not set umask as this interferes with the
umask specified for ftpd on the command line.  Closed PR #1530

Revision 1.81 / (download) - annotate - [select for diffs], Thu Nov 23 16:50:51 2000 UTC (23 years, 6 months ago) by itojun
Branch: MAIN
Changes since 1.80: +2 -2 lines
Diff to previous 1.80 (colored)

typo in LPSV printing.  From: Hiroyuki YAMAMORI <h-yamamo@db3.so-net.ne.jp>

Revision 1.80 / (download) - annotate - [select for diffs], Tue Nov 14 20:27:01 2000 UTC (23 years, 6 months ago) by itojun
Branch: MAIN
Changes since 1.79: +188 -25 lines
Diff to previous 1.79 (colored)

cleanup EPSV/EPRT error handling.  avoid possible memory leak (getaddrinfo).
correct error code on unsupported protocol parameter against EPRT (522).

Revision 1.79 / (download) - annotate - [select for diffs], Fri Sep 15 07:13:45 2000 UTC (23 years, 8 months ago) by deraadt
Branch: MAIN
CVS Tags: OPENBSD_2_8_BASE
Branch point for: OPENBSD_2_8
Changes since 1.78: +15 -5 lines
Diff to previous 1.78 (colored)

check return value for setenv(3) for failure, and deal appropriately

Revision 1.78 / (download) - annotate - [select for diffs], Sun Aug 20 18:42:37 2000 UTC (23 years, 9 months ago) by millert
Branch: MAIN
Changes since 1.77: +30 -7 lines
Diff to previous 1.77 (colored)

Add calls to setusercontext() and login_get*().  We basically call
setusercontext() in most places where previously we did a setlogin().
Add default login.conf file and put root in the "daemon" login class.

Revision 1.71.2.1 / (download) - annotate - [select for diffs], Wed Jul 5 22:20:08 2000 UTC (23 years, 11 months ago) by jason
Branch: OPENBSD_2_7
Changes since 1.71: +5 -5 lines
Diff to previous 1.71 (colored)

Pull in patch from current:
Fix (deraadt):
always setproctitle with %s if using a variable

another setproctitle

crank version to 6.5

Revision 1.77 / (download) - annotate - [select for diffs], Wed Jul 5 22:15:10 2000 UTC (23 years, 11 months ago) by deraadt
Branch: MAIN
Changes since 1.76: +2 -2 lines
Diff to previous 1.76 (colored)

crank version to 6.5

Revision 1.76 / (download) - annotate - [select for diffs], Wed Jul 5 21:56:48 2000 UTC (23 years, 11 months ago) by deraadt
Branch: MAIN
Changes since 1.75: +2 -2 lines
Diff to previous 1.75 (colored)

another setproctitle

Revision 1.75 / (download) - annotate - [select for diffs], Wed Jul 5 17:21:02 2000 UTC (23 years, 11 months ago) by deraadt
Branch: MAIN
Changes since 1.74: +3 -3 lines
Diff to previous 1.74 (colored)

always setproctitle with %s if using a variable

Revision 1.74 / (download) - annotate - [select for diffs], Sat Jun 17 19:42:18 2000 UTC (23 years, 11 months ago) by deraadt
Branch: MAIN
Changes since 1.73: +3 -1 lines
Diff to previous 1.73 (colored)

pr 772; -u blocks chmod command, michaels@inet.no

Revision 1.73 / (download) - annotate - [select for diffs], Wed Jun 14 15:15:06 2000 UTC (24 years ago) by itojun
Branch: MAIN
Changes since 1.72: +6 -6 lines
Diff to previous 1.72 (colored)

correct STAT command output for LPSV output.

Revision 1.72 / (download) - annotate - [select for diffs], Mon Jun 12 12:02:55 2000 UTC (24 years ago) by itojun
Branch: MAIN
Changes since 1.71: +23 -2 lines
Diff to previous 1.71 (colored)

address PR 1274 (-h does not work on EPSV).
the committed code handles IPv6 case too.

Revision 1.71 / (download) - annotate - [select for diffs], Sat Apr 29 14:02:59 2000 UTC (24 years, 1 month ago) by deraadt
Branch: MAIN
CVS Tags: OPENBSD_2_7_BASE
Branch point for: OPENBSD_2_7
Changes since 1.70: +2 -2 lines
Diff to previous 1.70 (colored)

strerror

Revision 1.70 / (download) - annotate - [select for diffs], Tue Apr 11 11:42:11 2000 UTC (24 years, 2 months ago) by deraadt
Branch: MAIN
Changes since 1.69: +8 -2 lines
Diff to previous 1.69 (colored)

do not lose descriptors; Takahiro Kambe

Revision 1.69 / (download) - annotate - [select for diffs], Fri Mar 3 15:51:45 2000 UTC (24 years, 3 months ago) by bitblt
Branch: MAIN
Changes since 1.68: +6 -1 lines
Diff to previous 1.68 (colored)

Turns out that our implementation of STAT wasn't RFC 959 compliant.
This version is now RFC 959 compliant, using a patch adapted from one
sent in by david.leonard@eecs.uq.edu.au

Revision 1.68 / (download) - annotate - [select for diffs], Tue Jan 18 18:26:38 2000 UTC (24 years, 4 months ago) by millert
Branch: MAIN
Changes since 1.67: +2 -2 lines
Diff to previous 1.67 (colored)

Fix a pasto in the last commit.  The genesis of this bug is actually
somewhat interesting.  The getwd() function has historically placed
an error message in the buffer on failure, but getcwd() does not.
Therefor, a bulk search and replace of getwd() with getcwd() can
create bugs like this one.

Revision 1.67 / (download) - annotate - [select for diffs], Tue Jan 18 05:02:05 2000 UTC (24 years, 4 months ago) by millert
Branch: MAIN
Changes since 1.66: +2 -2 lines
Diff to previous 1.66 (colored)

"pwd" should print an error, not garbage, if getcwd() fails; form@vell.nsc.ru

Revision 1.66 / (download) - annotate - [select for diffs], Fri Jan 14 20:58:21 2000 UTC (24 years, 5 months ago) by ericj
Branch: MAIN
Changes since 1.65: +3 -3 lines
Diff to previous 1.65 (colored)

call dologout() with 1. not -1

Revision 1.65 / (download) - annotate - [select for diffs], Fri Dec 10 10:41:44 1999 UTC (24 years, 6 months ago) by deraadt
Branch: MAIN
Changes since 1.64: +79 -67 lines
Diff to previous 1.64 (colored)

using u_char * is a lot more convenient than doing & 0xff 80+ times

Revision 1.64 / (download) - annotate - [select for diffs], Thu Dec 9 09:03:08 1999 UTC (24 years, 6 months ago) by itojun
Branch: MAIN
Changes since 1.63: +3 -1 lines
Diff to previous 1.63 (colored)

close passive mode data socket.
From: deraadt

Revision 1.63 / (download) - annotate - [select for diffs], Wed Dec 8 13:15:21 1999 UTC (24 years, 6 months ago) by itojun
Branch: MAIN
Changes since 1.62: +397 -81 lines
Diff to previous 1.62 (colored)

IPv6 support from KAME.
XXX kerberos and tcp_wrapper needs checking

Revision 1.62 / (download) - annotate - [select for diffs], Fri Dec 3 01:22:46 1999 UTC (24 years, 6 months ago) by millert
Branch: MAIN
Changes since 1.61: +24 -16 lines
Diff to previous 1.61 (colored)

Write pid to /var/run/ftpd.pid if running in daemon mode.

Revision 1.61 / (download) - annotate - [select for diffs], Thu Dec 2 17:34:08 1999 UTC (24 years, 6 months ago) by millert
Branch: MAIN
Changes since 1.60: +2 -2 lines
Diff to previous 1.60 (colored)

Fix thinko on my part, we want to avoid setting mode to "r+" for
append, not for ascii.

Revision 1.60 / (download) - annotate - [select for diffs], Wed Dec 1 06:33:24 1999 UTC (24 years, 6 months ago) by millert
Branch: MAIN
Changes since 1.59: +4 -4 lines
Diff to previous 1.59 (colored)

Move initialization of ttyline to be after the fork() so that when
we are in daemon mode it contains the pid of the child, not the parent.
This fixes utmp/wtmp updates in daemon mode.

Revision 1.59 / (download) - annotate - [select for diffs], Mon Nov 29 20:17:09 1999 UTC (24 years, 6 months ago) by millert
Branch: MAIN
Changes since 1.58: +4 -3 lines
Diff to previous 1.58 (colored)

When restarting a STOR, open with "r+", not "w" so we don't truncate.
Based on a patch from rmooney@iss.net; closed PR #993

Revision 1.58 / (download) - annotate - [select for diffs], Sun Nov 14 22:25:02 1999 UTC (24 years, 7 months ago) by deraadt
Branch: MAIN
Changes since 1.57: +2 -2 lines
Diff to previous 1.57 (colored)

warning about getpeername() failing is useless

Revision 1.57 / (download) - annotate - [select for diffs], Wed Sep 22 05:00:46 1999 UTC (24 years, 8 months ago) by deraadt
Branch: MAIN
CVS Tags: OPENBSD_2_6_BASE, OPENBSD_2_6
Changes since 1.56: +2 -1 lines
Diff to previous 1.56 (colored)

correct oob handling for STAT command; ian@plutotech.com

Revision 1.56 / (download) - annotate - [select for diffs], Wed Jul 21 00:05:47 1999 UTC (24 years, 10 months ago) by deraadt
Branch: MAIN
Changes since 1.55: +9 -5 lines
Diff to previous 1.55 (colored)

bad umask is an error, syslog; pointed out by form@

Revision 1.55 / (download) - annotate - [select for diffs], Tue Jul 20 19:55:06 1999 UTC (24 years, 10 months ago) by deraadt
Branch: MAIN
Changes since 1.54: +13 -3 lines
Diff to previous 1.54 (colored)

do not proceed if incorrect args are found; found by form

Revision 1.54 / (download) - annotate - [select for diffs], Thu Apr 29 21:38:43 1999 UTC (25 years, 1 month ago) by downsj
Branch: MAIN
Changes since 1.53: +14 -6 lines
Diff to previous 1.53 (colored)

Work around the blocking read() that causes so many hung ftpd processes.

This has been extensively tested.

Revision 1.53 / (download) - annotate - [select for diffs], Fri Feb 26 00:15:54 1999 UTC (25 years, 3 months ago) by art
Branch: MAIN
CVS Tags: OPENBSD_2_5_BASE, OPENBSD_2_5
Changes since 1.52: +2 -2 lines
Diff to previous 1.52 (colored)

implement internal ls

Revision 1.52 / (download) - annotate - [select for diffs], Wed Dec 30 22:01:24 1998 UTC (25 years, 5 months ago) by deraadt
Branch: MAIN
Changes since 1.51: +8 -8 lines
Diff to previous 1.51 (colored)

indent

Revision 1.51 / (download) - annotate - [select for diffs], Tue Dec 29 07:00:58 1998 UTC (25 years, 5 months ago) by deraadt
Branch: MAIN
Changes since 1.50: +5 -5 lines
Diff to previous 1.50 (colored)

use getcwd()

Revision 1.50 / (download) - annotate - [select for diffs], Wed Nov 18 23:30:08 1998 UTC (25 years, 6 months ago) by deraadt
Branch: MAIN
Changes since 1.49: +2 -2 lines
Diff to previous 1.49 (colored)

check for out-of-range umask bits from strtol()

Revision 1.49 / (download) - annotate - [select for diffs], Thu Jul 23 08:13:38 1998 UTC (25 years, 10 months ago) by deraadt
Branch: MAIN
CVS Tags: OPENBSD_2_4_BASE, OPENBSD_2_4
Changes since 1.48: +20 -3 lines
Diff to previous 1.48 (colored)

add replydirname() from netbsd; fixes 257 directory replies; problem noted by kstailey

Revision 1.48 / (download) - annotate - [select for diffs], Mon Jul 13 02:11:15 1998 UTC (25 years, 11 months ago) by millert
Branch: MAIN
Changes since 1.47: +11 -6 lines
Diff to previous 1.47 (colored)

ftpd: sleep for an indeterminate amount for non-existant logins
      to simulate a crypt, like login does.
Use SEEK_* not L_* and kill some 0L's used in lseek while we're there.

Revision 1.47 / (download) - annotate - [select for diffs], Mon Jun 8 16:55:34 1998 UTC (26 years ago) by mickey
Branch: MAIN
Changes since 1.46: +2 -2 lines
Diff to previous 1.46 (colored)

allow ftpchroot-ed users to also be multihomed

Revision 1.46 / (download) - annotate - [select for diffs], Wed Jun 3 17:44:47 1998 UTC (26 years ago) by deraadt
Branch: MAIN
Changes since 1.45: +2 -2 lines
Diff to previous 1.45 (colored)

use SIG_ERR

Revision 1.45 / (download) - annotate - [select for diffs], Fri Dec 12 08:55:09 1997 UTC (26 years, 6 months ago) by deraadt
Branch: MAIN
CVS Tags: OPENBSD_2_3_BASE, OPENBSD_2_3
Changes since 1.44: +7 -2 lines
Diff to previous 1.44 (colored)

default to violating the RFC wrt the PORT command. Use -P to conform to the
RFC and possibly open up non-OpenBSD boxes in a trust relationship on your
network to possible ftp bounce attacks...

Revision 1.44 / (download) - annotate - [select for diffs], Wed Aug 6 00:18:00 1997 UTC (26 years, 10 months ago) by angelos
Branch: MAIN
CVS Tags: OPENBSD_2_2_BASE, OPENBSD_2_2
Changes since 1.43: +3 -1 lines
Diff to previous 1.43 (colored)

Errno save/restore.

Revision 1.43 / (download) - annotate - [select for diffs], Mon Aug 4 19:25:09 1997 UTC (26 years, 10 months ago) by deraadt
Branch: MAIN
Changes since 1.42: +6 -2 lines
Diff to previous 1.42 (colored)

save errno in sigchld handlers

Revision 1.42 / (download) - annotate - [select for diffs], Fri Jul 25 19:41:16 1997 UTC (26 years, 10 months ago) by mickey
Branch: MAIN
Changes since 1.41: +6 -6 lines
Diff to previous 1.41 (colored)

#if __STDC__ --> #ifdef __STDC__

Revision 1.41 / (download) - annotate - [select for diffs], Wed Jul 23 20:36:24 1997 UTC (26 years, 10 months ago) by kstailey
Branch: MAIN
Changes since 1.40: +4 -4 lines
Diff to previous 1.40 (colored)

tabify

Revision 1.40 / (download) - annotate - [select for diffs], Sun Jun 29 07:39:02 1997 UTC (26 years, 11 months ago) by deraadt
Branch: MAIN
Changes since 1.39: +2 -2 lines
Diff to previous 1.39 (colored)

crank version

Revision 1.39 / (download) - annotate - [select for diffs], Sun Jun 29 07:35:44 1997 UTC (26 years, 11 months ago) by deraadt
Branch: MAIN
Changes since 1.38: +15 -11 lines
Diff to previous 1.38 (colored)

partial Wall

Revision 1.38 / (download) - annotate - [select for diffs], Sat Jun 21 12:44:41 1997 UTC (26 years, 11 months ago) by deraadt
Branch: MAIN
Changes since 1.37: +18 -19 lines
Diff to previous 1.37 (colored)

attempt to realpath() log entries

Revision 1.37 / (download) - annotate - [select for diffs], Thu Jun 5 09:22:41 1997 UTC (27 years ago) by deraadt
Branch: MAIN
Changes since 1.36: +2 -2 lines
Diff to previous 1.36 (colored)

bigger buf

Revision 1.36 / (download) - annotate - [select for diffs], Sun Jun 1 06:40:34 1997 UTC (27 years ago) by downsj
Branch: MAIN
Changes since 1.35: +42 -1 lines
Diff to previous 1.35 (colored)

Support integrated tcp wrappers when in daemon mode.

Revision 1.35 / (download) - annotate - [select for diffs], Thu May 1 14:45:37 1997 UTC (27 years, 1 month ago) by deraadt
Branch: MAIN
CVS Tags: OPENBSD_2_1_BASE, OPENBSD_2_1
Changes since 1.34: +1 -1 lines
Diff to previous 1.34 (colored)

change -A to let in anon | chroot accounts

Revision 1.34 / (download) - annotate - [select for diffs], Fri Apr 25 11:06:28 1997 UTC (27 years, 1 month ago) by deraadt
Branch: MAIN
Changes since 1.33: +3 -2 lines
Diff to previous 1.33 (colored)

do not allow connect to a 2049 either, helps firewall cases; adam@math.tau.ac.il

Revision 1.33 / (download) - annotate - [select for diffs], Tue Mar 25 22:47:10 1997 UTC (27 years, 2 months ago) by millert
Branch: MAIN
Changes since 1.32: +15 -2 lines
Diff to previous 1.32 (colored)

Splat .message file if it exists when user cd's to a directory
like wu-ftpd.  Based on changes from Oliver.

Revision 1.32 / (download) - annotate - [select for diffs], Thu Jan 23 06:49:11 1997 UTC (27 years, 4 months ago) by deraadt
Branch: MAIN
Changes since 1.31: +2 -2 lines
Diff to previous 1.31 (colored)

crank version number

Revision 1.31 / (download) - annotate - [select for diffs], Wed Jan 15 23:40:58 1997 UTC (27 years, 4 months ago) by millert
Branch: MAIN
Changes since 1.30: +2 -2 lines
Diff to previous 1.30 (colored)

getopt(3) returns -1 when out of args, not EOF, whee!

Revision 1.30 / (download) - annotate - [select for diffs], Sun Jan 5 21:28:07 1997 UTC (27 years, 5 months ago) by bitblt
Branch: MAIN
Changes since 1.29: +19 -2 lines
Diff to previous 1.29 (colored)

Signals are now blocked while ftpd runs with euid 0, as suggested by
Weiste Venema.  If this triggers any problems (most likely with ABOR not
working at certain times) let me know.

Revision 1.29 / (download) - annotate - [select for diffs], Thu Jan 2 21:33:33 1997 UTC (27 years, 5 months ago) by deraadt
Branch: MAIN
Changes since 1.28: +2 -1 lines
Diff to previous 1.28 (colored)

avoid SIGURG race; dg@root.com

Revision 1.28 / (download) - annotate - [select for diffs], Sat Dec 14 23:09:46 1996 UTC (27 years, 6 months ago) by deraadt
Branch: MAIN
Changes since 1.27: +27 -18 lines
Diff to previous 1.27 (colored)

stop gunique() open/fopen race

Revision 1.27 / (download) - annotate - [select for diffs], Sat Dec 14 22:47:38 1996 UTC (27 years, 6 months ago) by deraadt
Branch: MAIN
Changes since 1.26: +7 -4 lines
Diff to previous 1.26 (colored)

solve /tmp-style race spotted by bitblt

Revision 1.26 / (download) - annotate - [select for diffs], Sat Dec 7 09:00:22 1996 UTC (27 years, 6 months ago) by bitblt
Branch: MAIN
Changes since 1.25: +4 -1 lines
Diff to previous 1.25 (colored)

ftpd now eventually times out if a ftp client does:
pasv
list
and then crashes.
The timeout should only apply the the accept(), so that transfers can
take as long as necessary to complete.
Thanks to Theo for moving toolong() to extern.h so that it can be used
in ftpd.c as well as in ftpcmd.y.

Revision 1.25 / (download) - annotate - [select for diffs], Tue Dec 3 03:07:17 1996 UTC (27 years, 6 months ago) by deraadt
Branch: MAIN
Changes since 1.24: +11 -1 lines
Diff to previous 1.24 (colored)

-A for anon only; from freebsd

Revision 1.24 / (download) - annotate - [select for diffs], Sat Oct 19 12:20:02 1996 UTC (27 years, 7 months ago) by michaels
Branch: MAIN
Changes since 1.23: +2 -2 lines
Diff to previous 1.23 (colored)

add ')'.

Revision 1.23 / (download) - annotate - [select for diffs], Fri Oct 18 20:12:45 1996 UTC (27 years, 7 months ago) by deraadt
Branch: MAIN
Changes since 1.22: +2 -1 lines
Diff to previous 1.22 (colored)

forget old password nicely

Revision 1.22 / (download) - annotate - [select for diffs], Tue Oct 15 12:29:27 1996 UTC (27 years, 8 months ago) by deraadt
Branch: MAIN
Changes since 1.21: +3 -1 lines
Diff to previous 1.21 (colored)

fd leak spotted by bitblt

Revision 1.21 / (download) - annotate - [select for diffs], Sun Sep 29 22:11:50 1996 UTC (27 years, 8 months ago) by millert
Branch: MAIN
CVS Tags: OPENBSD_2_0_BASE, OPENBSD_2_0
Changes since 1.20: +2 -2 lines
Diff to previous 1.20 (colored)

s/key (otp) challenge is now rfc 1938 compliant.

Revision 1.20 / (download) - annotate - [select for diffs], Sun Sep 22 09:49:58 1996 UTC (27 years, 8 months ago) by deraadt
Branch: MAIN
Changes since 1.19: +23 -4 lines
Diff to previous 1.19 (colored)

vis log entries; noted by bitblt

Revision 1.19 / (download) - annotate - [select for diffs], Wed Sep 4 15:40:27 1996 UTC (27 years, 9 months ago) by deraadt
Branch: MAIN
Changes since 1.18: +1 -1 lines
Diff to previous 1.18 (colored)

no, bad commit

Revision 1.18 / (download) - annotate - [select for diffs], Wed Sep 4 14:41:29 1996 UTC (27 years, 9 months ago) by deraadt
Branch: MAIN
Changes since 1.17: +2 -2 lines
Diff to previous 1.17 (colored)

clear passwd, for safety

Revision 1.17 / (download) - annotate - [select for diffs], Tue Aug 27 10:08:37 1996 UTC (27 years, 9 months ago) by deraadt
Branch: MAIN
Changes since 1.16: +14 -7 lines
Diff to previous 1.16 (colored)

strncpy correctly

Revision 1.16 / (download) - annotate - [select for diffs], Sun Aug 25 21:04:56 1996 UTC (27 years, 9 months ago) by deraadt
Branch: MAIN
Changes since 1.15: +5 -1 lines
Diff to previous 1.15 (colored)

hide our base dir

Revision 1.15 / (download) - annotate - [select for diffs], Tue Aug 13 06:34:39 1996 UTC (27 years, 10 months ago) by deraadt
Branch: MAIN
Changes since 1.14: +2 -2 lines
Diff to previous 1.14 (colored)

log non-anon stuff for -S too, from downsj

Revision 1.14 / (download) - annotate - [select for diffs], Sat Aug 10 06:12:12 1996 UTC (27 years, 10 months ago) by downsj
Branch: MAIN
Changes since 1.13: +65 -11 lines
Diff to previous 1.13 (colored)

Add multihome support (-M) and make stats logging look like wu-ftpd.

Revision 1.13 / (download) - annotate - [select for diffs], Thu Aug 8 16:22:37 1996 UTC (27 years, 10 months ago) by downsj
Branch: MAIN
Changes since 1.12: +19 -1 lines
Diff to previous 1.12 (colored)

Handle signals better.

Revision 1.12 / (download) - annotate - [select for diffs], Wed Aug 7 03:27:54 1996 UTC (27 years, 10 months ago) by downsj
Branch: MAIN
Changes since 1.11: +1 -25 lines
Diff to previous 1.11 (colored)

STATS is not an option.

Revision 1.11 / (download) - annotate - [select for diffs], Wed Aug 7 03:17:58 1996 UTC (27 years, 10 months ago) by downsj
Branch: MAIN
Changes since 1.10: +2 -2 lines
Diff to previous 1.10 (colored)

strcpy -> strncpy, kill off a strdup() clone.

Revision 1.10 / (download) - annotate - [select for diffs], Wed Aug 7 03:04:22 1996 UTC (27 years, 10 months ago) by downsj
Branch: MAIN
Changes since 1.9: +11 -8 lines
Diff to previous 1.9 (colored)

sprintf -> snprintf

Revision 1.9 / (download) - annotate - [select for diffs], Mon Jul 29 05:32:59 1996 UTC (27 years, 10 months ago) by downsj
Branch: MAIN
Changes since 1.8: +3 -10 lines
Diff to previous 1.8 (colored)

Remove some FreeBSD cruft.

Revision 1.8 / (download) - annotate - [select for diffs], Mon Jul 29 03:06:35 1996 UTC (27 years, 10 months ago) by downsj
Branch: MAIN
Changes since 1.7: +46 -6 lines
Diff to previous 1.7 (colored)

Add -h, causing passive mode connections to request the high port range.

Also a few other changes.

Revision 1.7 / (download) - annotate - [select for diffs], Mon Jul 29 00:03:19 1996 UTC (27 years, 10 months ago) by downsj
Branch: MAIN
Changes since 1.6: +9 -1 lines
Diff to previous 1.6 (colored)

Add setenv for HOME (from FreeBSD).

Revision 1.6 / (download) - annotate - [select for diffs], Sun Jul 28 23:32:16 1996 UTC (27 years, 10 months ago) by downsj
Branch: MAIN
Changes since 1.5: +113 -29 lines
Diff to previous 1.5 (colored)

Add daemon mode (from FreeBSD), moving a lot of things around.

Also change the advertised version to '6.1/OpenBSD'; using the old version
number from 4.4BSD seems rather silly at this point.

Revision 1.5 / (download) - annotate - [select for diffs], Sun Jul 28 22:42:45 1996 UTC (27 years, 10 months ago) by downsj
Branch: MAIN
Changes since 1.4: +70 -3 lines
Diff to previous 1.4 (colored)

Add anonymous statistics logging, based on FreeBSD but with the really
obvious bugs fixed.

Revision 1.4 / (download) - annotate - [select for diffs], Sun Jul 28 19:45:36 1996 UTC (27 years, 10 months ago) by downsj
Branch: MAIN
Changes since 1.3: +45 -8 lines
Diff to previous 1.3 (colored)

New mmap(2)-using send_data() from FreeBSD.

Revision 1.3 / (download) - annotate - [select for diffs], Sat Jul 27 07:26:39 1996 UTC (27 years, 10 months ago) by joshd
Branch: MAIN
Changes since 1.2: +32 -1 lines
Diff to previous 1.2 (colored)

No more ftpd bounce attacks.

Revision 1.2 / (download) - annotate - [select for diffs], Tue Jun 18 10:09:20 1996 UTC (27 years, 11 months ago) by downsj
Branch: MAIN
Changes since 1.1: +27 -3 lines
Diff to previous 1.1 (colored)

my netbsd pr#2217: add utmp support to ftpd, some other small changes/fixes.

Revision 1.1.1.1 / (download) - annotate - [select for diffs] (vendor branch), Wed Oct 18 08:43:16 1995 UTC (28 years, 7 months ago) by deraadt
CVS Tags: netbsd_1_1
Changes since 1.1: +0 -0 lines
Diff to previous 1.1 (colored)

initial import of NetBSD tree

Revision 1.1 / (download) - annotate - [select for diffs], Wed Oct 18 08:43:16 1995 UTC (28 years, 7 months ago) by deraadt
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.