OpenBSD CVS

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


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

Request diff between arbitrary revisions


Default branch: MAIN


Revision 1.31 / (download) - annotate - [select for diffs], Wed Mar 8 04:43:05 2023 UTC (14 months, 3 weeks 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, HEAD
Changes since 1.30: +1 -2 lines
Diff to previous 1.30 (colored)

Delete obsolete /* ARGSUSED */ lint comments.

ok miod@ millert@

Revision 1.30 / (download) - annotate - [select for diffs], Sun Oct 24 21:24:20 2021 UTC (2 years, 7 months ago) by deraadt
Branch: MAIN
CVS Tags: OPENBSD_7_2_BASE, OPENBSD_7_2, OPENBSD_7_1_BASE, OPENBSD_7_1
Changes since 1.29: +2 -2 lines
Diff to previous 1.29 (colored)

For open/openat, if the flags parameter does not contain O_CREAT, the
3rd (variadic) mode_t parameter is irrelevant.  Many developers in the past
have passed mode_t (0, 044, 0644, or such), which might lead future people
to copy this broken idiom, and perhaps even believe this parameter has some
meaning or implication or application. Delete them all.
This comes out of a conversation where tb@ noticed that a strange (but
intentional) pledge behaviour is to always knock-out high-bits from
mode_t on a number of system calls as a safety factor, and his bewilderment
that this appeared to be happening against valid modes (at least visually),
but no sorry, they are all irrelevant junk.  They could all be 0xdeafbeef.
ok millert

Revision 1.29 / (download) - annotate - [select for diffs], Mon May 31 16:18:01 2021 UTC (3 years ago) by jan
Branch: MAIN
CVS Tags: OPENBSD_7_0_BASE, OPENBSD_7_0
Changes since 1.28: +2 -2 lines
Diff to previous 1.28 (colored)

Convert K&R function definitions to modern C.

OK naddy@, millert@

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

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

"looks fine to me" chris@

Revision 1.27 / (download) - annotate - [select for diffs], Sat May 15 13:37:43 2021 UTC (3 years ago) by jan
Branch: MAIN
Changes since 1.26: +7 -1 lines
Diff to previous 1.26 (colored)

Add pledge for ftpd's user processes.

OK tobhe@

Revision 1.26 / (download) - annotate - [select for diffs], Fri Jun 28 13:32:53 2019 UTC (4 years, 11 months ago) by deraadt
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, OPENBSD_6_6_BASE, OPENBSD_6_6
Changes since 1.25: +2 -2 lines
Diff to previous 1.25 (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.25 / (download) - annotate - [select for diffs], Mon Apr 17 21:48:26 2017 UTC (7 years, 1 month ago) by deraadt
Branch: MAIN
CVS Tags: OPENBSD_6_5_BASE, OPENBSD_6_5, OPENBSD_6_4_BASE, OPENBSD_6_4, OPENBSD_6_3_BASE, OPENBSD_6_3, OPENBSD_6_2_BASE, OPENBSD_6_2
Changes since 1.24: +2 -3 lines
Diff to previous 1.24 (colored)

freezero() can be used here

Revision 1.24 / (download) - annotate - [select for diffs], Mon Apr 25 15:43:34 2016 UTC (8 years, 1 month ago) by deraadt
Branch: MAIN
CVS Tags: OPENBSD_6_1_BASE, OPENBSD_6_1, OPENBSD_6_0_BASE, OPENBSD_6_0
Changes since 1.23: +5 -9 lines
Diff to previous 1.23 (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.23 / (download) - annotate - [select for diffs], Mon Nov 16 17:31:14 2015 UTC (8 years, 6 months ago) by tedu
Branch: MAIN
CVS Tags: OPENBSD_5_9_BASE, OPENBSD_5_9
Changes since 1.22: +1 -7 lines
Diff to previous 1.22 (colored)

don't need to ifdef setproctitle

Revision 1.22 / (download) - annotate - [select for diffs], Fri Feb 6 23:21:58 2015 UTC (9 years, 3 months ago) by millert
Branch: MAIN
CVS Tags: OPENBSD_5_8_BASE, OPENBSD_5_8, OPENBSD_5_7_BASE, OPENBSD_5_7
Changes since 1.21: +4 -4 lines
Diff to previous 1.21 (colored)

SIZE_MAX is standard, we should be using it in preference to the
obsolete SIZE_T_MAX.  OK miod@ beck@

Revision 1.21 / (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.20: +2 -2 lines
Diff to previous 1.20 (colored)

Delete secret or secret-derived data with explicit_bzero.

concept ok deraadt@
diff looks ok tedu@

Revision 1.20 / (download) - annotate - [select for diffs], Thu Jun 4 01:12:39 2009 UTC (15 years ago) by sthen
Branch: MAIN
CVS Tags: OPENBSD_5_6_BASE, OPENBSD_5_6, OPENBSD_5_5_BASE, OPENBSD_5_5, OPENBSD_5_4_BASE, OPENBSD_5_4, OPENBSD_5_3_BASE, OPENBSD_5_3, OPENBSD_5_2_BASE, OPENBSD_5_2, OPENBSD_5_1_BASE, OPENBSD_5_1, OPENBSD_5_0_BASE, OPENBSD_5_0, OPENBSD_4_9_BASE, OPENBSD_4_9, OPENBSD_4_8_BASE, OPENBSD_4_8, OPENBSD_4_7_BASE, OPENBSD_4_7, OPENBSD_4_6_BASE, OPENBSD_4_6
Changes since 1.19: +7 -6 lines
Diff to previous 1.19 (colored)

...and now try again with a commit from the right tree. doh!

ftp uses its own ugly "sockunion" to hold addresses, but with CMD_BIND
the monitor treats it as if it were a sockaddr. this is fine for v4 but
fails for v6, so active connections break. problem reported and diff
tested by Maurice Janssen. looks sensible to deraadt@.

Revision 1.19 / (download) - annotate - [select for diffs], Thu Jun 4 01:10:34 2009 UTC (15 years ago) by sthen
Branch: MAIN
Changes since 1.18: +3 -3 lines
Diff to previous 1.18 (colored)

ftp uses its own ugly "sockunion" to hold addresses, but with CMD_BIND
the monitor treats it as if it were a sockaddr. this is fine for v4 but
fails for v6, so active connections break. problem reported and diff
tested by Maurice Janssen. looks sensible to deraadt@.

Revision 1.18 / (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_5_BASE, OPENBSD_4_5, OPENBSD_4_4_BASE, OPENBSD_4_4
Changes since 1.17: +2 -2 lines
Diff to previous 1.17 (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.17 / (download) - annotate - [select for diffs], Thu Apr 5 21:16:59 2007 UTC (17 years, 2 months ago) by moritz
Branch: MAIN
CVS Tags: OPENBSD_4_3_BASE, OPENBSD_4_3, OPENBSD_4_2_BASE, OPENBSD_4_2
Changes since 1.16: +1 -2 lines
Diff to previous 1.16 (colored)

Remove lint comment, which does not apply anymore.

Revision 1.16 / (download) - annotate - [select for diffs], Mon Mar 26 19:33:23 2007 UTC (17 years, 2 months ago) by moritz
Branch: MAIN
Changes since 1.15: +5 -3 lines
Diff to previous 1.15 (colored)

Do not log when the slave gets killed because of read()
returning 0. This is normal behavior and should not spam
the logs. Noticed by henning@

OK henning@ millert@

Revision 1.15 / (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.14: +8 -6 lines
Diff to previous 1.14 (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.12.2.1 / (download) - annotate - [select for diffs], Mon May 15 23:28:14 2006 UTC (18 years ago) by brad
Branch: OPENBSD_3_9
Changes since 1.12: +7 -5 lines
Diff to previous 1.12 (colored) next main 1.13 (colored)

MFC:
Fix by moritz@

Allow anonymous logins without a password, which was broken
by the last commit. Noticed by Armin Wolfermann.

ok deraadt@ moritz@

Revision 1.14 / (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.13: +3 -3 lines
Diff to previous 1.13 (colored)

lint cleanup; ok ray moritz dhill

Revision 1.13 / (download) - annotate - [select for diffs], Tue Mar 14 15:33:28 2006 UTC (18 years, 2 months ago) by moritz
Branch: MAIN
Changes since 1.12: +7 -5 lines
Diff to previous 1.12 (colored)

Allow anonymous logins without a password, which was broken
by the last commit. Noticed by Armin Wolfermann. ok henning@

Revision 1.12 / (download) - annotate - [select for diffs], Fri Jan 20 16:51:38 2006 UTC (18 years, 4 months ago) by moritz
Branch: MAIN
CVS Tags: OPENBSD_3_9_BASE
Branch point for: OPENBSD_3_9
Changes since 1.11: +8 -5 lines
Diff to previous 1.11 (colored)

fix integer overflows. ok millert@

Revision 1.8.2.1 / (download) - annotate - [select for diffs], Thu Jul 14 23:34:33 2005 UTC (18 years, 10 months ago) by brad
Branch: OPENBSD_3_7
Changes since 1.8: +41 -2 lines
Diff to previous 1.8 (colored) next main 1.9 (colored)

MFC:
Fix by moritz@

let root create the data socket. fixes PR 4287.

ok deraadt@

Revision 1.11 / (download) - annotate - [select for diffs], Thu Jul 14 14:48:47 2005 UTC (18 years, 10 months ago) by moritz
Branch: MAIN
CVS Tags: OPENBSD_3_8_BASE, OPENBSD_3_8
Changes since 1.10: +41 -2 lines
Diff to previous 1.10 (colored)

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

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

readd endpwent()

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

no need for endpwent()

Revision 1.8 / (download) - annotate - [select for diffs], Sat Feb 26 17:35:05 2005 UTC (19 years, 3 months ago) by moritz
Branch: MAIN
CVS Tags: OPENBSD_3_7_BASE
Branch point for: OPENBSD_3_7
Changes since 1.7: +29 -19 lines
Diff to previous 1.7 (colored)

fix {send,recv}data so they don't add -1 to pos in the
EINTR/EAGAIN case as found by otto@.
also make them more quiet as requested by deraadt@.

ok millert@ otto@ henning@

Revision 1.7 / (download) - annotate - [select for diffs], Mon Dec 20 14:58:57 2004 UTC (19 years, 5 months ago) by moritz
Branch: MAIN
Changes since 1.6: +2 -2 lines
Diff to previous 1.6 (colored)

change mail address

ok henning@

Revision 1.6 / (download) - annotate - [select for diffs], Sat Dec 11 08:38:26 2004 UTC (19 years, 5 months ago) by moritz
Branch: MAIN
Changes since 1.5: +22 -48 lines
Diff to previous 1.5 (colored)

make syscalls in the monitor restartable when signals occur, as was
the case before privsep and only wait() for our slave processes.
with help from millert@

ok millert@ henning@

Revision 1.5 / (download) - annotate - [select for diffs], Mon Dec 6 20:52:04 2004 UTC (19 years, 5 months ago) by moritz
Branch: MAIN
Changes since 1.4: +2 -12 lines
Diff to previous 1.4 (colored)

make signal blocking a lot easier.
ok millert@, henning@

Revision 1.4 / (download) - annotate - [select for diffs], Mon Nov 29 22:24:57 2004 UTC (19 years, 6 months ago) by henning
Branch: MAIN
Changes since 1.3: +11 -1 lines
Diff to previous 1.3 (colored)

fix nasty signal races by blocking signals in signal handlers.
with moritz jodeit and theo, ok theo

Revision 1.3 / (download) - annotate - [select for diffs], Sun Nov 28 20:09:47 2004 UTC (19 years, 6 months ago) by henning
Branch: MAIN
Changes since 1.2: +7 -5 lines
Diff to previous 1.2 (colored)

slave_pid -1 by default, not 0, and reset to -1 when it goes away, with theo

Revision 1.2 / (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.1: +6 -1 lines
Diff to previous 1.1 (colored)

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

Revision 1.1 / (download) - annotate - [select for diffs], Sun Nov 28 18:49:30 2004 UTC (19 years, 6 months ago) by henning
Branch: MAIN

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

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.