Home | History | Annotate | only in /src/usr.sbin/timed
History log of /src/usr.sbin/timed
RevisionDateAuthorComments
 1.4 29-Sep-2020  msaitoh s/parition/partition/
 1.3 06-Jan-2003  wiz compatibility, not compatiblity.
 1.2 20-Aug-2001  wiz precede, not preceed.
 1.1 03-Nov-1993  cgd update timed to the latest version, as supplied and ported by
<Vernon Schryver> vjs@calcite.rhyolite.com.
 1.6 10-Jun-2018  christos use SUBDIR.roff suggested by uwe@
 1.5 05-Jul-2014  dholland branches: 1.5.22;
Rework /usr/share/doc.

Update the <bsd.doc.mk> infrastructure, and update the docs to match
the new infrastructure.

- Build and install text, ps, pdf, and/or html, not roff sources.

- Don't wire the chapter numbers into the build system, or use them in
the installed pathnames. This didn't matter much when the docs were a
museum, but now that we're theoretically going to start maintaining
them again, we're going to add and remove documents periodically and
having the chapter numbers baked in creates a lot of thrashing for no
purpose.

- Specify the document name explicitly, rather than implicitly in a
path. Use this name (instead of other random strings) as the name
of the installed files.

- Specify the document section, which is the subdirectory of
/usr/share/doc to install into.

- Allow multiple subdocuments. (That is, multiple documents in one
output directory.)

- Enumerate the .png files groff emits along with html so they can be
installed.

- Remove assorted hand-rolled rules for running roff and roff widgetry
and add enough variable settings to make these unnecessary. This
includes support for
- explicit use of soelim
- refer
- tbl
- pic
- eqn

- Forcibly apply at least minimal amounts of sanity to certain
autogenerated roff files.

- Don't exclude USD.doc, SMM.doc, and PSD.doc directories from the
build, as they now actually do stuff.

Note: currently we can't generate pdf. This turns out to be a
nontrivial problem with no immediate solution forthcoming. So for now,
as a workaround, install compressed .ps as the printable form.
 1.4 21-Dec-1997  christos branches: 1.4.72; 1.4.84;
Install the docs.
 1.3 17-Oct-1997  mrg merge lite-2
 1.2 30-Jul-1993  mycroft Add RCS identifiers.
 1.1 21-Mar-1993  cgd branches: 1.1.1;
Initial revision
 1.1.1.2 06-Jun-1993  mrg 4.4BSD-Lite2
 1.1.1.1 21-Mar-1993  cgd initial import of 386bsd-0.1 sources
 1.4.84.1 10-Aug-2014  tls Rebase.
 1.4.72.1 20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.5.22.1 25-Jun-2018  pgoyette Sync with HEAD
 1.4 22-Apr-2009  lukem Enable WARNS=4 by default, except for:
cpuctl dumplfs hprop ipf iprop-log kadmin kcm kdc kdigest
kimpersonate kstash ktutil makefs ndbootd ntp pppd quot
racoon racoonctl rtadvd sntp sup tcpdchk tcpdmatch tcpdump
traceroute traceroute6 user veriexecgen wsmoused zic
(Mostly third-party applications)
 1.3 28-May-2007  tls branches: 1.3.20;
Add new Makefile knob, USE_FORT, which extends USE_SSP by turning on the
FORTIFY_SOURCE feature of libssp, thus checking the size of arguments to
various string and memory copy and set functions (as well as a few system
calls and other miscellany) where known at function entry. RedHat has
evidently built all "core system packages" with this option for some time.

This option should be used at the top of Makefiles (or Makefile.inc where
this is used for subdirectories) but after any setting of LIB.

This is only useful for userland code, and cannot be used in libc or in
any code which includes the libc internals, because it overrides certain
libc functions with macros. Some effort has been made to make USE_FORT=yes
work correctly for a full-system build by having the bsd.sys.mk logic
disable the feature where it should not be used (libc, libssp iteself,
the kernel) but no attempt has been made to build the entire system with
USE_FORT and doing so will doubtless expose numerous bugs and misfeatures.

Adjust the system build so that all programs and libraries that are setuid,
directly handle network data (including serial comm data), perform
authentication, or appear likely to have (or have a history of having)
data-driven bugs (e.g. file(1)) are built with USE_FORT=yes by default,
with the exception of libc, which cannot use USE_FORT and thus uses
only USE_SSP by default. Tested on i386 with no ill results; USE_FORT=no
per-directory or in a system build will disable if desired.
 1.2 25-Jan-2007  christos WARNS=4
 1.1 17-Oct-1997  lukem WARNSify
 1.3.20.1 13-May-2009  jym Sync with HEAD.

Third (and last) commit. See http://mail-index.netbsd.org/source-changes/2009/05/13/msg221222.html
 1.1 21-Dec-1997  christos Install the docs.
 1.7 05-Jul-2014  dholland Reorg docs, part 1:
Move all the reference manuals to subdirs of /usr/share/doc/reference.
We have subdirs ref1-ref9, corresponding to man page sections 1-9.

Everything that's the reference manual for a program (sections 1, 6,
8), C interface (sections 2, 3), driver or file system (section 4),
format or configuration (section 5), or kernel internal interface
(section 9) belongs in here.

Section 7 is a little less clear: some things that might go in section
7 if they were a man page aren't really reference manuals. So I'm only
putting things in reference section 7 that are (to me) clearly
reference material, rather than e.g. tutorials, guides, FAQs, etc.
This obviously leaves some room for debate, especially without first
editing the docs with this distinction in mind, but if people hate
what I've done things can always be moved again.

Note also that while roff macro man pages traditionally go in section
7, I have put all the roff documentation (macros, tools, etc.) in one
place in reference/ref1/roff. This will make it easier to find and
also easier to edit it into some kind of coherent form.
 1.6 05-Jul-2014  dholland Rework /usr/share/doc.

Update the <bsd.doc.mk> infrastructure, and update the docs to match
the new infrastructure.

- Build and install text, ps, pdf, and/or html, not roff sources.

- Don't wire the chapter numbers into the build system, or use them in
the installed pathnames. This didn't matter much when the docs were a
museum, but now that we're theoretically going to start maintaining
them again, we're going to add and remove documents periodically and
having the chapter numbers baked in creates a lot of thrashing for no
purpose.

- Specify the document name explicitly, rather than implicitly in a
path. Use this name (instead of other random strings) as the name
of the installed files.

- Specify the document section, which is the subdirectory of
/usr/share/doc to install into.

- Allow multiple subdocuments. (That is, multiple documents in one
output directory.)

- Enumerate the .png files groff emits along with html so they can be
installed.

- Remove assorted hand-rolled rules for running roff and roff widgetry
and add enough variable settings to make these unnecessary. This
includes support for
- explicit use of soelim
- refer
- tbl
- pic
- eqn

- Forcibly apply at least minimal amounts of sanity to certain
autogenerated roff files.

- Don't exclude USD.doc, SMM.doc, and PSD.doc directories from the
build, as they now actually do stuff.

Note: currently we can't generate pdf. This turns out to be a
nontrivial problem with no immediate solution forthcoming. So for now,
as a workaround, install compressed .ps as the printable form.
 1.5 10-Jul-2003  lukem branches: 1.5.60; 1.5.72;
Rename a large chunk of the make(1) variables which refer to a
program/tool from "FOO" to "TOOL_FOO". The new variables are:
TOOL_ASN1_COMPILE TOOL_CAP_MKDB TOOL_CAT TOOL_CKSUM TOOL_COMPILE_ET
TOOL_CONFIG TOOL_CRUNCHGEN TOOL_CTAGS TOOL_DB TOOL_EQN TOOL_FGEN
TOOL_GENCAT TOOL_GROFF TOOL_HEXDUMP TOOL_INDXBIB TOOL_INSTALLBOOT
TOOL_INSTALL_INFO TOOL_M4 TOOL_MAKEFS TOOL_MAKEINFO TOOL_MAKEWHATIS
TOOL_MDSETIMAGE TOOL_MENUC TOOL_MKCSMAPPER TOOL_MKESDB
TOOL_MKLOCALE TOOL_MKMAGIC TOOL_MKTEMP TOOL_MSGC TOOL_MTREE
TOOL_PAX TOOL_PIC TOOL_PREPMKBOOTIMAGE TOOL_PWD_MKDB TOOL_REFER
TOOL_ROFF_ASCII TOOL_ROFF_DVI TOOL_ROFF_HTML TOOL_ROFF_PS
TOOL_ROFF_RAW TOOL_RPCGEN TOOL_SOELIM TOOL_SUNLABEL TOOL_TBL
TOOL_UUDECODE TOOL_VGRIND TOOL_ZIC

For each, provide default in <bsd.sys.mk> of the form:
TOOL_FOO?= foo
and for the ${USETOOLS}=="yes" case in <bsd.own.mk>, provide override:
TOOL_FOO= ${TOOLDIR}/bin/${_TOOL_PREFIX}foo

Document all of these in bsd.README.

This cleans up a chunk of potential (and actual) namespace collision
within our build infrastructure, as well as improves consistency in
the share/mk documentation and provision of appropriate defaults for
each of these variables.
 1.4 05-Jan-2003  pooka Add ${MACROS} to ${ROFF} usage to make output readable

from jbernard@mines.edu in misc/19685
 1.3 09-Jan-1998  perry RCS Id Police.
 1.2 21-Dec-1997  christos Obj dir and groff fixes.
 1.1 11-May-1994  mrg branches: 1.1.1;
Initial revision
 1.1.1.1 11-May-1994  mrg 4.4BSD-Lite2
 1.5.72.1 10-Aug-2014  tls Rebase.
 1.5.60.1 20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.3 07-Aug-2003  agc Move UCB-licensed code from 4-clause to 3-clause licence.

Patches provided by Joel Baker in PR 22366, verified by myself.
 1.2 09-Jan-1998  perry RCS Id Police.
 1.1 08-Jun-1993  mrg branches: 1.1.1;
Initial revision
 1.1.1.1 08-Jun-1993  mrg 4.4BSD-Lite2
 1.3 07-Aug-2003  agc Move UCB-licensed code from 4-clause to 3-clause licence.

Patches provided by Joel Baker in PR 22366, verified by myself.
 1.2 09-Jan-1998  perry RCS Id Police.
 1.1 08-Jun-1993  mrg branches: 1.1.1;
Initial revision
 1.1.1.1 08-Jun-1993  mrg 4.4BSD-Lite2
 1.1 08-Jun-1993  mrg branches: 1.1.1;
Initial revision
 1.1.1.1 08-Jun-1993  mrg 4.4BSD-Lite2
 1.3 07-Aug-2003  agc Move UCB-licensed code from 4-clause to 3-clause licence.

Patches provided by Joel Baker in PR 22366, verified by myself.
 1.2 09-Jan-1998  perry RCS Id Police.
 1.1 08-Jun-1993  mrg branches: 1.1.1;
Initial revision
 1.1.1.1 08-Jun-1993  mrg 4.4BSD-Lite2
 1.5 07-Aug-2003  agc Move UCB-licensed code from 4-clause to 3-clause licence.

Patches provided by Joel Baker in PR 22366, verified by myself.
 1.4 10-Sep-1999  simonb s/acknowledgment/acknowledgement/
 1.3 09-Jan-1998  perry RCS Id Police.
 1.2 21-Dec-1997  christos Obj dir and groff fixes.
 1.1 08-Jun-1993  mrg branches: 1.1.1;
Initial revision
 1.1.1.1 08-Jun-1993  mrg 4.4BSD-Lite2
 1.3 07-Aug-2003  agc Move UCB-licensed code from 4-clause to 3-clause licence.

Patches provided by Joel Baker in PR 22366, verified by myself.
 1.2 09-Jan-1998  perry RCS Id Police.
 1.1 08-Jun-1993  mrg branches: 1.1.1;
Initial revision
 1.1.1.1 08-Jun-1993  mrg 4.4BSD-Lite2
 1.4 05-Jul-2014  dholland Reorg docs, part 1:
Move all the reference manuals to subdirs of /usr/share/doc/reference.
We have subdirs ref1-ref9, corresponding to man page sections 1-9.

Everything that's the reference manual for a program (sections 1, 6,
8), C interface (sections 2, 3), driver or file system (section 4),
format or configuration (section 5), or kernel internal interface
(section 9) belongs in here.

Section 7 is a little less clear: some things that might go in section
7 if they were a man page aren't really reference manuals. So I'm only
putting things in reference section 7 that are (to me) clearly
reference material, rather than e.g. tutorials, guides, FAQs, etc.
This obviously leaves some room for debate, especially without first
editing the docs with this distinction in mind, but if people hate
what I've done things can always be moved again.

Note also that while roff macro man pages traditionally go in section
7, I have put all the roff documentation (macros, tools, etc.) in one
place in reference/ref1/roff. This will make it easier to find and
also easier to edit it into some kind of coherent form.
 1.3 05-Jul-2014  dholland Rework /usr/share/doc.

Update the <bsd.doc.mk> infrastructure, and update the docs to match
the new infrastructure.

- Build and install text, ps, pdf, and/or html, not roff sources.

- Don't wire the chapter numbers into the build system, or use them in
the installed pathnames. This didn't matter much when the docs were a
museum, but now that we're theoretically going to start maintaining
them again, we're going to add and remove documents periodically and
having the chapter numbers baked in creates a lot of thrashing for no
purpose.

- Specify the document name explicitly, rather than implicitly in a
path. Use this name (instead of other random strings) as the name
of the installed files.

- Specify the document section, which is the subdirectory of
/usr/share/doc to install into.

- Allow multiple subdocuments. (That is, multiple documents in one
output directory.)

- Enumerate the .png files groff emits along with html so they can be
installed.

- Remove assorted hand-rolled rules for running roff and roff widgetry
and add enough variable settings to make these unnecessary. This
includes support for
- explicit use of soelim
- refer
- tbl
- pic
- eqn

- Forcibly apply at least minimal amounts of sanity to certain
autogenerated roff files.

- Don't exclude USD.doc, SMM.doc, and PSD.doc directories from the
build, as they now actually do stuff.

Note: currently we can't generate pdf. This turns out to be a
nontrivial problem with no immediate solution forthcoming. So for now,
as a workaround, install compressed .ps as the printable form.
 1.2 09-Jan-1998  perry branches: 1.2.72; 1.2.84;
RCS Id Police.
 1.1 05-Jul-1993  mrg branches: 1.1.1;
Initial revision
 1.1.1.1 05-Jul-1993  mrg 4.4BSD-Lite2
 1.2.84.1 10-Aug-2014  tls Rebase.
 1.2.72.1 20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.3 07-Aug-2003  agc Move UCB-licensed code from 4-clause to 3-clause licence.

Patches provided by Joel Baker in PR 22366, verified by myself.
 1.2 09-Jan-1998  perry RCS Id Police.
 1.1 08-Jun-1993  mrg branches: 1.1.1;
Initial revision
 1.1.1.1 08-Jun-1993  mrg 4.4BSD-Lite2
 1.4 29-Sep-2020  msaitoh s/parition/partition/
 1.3 06-Jan-2003  wiz compatibility, not compatiblity.
 1.2 20-Aug-2001  wiz precede, not preceed.
 1.1 26-Mar-1995  mrg branches: 1.1.1;
Initial revision
 1.1.1.1 26-Mar-1995  mrg 4.4BSD-Lite2
 1.15 03-Jun-2023  lukem bsd.own.mk: rename GCC_NO_* to CC_WNO_*

Rename compiler-warning-disable variables from
GCC_NO_warning
to
CC_WNO_warning
where warning is the full warning name as used by the compiler.

GCC_NO_IMPLICIT_FALLTHRU is CC_WNO_IMPLICIT_FALLTHROUGH

Using the convention CC_compilerflag, where compilerflag
is based on the full compiler flag name.
 1.14 09-Feb-2020  fox usr.sbin/timed: Suppress -Werror=stringop-truncation error.

Add GCC_NO_STRINGOP_TRUNCATION master.c to prevent build failure.

Error was reported when build.sh was run with MKLIBCSANITIZER=yes flag.

Reviewed by: kamil@
 1.13 11-Nov-2019  joerg Update LLVM to 10.0.0git (01f3a59fb3e2542fce74c768718f594d0debd0da)
 1.12 25-Jan-2007  christos branches: 1.12.76;
- merge the update code in one function
- support wtmpx
- kill local decls of logwtmp; use util.h
 1.11 25-Jan-2007  cbiere * Modified in_cksum() so it can handle unaligned data.
* Replaced most strlcpy() with set_tsp_name() and get_tsp_name() because
strlcpy() could potentially run out-of-bounds and doesn't zero out
unused buffer space.
* Replaced bcopy/bzero() with memcpy/memset().
* Fixed potential alignment/aliasing issues in measure().
* Replace u_short/u_long with uint16_t/uint32_t/in_addr_t where appropriate.
* Renamed sin to addr because sin is a reserved identifier.
* Use bindresvport() instead of looping over bind(); rresvport() returns
a SOCK_STREAM socket not SOCK_DGRAM.
 1.10 10-Jul-2002  wiz Make compile with -DHAVENIS. Also make compile with WARNS=2, and
set WARNS=2 in Makefile.
 1.9 05-Jan-1998  lukem fix rcsid
 1.8 17-Oct-1997  lukem WARNSify
 1.7 17-Oct-1997  mrg merge lite-2
 1.6 22-Dec-1994  cgd specify man pages the new way.
 1.5 03-Nov-1993  cgd update timed to the latest version, as supplied and ported by
<Vernon Schryver> vjs@calcite.rhyolite.com.
 1.4 30-Jul-1993  mycroft Add RCS identifiers.
 1.3 13-May-1993  cgd add rule for hp300 cksum routine. yes, i know it points to cksum.tahoe.c.
net2 did it that way!!!
 1.2 23-Mar-1993  cgd fixed CVS's fight with a cksum.i386.c (a symlink to cksum.tahoe.c).
 1.1 21-Mar-1993  cgd branches: 1.1.1;
Initial revision
 1.1.1.2 06-Jun-1993  mrg 4.4BSD-Lite2
 1.1.1.1 21-Mar-1993  cgd initial import of 386bsd-0.1 sources
 1.12.76.1 13-Apr-2020  martin Mostly merge changes from HEAD upto 20200411
 1.11 26-Jan-2007  christos - centralize sendto tsp
- cleanup some casts
 1.10 25-Jan-2007  cbiere * Modified in_cksum() so it can handle unaligned data.
* Replaced most strlcpy() with set_tsp_name() and get_tsp_name() because
strlcpy() could potentially run out-of-bounds and doesn't zero out
unused buffer space.
* Replaced bcopy/bzero() with memcpy/memset().
* Fixed potential alignment/aliasing issues in measure().
* Replace u_short/u_long with uint16_t/uint32_t/in_addr_t where appropriate.
* Renamed sin to addr because sin is a reserved identifier.
* Use bindresvport() instead of looping over bind(); rresvport() returns
a SOCK_STREAM socket not SOCK_DGRAM.
 1.9 07-Aug-2003  agc Move UCB-licensed code from 4-clause to 3-clause licence.

Patches provided by Joel Baker in PR 22366, verified by myself.
 1.8 16-May-2003  itojun avoid possible buffer overrun
 1.7 06-Jul-2002  wiz ANSIfy, remove __P().
 1.6 02-Sep-2001  reinoud Code cleanup; remove all `#ifdef sgi' from the code... this clobbered the
code considerably and was mainly providing SGI specific logging facilities
and some hacks to improve the relyablility on SGI systems by increasing
priorities etc...
 1.5 17-Oct-1997  lukem WARNSify
 1.4 17-Oct-1997  mrg merge lite-2
 1.3 03-Nov-1993  cgd update timed to the latest version, as supplied and ported by
<Vernon Schryver> vjs@calcite.rhyolite.com.
 1.2 01-Aug-1993  mycroft Add RCS identifiers.
 1.1 21-Mar-1993  cgd branches: 1.1.1;
Initial revision
 1.1.1.2 06-Jun-1993  mrg 4.4BSD-Lite2
 1.1.1.1 21-Mar-1993  cgd initial import of 386bsd-0.1 sources
 1.9 25-Jan-2007  cbiere * Modified in_cksum() so it can handle unaligned data.
* Replaced most strlcpy() with set_tsp_name() and get_tsp_name() because
strlcpy() could potentially run out-of-bounds and doesn't zero out
unused buffer space.
* Replaced bcopy/bzero() with memcpy/memset().
* Fixed potential alignment/aliasing issues in measure().
* Replace u_short/u_long with uint16_t/uint32_t/in_addr_t where appropriate.
* Renamed sin to addr because sin is a reserved identifier.
* Use bindresvport() instead of looping over bind(); rresvport() returns
a SOCK_STREAM socket not SOCK_DGRAM.
 1.8 07-Aug-2003  agc Move UCB-licensed code from 4-clause to 3-clause licence.

Patches provided by Joel Baker in PR 22366, verified by myself.
 1.7 06-Jul-2002  wiz ANSIfy, remove __P().
 1.6 02-Sep-2001  reinoud Code cleanup; remove all `#ifdef sgi' from the code... this clobbered the
code considerably and was mainly providing SGI specific logging facilities
and some hacks to improve the relyablility on SGI systems by increasing
priorities etc...
 1.5 17-Oct-1997  lukem WARNSify
 1.4 17-Oct-1997  mrg merge lite-2
 1.3 03-Nov-1993  cgd update timed to the latest version, as supplied and ported by
<Vernon Schryver> vjs@calcite.rhyolite.com.
 1.2 01-Aug-1993  mycroft Add RCS identifiers.
 1.1 21-Mar-1993  cgd branches: 1.1.1;
Initial revision
 1.1.1.2 06-Jun-1993  mrg 4.4BSD-Lite2
 1.1.1.1 21-Mar-1993  cgd initial import of 386bsd-0.1 sources
 1.12 26-Jan-2007  christos - centralize sendto tsp
- cleanup some casts
 1.11 25-Jan-2007  cbiere * Modified in_cksum() so it can handle unaligned data.
* Replaced most strlcpy() with set_tsp_name() and get_tsp_name() because
strlcpy() could potentially run out-of-bounds and doesn't zero out
unused buffer space.
* Replaced bcopy/bzero() with memcpy/memset().
* Fixed potential alignment/aliasing issues in measure().
* Replace u_short/u_long with uint16_t/uint32_t/in_addr_t where appropriate.
* Renamed sin to addr because sin is a reserved identifier.
* Use bindresvport() instead of looping over bind(); rresvport() returns
a SOCK_STREAM socket not SOCK_DGRAM.
 1.10 07-Aug-2003  agc Move UCB-licensed code from 4-clause to 3-clause licence.

Patches provided by Joel Baker in PR 22366, verified by myself.
 1.9 16-May-2003  itojun avoid possible buffer overrun
 1.8 06-Jul-2002  wiz ANSIfy, remove __P().
 1.7 02-Sep-2001  reinoud Code cleanup; remove all `#ifdef sgi' from the code... this clobbered the
code considerably and was mainly providing SGI specific logging facilities
and some hacks to improve the relyablility on SGI systems by increasing
priorities etc...
 1.6 17-Oct-1997  lukem WARNSify
 1.5 17-Oct-1997  mrg merge lite-2
 1.4 21-Mar-1995  mycroft Update to use timer{add,sub}().
 1.3 03-Nov-1993  cgd update timed to the latest version, as supplied and ported by
<Vernon Schryver> vjs@calcite.rhyolite.com.
 1.2 01-Aug-1993  mycroft Add RCS identifiers.
 1.1 21-Mar-1993  cgd branches: 1.1.1;
Initial revision
 1.1.1.2 06-Jun-1993  mrg 4.4BSD-Lite2
 1.1.1.1 21-Mar-1993  cgd initial import of 386bsd-0.1 sources
 1.7 17-May-2007  christos whitespace fixes.
 1.6 25-Jan-2007  cbiere * Modified in_cksum() so it can handle unaligned data.
* Replaced most strlcpy() with set_tsp_name() and get_tsp_name() because
strlcpy() could potentially run out-of-bounds and doesn't zero out
unused buffer space.
* Replaced bcopy/bzero() with memcpy/memset().
* Fixed potential alignment/aliasing issues in measure().
* Replace u_short/u_long with uint16_t/uint32_t/in_addr_t where appropriate.
* Renamed sin to addr because sin is a reserved identifier.
* Use bindresvport() instead of looping over bind(); rresvport() returns
a SOCK_STREAM socket not SOCK_DGRAM.
 1.5 06-Feb-2005  perry remove obsolete register declarations.
 1.4 07-Aug-2003  agc Move UCB-licensed code from 4-clause to 3-clause licence.

Patches provided by Joel Baker in PR 22366, verified by myself.
 1.3 02-Sep-2001  reinoud Code cleanup; remove all `#ifdef sgi' from the code... this clobbered the
code considerably and was mainly providing SGI specific logging facilities
and some hacks to improve the relyablility on SGI systems by increasing
priorities etc...
 1.2 17-Oct-1997  lukem WARNSify
 1.1 03-Nov-1993  cgd branches: 1.1.1;
update timed to the latest version, as supplied and ported by
<Vernon Schryver> vjs@calcite.rhyolite.com.
 1.1.1.1 17-Oct-1997  mrg 4.4BSD-Lite2
 1.3 03-Nov-1993  mycroft Clean up deleted files.
 1.2 01-Aug-1993  mycroft Add RCS identifiers.
 1.1 21-Mar-1993  cgd branches: 1.1.1;
Initial revision
 1.1.1.1 21-Mar-1993  cgd initial import of 386bsd-0.1 sources
 1.3 03-Nov-1993  mycroft Clean up deleted files.
 1.2 01-Aug-1993  mycroft Add RCS identifiers.
 1.1 21-Mar-1993  cgd branches: 1.1.1;
Initial revision
 1.1.1.1 21-Mar-1993  cgd initial import of 386bsd-0.1 sources
 1.14 17-May-2007  christos Deal with delta being negative on machines which signed shifts don't shift 1's.
 1.13 26-Jan-2007  christos - centralize sendto tsp
- cleanup some casts
 1.12 25-Jan-2007  cbiere * Modified in_cksum() so it can handle unaligned data.
* Replaced most strlcpy() with set_tsp_name() and get_tsp_name() because
strlcpy() could potentially run out-of-bounds and doesn't zero out
unused buffer space.
* Replaced bcopy/bzero() with memcpy/memset().
* Fixed potential alignment/aliasing issues in measure().
* Replace u_short/u_long with uint16_t/uint32_t/in_addr_t where appropriate.
* Renamed sin to addr because sin is a reserved identifier.
* Use bindresvport() instead of looping over bind(); rresvport() returns
a SOCK_STREAM socket not SOCK_DGRAM.
 1.11 07-Aug-2003  agc Move UCB-licensed code from 4-clause to 3-clause licence.

Patches provided by Joel Baker in PR 22366, verified by myself.
 1.10 16-May-2003  itojun avoid possible buffer overrun
 1.9 02-Sep-2001  reinoud Code cleanup; remove all `#ifdef sgi' from the code... this clobbered the
code considerably and was mainly providing SGI specific logging facilities
and some hacks to improve the relyablility on SGI systems by increasing
priorities etc...
 1.8 17-Oct-1997  lukem WARNSify
 1.7 17-Oct-1997  mrg merge lite-2
 1.6 06-Apr-1996  cgd use fixed-size types where appropriate, to make timed work on 64-bit
machines (Alpha). fixed sized types, not 'timeval's should go over
the net, and the stuff that goes over the net can't necessarily be
passed directly to functions that expect timevals.
 1.5 21-Mar-1995  mycroft Update to use timer{add,sub}().
 1.4 21-Mar-1995  mycroft Update to use timer{add,sub}().
 1.3 03-Nov-1993  cgd update timed to the latest version, as supplied and ported by
<Vernon Schryver> vjs@calcite.rhyolite.com.
 1.2 01-Aug-1993  mycroft Add RCS identifiers.
 1.1 21-Mar-1993  cgd branches: 1.1.1;
Initial revision
 1.1.1.2 06-Jun-1993  mrg 4.4BSD-Lite2
 1.1.1.1 21-Mar-1993  cgd initial import of 386bsd-0.1 sources
 1.3 06-Jul-2002  wiz Remove unused files (cf. timed{,c}/timed{,c}-extern.h).
 1.2 09-Jan-1998  perry RCS Id Police.
 1.1 06-Jun-1993  mrg branches: 1.1.1;
Initial revision
 1.1.1.1 06-Jun-1993  mrg 4.4BSD-Lite2
 1.12 16-Oct-2022  rillig timed: fix typos in comments
 1.11 25-Jan-2007  cbiere * Modified in_cksum() so it can handle unaligned data.
* Replaced most strlcpy() with set_tsp_name() and get_tsp_name() because
strlcpy() could potentially run out-of-bounds and doesn't zero out
unused buffer space.
* Replaced bcopy/bzero() with memcpy/memset().
* Fixed potential alignment/aliasing issues in measure().
* Replace u_short/u_long with uint16_t/uint32_t/in_addr_t where appropriate.
* Renamed sin to addr because sin is a reserved identifier.
* Use bindresvport() instead of looping over bind(); rresvport() returns
a SOCK_STREAM socket not SOCK_DGRAM.
 1.10 16-Jan-2007  hubertf #including <syslog.h> once is enough
From Slava Semushin <slava.semushin@gmail.com> in private mail
 1.9 07-Aug-2003  agc Move UCB-licensed code from 4-clause to 3-clause licence.

Patches provided by Joel Baker in PR 22366, verified by myself.
 1.8 19-Sep-2002  mycroft select() -> poll(), nanosleep()
 1.7 02-Sep-2001  reinoud Code cleanup; remove all `#ifdef sgi' from the code... this clobbered the
code considerably and was mainly providing SGI specific logging facilities
and some hacks to improve the relyablility on SGI systems by increasing
priorities etc...
 1.6 07-Mar-2001  garbled Remove __FILE__ and __LINE__ from a normal error message reported via
syslog. Closes PR 5875
 1.5 21-Jan-2000  mycroft Nuke `extern int errno;' in code we compile with -Wstrict-prototypes. We get
the correct definition from errno.h.
 1.4 17-Oct-1997  mrg branches: 1.4.4;
merge lite-2
 1.3 03-Nov-1993  cgd update timed to the latest version, as supplied and ported by
<Vernon Schryver> vjs@calcite.rhyolite.com.
 1.2 01-Aug-1993  mycroft Add RCS identifiers.
 1.1 21-Mar-1993  cgd branches: 1.1.1;
Initial revision
 1.1.1.2 06-Jun-1993  mrg 4.4BSD-Lite2
 1.1.1.1 21-Mar-1993  cgd initial import of 386bsd-0.1 sources
 1.4.4.1 23-Jan-2000  he Pull up revision 1.5 (requested by mycroft):
Always do the errno indirection hack, so that non-threaded
libraries get the right errno value when linked with -lpthread.
This means "always include <errno.h> and never declare errno
yourself".
 1.18 26-Jan-2007  christos - centralize sendto tsp
- cleanup some casts
 1.17 25-Jan-2007  christos - merge the update code in one function
- support wtmpx
- kill local decls of logwtmp; use util.h
 1.16 25-Jan-2007  cbiere * Modified in_cksum() so it can handle unaligned data.
* Replaced most strlcpy() with set_tsp_name() and get_tsp_name() because
strlcpy() could potentially run out-of-bounds and doesn't zero out
unused buffer space.
* Replaced bcopy/bzero() with memcpy/memset().
* Fixed potential alignment/aliasing issues in measure().
* Replace u_short/u_long with uint16_t/uint32_t/in_addr_t where appropriate.
* Renamed sin to addr because sin is a reserved identifier.
* Use bindresvport() instead of looping over bind(); rresvport() returns
a SOCK_STREAM socket not SOCK_DGRAM.
 1.15 19-Apr-2005  christos make master() return void.
 1.14 07-Aug-2003  agc Move UCB-licensed code from 4-clause to 3-clause licence.

Patches provided by Joel Baker in PR 22366, verified by myself.
 1.13 17-May-2003  itojun use strlcpy
 1.12 16-May-2003  itojun avoid possible buffer overrun
 1.11 02-Aug-2002  christos Don't include utmp.h
 1.10 06-Jul-2002  wiz ANSIfy, remove __P().
 1.9 02-Sep-2001  reinoud Code cleanup; remove all `#ifdef sgi' from the code... this clobbered the
code considerably and was mainly providing SGI specific logging facilities
and some hacks to improve the relyablility on SGI systems by increasing
priorities etc...
 1.8 17-Oct-1997  lukem WARNSify
 1.7 17-Oct-1997  mrg merge lite-2
 1.6 06-Apr-1996  cgd use fixed-size types where appropriate, to make timed work on 64-bit
machines (Alpha). fixed sized types, not 'timeval's should go over
the net, and the stuff that goes over the net can't necessarily be
passed directly to functions that expect timevals.
 1.5 07-Jun-1995  cgd typeof(timeval.tv_sec) != time_t
 1.4 21-Mar-1995  mycroft Update to use timer{add,sub}().
 1.3 03-Nov-1993  cgd update timed to the latest version, as supplied and ported by
<Vernon Schryver> vjs@calcite.rhyolite.com.
 1.2 01-Aug-1993  mycroft Add RCS identifiers.
 1.1 21-Mar-1993  cgd branches: 1.1.1;
Initial revision
 1.1.1.2 06-Jun-1993  mrg 4.4BSD-Lite2
 1.1.1.1 21-Mar-1993  cgd initial import of 386bsd-0.1 sources
 1.17 04-Nov-2012  christos include utmpx.h if needed
 1.16 04-Feb-2007  cbiere branches: 1.16.34; 1.16.40;
* timed and timedc:
* Sprinkle const.
* Use EXIT_FAILURE instead of 1.
* Use err(), errx().
* Use calloc() instead of malloc()+memset().
* timedc:
* Non-terminated hostnames or unknown tsp_type could
cause a crash due to out-of-bounds reads in msite().
* Check the received packet size.
* Merged duplicated code into functions.
* Moved variables into the relevant scopes.
* Use connect() so that only the receiver can reply,
send()/recv() can be used and rejected packets
are immediately noticed by recv() instead of causing
timeouts.
* Updated manpage.
 1.15 25-Jan-2007  christos - merge the update code in one function
- support wtmpx
- kill local decls of logwtmp; use util.h
 1.14 25-Jan-2007  cbiere * Modified in_cksum() so it can handle unaligned data.
* Replaced most strlcpy() with set_tsp_name() and get_tsp_name() because
strlcpy() could potentially run out-of-bounds and doesn't zero out
unused buffer space.
* Replaced bcopy/bzero() with memcpy/memset().
* Fixed potential alignment/aliasing issues in measure().
* Replace u_short/u_long with uint16_t/uint32_t/in_addr_t where appropriate.
* Renamed sin to addr because sin is a reserved identifier.
* Use bindresvport() instead of looping over bind(); rresvport() returns
a SOCK_STREAM socket not SOCK_DGRAM.
 1.13 09-May-2006  mrg change (mostly) int to socklen_t. GCC 4 doesn't like that int and
socklen_t are different signness.
 1.12 06-Feb-2005  perry remove obsolete register declarations.
 1.11 07-Aug-2003  agc Move UCB-licensed code from 4-clause to 3-clause licence.

Patches provided by Joel Baker in PR 22366, verified by myself.
 1.10 19-Sep-2002  mycroft select() -> poll(), nanosleep()
 1.9 10-Jul-2002  wiz Make compile with -DHAVENIS. Also make compile with WARNS=2, and
set WARNS=2 in Makefile.
 1.8 02-Sep-2001  reinoud Code cleanup; remove all `#ifdef sgi' from the code... this clobbered the
code considerably and was mainly providing SGI specific logging facilities
and some hacks to improve the relyablility on SGI systems by increasing
priorities etc...
 1.7 17-Oct-1997  lukem WARNSify
 1.6 17-Oct-1997  mrg merge lite-2
 1.5 21-Mar-1995  mycroft Update to use timer{add,sub}().
 1.4 22-Apr-1994  pk Use network byte-order (from Gerard J van der Grinten <gvdg@nlr.nl>)
 1.3 03-Nov-1993  cgd update timed to the latest version, as supplied and ported by
<Vernon Schryver> vjs@calcite.rhyolite.com.
 1.2 01-Aug-1993  mycroft Add RCS identifiers.
 1.1 21-Mar-1993  cgd branches: 1.1.1;
Initial revision
 1.1.1.2 26-Mar-1995  mrg 4.4BSD-Lite2
 1.1.1.1 21-Mar-1993  cgd initial import of 386bsd-0.1 sources
 1.16.40.1 20-Nov-2012  tls Resync to 2012-11-19 00:00:00 UTC
 1.16.34.1 16-Jan-2013  yamt sync with (a bit old) head
 1.13 18-Oct-2021  christos Explicitly cast the long->float conversion since it is value-changing and
produces clang warnings.
 1.12 07-Aug-2003  agc Move UCB-licensed code from 4-clause to 3-clause licence.

Patches provided by Joel Baker in PR 22366, verified by myself.
 1.11 20-Jan-2003  simonb The Double-Semi-Colon Police.
 1.10 06-Jul-2002  wiz ANSIfy, remove __P().
 1.9 02-Sep-2001  reinoud Code cleanup; remove all `#ifdef sgi' from the code... this clobbered the
code considerably and was mainly providing SGI specific logging facilities
and some hacks to improve the relyablility on SGI systems by increasing
priorities etc...
 1.8 20-Oct-1997  drochner Oops, mrg had a reason to use %ld format.
We really need a cast to print off_t values.
 1.7 20-Oct-1997  drochner fix printf format
 1.6 19-Oct-1997  mrg fix compile warnings on the alpha.
 1.5 17-Oct-1997  lukem WARNSify
 1.4 17-Oct-1997  mrg merge lite-2
 1.3 03-Nov-1993  cgd update timed to the latest version, as supplied and ported by
<Vernon Schryver> vjs@calcite.rhyolite.com.
 1.2 01-Aug-1993  mycroft Add RCS identifiers.
 1.1 21-Mar-1993  cgd branches: 1.1.1;
Initial revision
 1.1.1.2 28-Apr-1995  mrg 4.4BSD-Lite2
 1.1.1.1 21-Mar-1993  cgd initial import of 386bsd-0.1 sources
 1.7 07-Aug-2003  agc Move UCB-licensed code from 4-clause to 3-clause licence.

Patches provided by Joel Baker in PR 22366, verified by myself.
 1.6 02-Sep-2001  reinoud Code cleanup; remove all `#ifdef sgi' from the code... this clobbered the
code considerably and was mainly providing SGI specific logging facilities
and some hacks to improve the relyablility on SGI systems by increasing
priorities etc...
 1.5 09-Jan-1998  perry RCS Id Police.
 1.4 17-Oct-1997  mrg merge lite-2
 1.3 03-Nov-1993  cgd update timed to the latest version, as supplied and ported by
<Vernon Schryver> vjs@calcite.rhyolite.com.
 1.2 01-Aug-1993  mycroft Add RCS identifiers.
 1.1 21-Mar-1993  cgd branches: 1.1.1;
Initial revision
 1.1.1.2 06-Jun-1993  mrg 4.4BSD-Lite2
 1.1.1.1 21-Mar-1993  cgd initial import of 386bsd-0.1 sources
 1.23 11-Aug-2017  ginsbach PR bin/42464: Timothy McIntosh: Fix timed interoperability

Fix is a combination of FreeBSD fix and submitted patch.

[From the FreeBSD change]
The timed protocol is not implemented in a compatible way by all
vendors; the size of the tsp_name field is OS-dependent. 4.3BSD
used a 32-byte field, FreeBSD uses MAXHOSTNAMELEN and RedHat
apparently uses a 64-byte field. As a result, sanity checking code
added a few months ago to detect short packets will fail when
interoperating with one of these other vendors.

Change the short packet detection code to expect a minimum packet
size corresponding to the 4.3BSD implementation, which should be
a safe minimum size.
 1.22 16-Feb-2008  matt Change/fix tsptype to const char * const [];
 1.21 04-Feb-2007  cbiere branches: 1.21.4;
* timed and timedc:
* Sprinkle const.
* Use EXIT_FAILURE instead of 1.
* Use err(), errx().
* Use calloc() instead of malloc()+memset().
* timedc:
* Non-terminated hostnames or unknown tsp_type could
cause a crash due to out-of-bounds reads in msite().
* Check the received packet size.
* Merged duplicated code into functions.
* Moved variables into the relevant scopes.
* Use connect() so that only the receiver can reply,
send()/recv() can be used and rejected packets
are immediately noticed by recv() instead of causing
timeouts.
* Updated manpage.
 1.20 26-Jan-2007  christos - centralize sendto tsp
- cleanup some casts
 1.19 25-Jan-2007  cbiere * Modified in_cksum() so it can handle unaligned data.
* Replaced most strlcpy() with set_tsp_name() and get_tsp_name() because
strlcpy() could potentially run out-of-bounds and doesn't zero out
unused buffer space.
* Replaced bcopy/bzero() with memcpy/memset().
* Fixed potential alignment/aliasing issues in measure().
* Replace u_short/u_long with uint16_t/uint32_t/in_addr_t where appropriate.
* Renamed sin to addr because sin is a reserved identifier.
* Use bindresvport() instead of looping over bind(); rresvport() returns
a SOCK_STREAM socket not SOCK_DGRAM.
 1.18 09-May-2006  mrg change (mostly) int to socklen_t. GCC 4 doesn't like that int and
socklen_t are different signness.
 1.17 06-Feb-2005  perry remove obsolete register declarations.
 1.16 07-Aug-2003  agc Move UCB-licensed code from 4-clause to 3-clause licence.

Patches provided by Joel Baker in PR 22366, verified by myself.
 1.15 17-May-2003  itojun use strlcpy
 1.14 16-May-2003  itojun avoid possible buffer overrun
 1.13 19-Sep-2002  mycroft select() -> poll(), nanosleep()
 1.12 06-Jul-2002  wiz ANSIfy, remove __P().
 1.11 02-Sep-2001  reinoud Code cleanup; remove all `#ifdef sgi' from the code... this clobbered the
code considerably and was mainly providing SGI specific logging facilities
and some hacks to improve the relyablility on SGI systems by increasing
priorities etc...
 1.10 13-Mar-2001  itojun cope with malformed packets better.
ftp://ftp.FreeBSD.org/pub/FreeBSD/CERT/patches/SA-01:28/timed.patch
 1.9 27-Mar-2000  kleink branches: 1.9.4;
Cast timeval members to types we know the printf conversions of.
 1.8 10-Sep-1999  simonb s/acknowledgment/acknowledgement/
 1.7 17-Oct-1997  lukem WARNSify
 1.6 17-Oct-1997  mrg merge lite-2
 1.5 07-Jun-1995  cgd typeof(timeval.tv_sec) != time_t
 1.4 21-Mar-1995  mycroft Update to use timer{add,sub}().
 1.3 03-Nov-1993  cgd update timed to the latest version, as supplied and ported by
<Vernon Schryver> vjs@calcite.rhyolite.com.
 1.2 01-Aug-1993  mycroft Add RCS identifiers.
 1.1 21-Mar-1993  cgd branches: 1.1.1;
Initial revision
 1.1.1.2 06-Jun-1993  mrg 4.4BSD-Lite2
 1.1.1.1 21-Mar-1993  cgd initial import of 386bsd-0.1 sources
 1.9.4.1 21-Apr-2001  he Pull up revision 1.10 (requested by soda):
Fix remote denial-of-service problem related to mishandling
of malformed messages.
 1.21.4.1 23-Mar-2008  matt sync with HEAD
 1.19 16-Jan-2018  maya Returns void, mark noreturn.

From Eitan Adler in PR bin/52925
 1.18 26-Jan-2007  christos - centralize sendto tsp
- cleanup some casts
 1.17 25-Jan-2007  christos - merge the update code in one function
- support wtmpx
- kill local decls of logwtmp; use util.h
 1.16 25-Jan-2007  cbiere * Modified in_cksum() so it can handle unaligned data.
* Replaced most strlcpy() with set_tsp_name() and get_tsp_name() because
strlcpy() could potentially run out-of-bounds and doesn't zero out
unused buffer space.
* Replaced bcopy/bzero() with memcpy/memset().
* Fixed potential alignment/aliasing issues in measure().
* Replace u_short/u_long with uint16_t/uint32_t/in_addr_t where appropriate.
* Renamed sin to addr because sin is a reserved identifier.
* Use bindresvport() instead of looping over bind(); rresvport() returns
a SOCK_STREAM socket not SOCK_DGRAM.
 1.15 10-May-2006  mrg quell GCC 4.1 uninitialised variable warnings.

XXX: we should audit the tree for which old ones are no longer needed
after getting the older compilers out of the tree..
 1.14 07-Aug-2003  agc Move UCB-licensed code from 4-clause to 3-clause licence.

Patches provided by Joel Baker in PR 22366, verified by myself.
 1.13 16-May-2003  itojun avoid possible buffer overrun
 1.12 19-Sep-2002  mycroft select() -> poll(), nanosleep()
 1.11 10-Jul-2002  wiz Make compile with -DHAVENIS. Also make compile with WARNS=2, and
set WARNS=2 in Makefile.
 1.10 06-Jul-2002  wiz ANSIfy, remove __P().
 1.9 02-Sep-2001  reinoud Code cleanup; remove all `#ifdef sgi' from the code... this clobbered the
code considerably and was mainly providing SGI specific logging facilities
and some hacks to improve the relyablility on SGI systems by increasing
priorities etc...
 1.8 17-Oct-1997  lukem WARNSify
 1.7 17-Oct-1997  mrg merge lite-2
 1.6 06-Apr-1996  cgd use fixed-size types where appropriate, to make timed work on 64-bit
machines (Alpha). fixed sized types, not 'timeval's should go over
the net, and the stuff that goes over the net can't necessarily be
passed directly to functions that expect timevals.
 1.5 07-Jun-1995  cgd typeof(timeval.tv_sec) != time_t
 1.4 21-Mar-1995  mycroft Update to use timer{add,sub}().
 1.3 03-Nov-1993  cgd update timed to the latest version, as supplied and ported by
<Vernon Schryver> vjs@calcite.rhyolite.com.
 1.2 01-Aug-1993  mycroft Add RCS identifiers.
 1.1 21-Mar-1993  cgd branches: 1.1.1;
Initial revision
 1.1.1.2 06-Jun-1993  mrg 4.4BSD-Lite2
 1.1.1.1 21-Mar-1993  cgd initial import of 386bsd-0.1 sources
 1.11 16-Jan-2018  maya Returns void, mark noreturn.

From Eitan Adler in PR bin/52925
 1.10 31-Aug-2011  joerg Use __dead
 1.9 04-Feb-2007  cbiere * timed and timedc:
* Sprinkle const.
* Use EXIT_FAILURE instead of 1.
* Use err(), errx().
* Use calloc() instead of malloc()+memset().
* timedc:
* Non-terminated hostnames or unknown tsp_type could
cause a crash due to out-of-bounds reads in msite().
* Check the received packet size.
* Merged duplicated code into functions.
* Moved variables into the relevant scopes.
* Use connect() so that only the receiver can reply,
send()/recv() can be used and rejected packets
are immediately noticed by recv() instead of causing
timeouts.
* Updated manpage.
 1.8 26-Jan-2007  christos - centralize sendto tsp
- cleanup some casts
 1.7 25-Jan-2007  christos - merge the update code in one function
- support wtmpx
- kill local decls of logwtmp; use util.h
 1.6 25-Jan-2007  cbiere * Modified in_cksum() so it can handle unaligned data.
* Replaced most strlcpy() with set_tsp_name() and get_tsp_name() because
strlcpy() could potentially run out-of-bounds and doesn't zero out
unused buffer space.
* Replaced bcopy/bzero() with memcpy/memset().
* Fixed potential alignment/aliasing issues in measure().
* Replace u_short/u_long with uint16_t/uint32_t/in_addr_t where appropriate.
* Renamed sin to addr because sin is a reserved identifier.
* Use bindresvport() instead of looping over bind(); rresvport() returns
a SOCK_STREAM socket not SOCK_DGRAM.
 1.5 19-Apr-2005  christos make master() return void.
 1.4 07-Aug-2003  agc Move UCB-licensed code from 4-clause to 3-clause licence.

Patches provided by Joel Baker in PR 22366, verified by myself.
 1.3 09-Jan-1998  perry RCS Id Police.
 1.2 21-Mar-1995  mycroft Update to use timer{add,sub}().
 1.1 03-Nov-1993  cgd update timed to the latest version, as supplied and ported by
<Vernon Schryver> vjs@calcite.rhyolite.com.
 1.12 28-Sep-2004  wiz Improvements from Christian "naddy" Weisgerber:
sync with FreeBSD/OpenBSD
- Add a standard option list and make appropriate changes to the
body of the description.
- Document "-G netgroup".
- Miscellaneous grammar and mdoc fixes.

Some option resorting by yours truly.
 1.11 07-Aug-2003  agc Move UCB-licensed code from 4-clause to 3-clause licence.

Patches provided by Joel Baker in PR 22366, verified by myself.
 1.10 25-Feb-2003  wiz .Nm does not need a dummy argument ("") before punctuation or
for correct formatting of the SYNOPSIS any longer.
 1.9 05-Apr-2001  wiz Xref ntpd(8), not NTP. Whitespace fixes.
 1.8 22-Mar-1999  garbled branches: 1.8.10;
More and more .Os cleanups. .Os is defined in the tmac.doc-common file,
so we shouldn't override it with versions in the manpages. Many more to
come.
 1.7 17-Oct-1997  lukem WARNSify
 1.6 17-Oct-1997  mrg merge lite-2
 1.5 18-Aug-1995  pk `.SH' -> `.Sh' (from Masanobu Saitoh; PR#1378).
Also, use .Dq in two places, remove an extra comma and pluralize WARNING.
 1.4 14-Jul-1995  jtc Fix formatting bug.
 1.3 03-Nov-1993  cgd update timed to the latest version, as supplied and ported by
<Vernon Schryver> vjs@calcite.rhyolite.com.
 1.2 01-Aug-1993  mycroft Add RCS indentifiers.
 1.1 21-Mar-1993  cgd branches: 1.1.1;
Initial revision
 1.1.1.2 12-Dec-1993  mrg 4.4BSD-Lite2
 1.1.1.1 21-Mar-1993  cgd initial import of 386bsd-0.1 sources
 1.8.10.1 26-Apr-2001  he Pull up revision 1.9 (requested by wiz):
Correct ntpd(8) reference. Whitespace fixes.
 1.31 03-Nov-2024  rillig sbin, usr.bin, usr.sbin: remove redundant getopt declarations

No binary change, except for assertion line numbers in tprof.
 1.30 08-Aug-2023  mrg branches: 1.30.2;
use standard strncpy() idiom to completely zero a buffer, including
explicitly nul the final char.

found by GCC 12.
 1.29 16-Oct-2022  rillig timed: fix typos in comments, remove trailing whitespace
 1.28 16-Oct-2022  rillig timed: remove unhandled getopt option -P

No functional change, due to 'opterr = 0'.
 1.27 31-Oct-2021  nia timed(8): avoid hand-rolling arc4random_uniform
 1.26 04-Feb-2018  mrg fixes for GCC 6.4:

mail's execute() needs a volatile for setjmp().

telnet has a missing {} issue.

isdnd's print_config() has a missing/wrong {} issue, and
its p_q931bc() has inconsistent indentation (but not any
actual problem.)

map-mbone's accept_neighbors2() compares a vs. a instead
of a vs. b.

sysinst's pm_cgd_check() has missing {} issue.

timed's main() has missing {} issue.
 1.25 16-Jun-2015  christos improve error messages (remove \n, use __func__, etc)
 1.24 21-Jul-2008  lukem Remove the \n and tabs from the __COPYRIGHT() strings.
Tweak to use a consistent format.
 1.23 04-Feb-2007  cbiere branches: 1.23.12;
* timed and timedc:
* Sprinkle const.
* Use EXIT_FAILURE instead of 1.
* Use err(), errx().
* Use calloc() instead of malloc()+memset().
* timedc:
* Non-terminated hostnames or unknown tsp_type could
cause a crash due to out-of-bounds reads in msite().
* Check the received packet size.
* Merged duplicated code into functions.
* Moved variables into the relevant scopes.
* Use connect() so that only the receiver can reply,
send()/recv() can be used and rejected packets
are immediately noticed by recv() instead of causing
timeouts.
* Updated manpage.
 1.22 26-Jan-2007  christos - centralize sendto tsp
- cleanup some casts
 1.21 25-Jan-2007  cbiere * Modified in_cksum() so it can handle unaligned data.
* Replaced most strlcpy() with set_tsp_name() and get_tsp_name() because
strlcpy() could potentially run out-of-bounds and doesn't zero out
unused buffer space.
* Replaced bcopy/bzero() with memcpy/memset().
* Fixed potential alignment/aliasing issues in measure().
* Replace u_short/u_long with uint16_t/uint32_t/in_addr_t where appropriate.
* Renamed sin to addr because sin is a reserved identifier.
* Use bindresvport() instead of looping over bind(); rresvport() returns
a SOCK_STREAM socket not SOCK_DGRAM.
 1.20 06-Feb-2005  perry remove obsolete register declarations.
 1.19 18-Aug-2003  itojun SIOCGIFCONF -> getifaddrs conversion
 1.18 07-Aug-2003  agc Move UCB-licensed code from 4-clause to 3-clause licence.

Patches provided by Joel Baker in PR 22366, verified by myself.
 1.17 16-May-2003  itojun avoid possible buffer overrun
 1.16 10-Jul-2002  wiz Make compile with -DHAVENIS. Also make compile with WARNS=2, and
set WARNS=2 in Makefile.
 1.15 06-Jul-2002  wiz ANSIfy, remove __P().
 1.14 23-Jun-2002  perry Fix a variable initializer where CLK_TCK was assumed to be a compile
time constant. Soon it won't be.
 1.13 02-Sep-2001  reinoud Code cleanup; remove all `#ifdef sgi' from the code... this clobbered the
code considerably and was mainly providing SGI specific logging facilities
and some hacks to improve the relyablility on SGI systems by increasing
priorities etc...
 1.12 11-Jan-2001  lukem don't use LOG_CONS
 1.11 06-Jun-1999  thorpej Use pidfile(3).
 1.10 06-Jul-1998  mrg - 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
 1.9 17-Oct-1997  lukem WARNSify
 1.8 17-Oct-1997  mrg merge lite-2
 1.7 25-Nov-1996  thorpej Fix byte-order bug in net number comparison.
From Juergen Hannken-Illjes <hannken@eis.cs.tu-bs.de>, PR #2961.
 1.6 30-Mar-1996  mark Use an integer instead of a char to store the getopt() return value in
order to match the function prototype and to work with compilers that
default to unsigned chars.
Compare the getopt() return value with -1 instead of EOF.
 1.5 07-Jun-1995  cgd typeof(timeval.tv_sec) != time_t
 1.4 24-Apr-1994  deraadt bzero a sockaddr_in
 1.3 03-Nov-1993  cgd update timed to the latest version, as supplied and ported by
<Vernon Schryver> vjs@calcite.rhyolite.com.
 1.2 01-Aug-1993  mycroft Add RCS identifiers.
 1.1 21-Mar-1993  cgd branches: 1.1.1;
Initial revision
 1.1.1.2 26-Mar-1995  mrg 4.4BSD-Lite2
 1.1.1.1 21-Mar-1993  cgd initial import of 386bsd-0.1 sources
 1.23.12.1 18-Sep-2008  wrstuden Sync with wrstuden-revivesa-base-2.
 1.30.2.1 02-Aug-2025  perseant Sync with HEAD
 1.2 19-Mar-1994  mycroft Clean up deleted files.
 1.1 03-Nov-1993  cgd update timed to the latest version, as supplied and ported by
<Vernon Schryver> vjs@calcite.rhyolite.com.
 1.1 25-Jan-2007  cbiere * Modified in_cksum() so it can handle unaligned data.
* Replaced most strlcpy() with set_tsp_name() and get_tsp_name() because
strlcpy() could potentially run out-of-bounds and doesn't zero out
unused buffer space.
* Replaced bcopy/bzero() with memcpy/memset().
* Fixed potential alignment/aliasing issues in measure().
* Replace u_short/u_long with uint16_t/uint32_t/in_addr_t where appropriate.
* Renamed sin to addr because sin is a reserved identifier.
* Use bindresvport() instead of looping over bind(); rresvport() returns
a SOCK_STREAM socket not SOCK_DGRAM.
 1.11 27-Jan-2007  cbiere * timedc is no longer setuid-root and is only usable by root due to the
use of a raw socket for ICMP; thus there is also no need to differ
between privileged and unprivileged commands.
* Switch to user "nobody" after allocating the raw socket.
* Close all file descriptors above 2 (just in case).
 1.10 25-Jan-2007  cbiere * Modified in_cksum() so it can handle unaligned data.
* Replaced most strlcpy() with set_tsp_name() and get_tsp_name() because
strlcpy() could potentially run out-of-bounds and doesn't zero out
unused buffer space.
* Replaced bcopy/bzero() with memcpy/memset().
* Fixed potential alignment/aliasing issues in measure().
* Replace u_short/u_long with uint16_t/uint32_t/in_addr_t where appropriate.
* Renamed sin to addr because sin is a reserved identifier.
* Use bindresvport() instead of looping over bind(); rresvport() returns
a SOCK_STREAM socket not SOCK_DGRAM.
 1.9 17-Oct-1997  lukem WARNSify
 1.8 17-Oct-1997  mrg merge lite-2
 1.7 08-May-1997  gwr Back out the .PATH.c changes. The .depend problem (and others)
will be fixed using the new .NOPATH make feature instead.
 1.6 06-May-1997  gwr Use .PATH.c: ...
 1.5 22-Dec-1994  cgd specify man pages the new way.
 1.4 03-Nov-1993  cgd update timed to the latest version, as supplied and ported by
<Vernon Schryver> vjs@calcite.rhyolite.com.
 1.3 30-Jul-1993  mycroft Add RCS identifiers.
 1.2 23-Mar-1993  cgd adjusted to take into acct. changes to ../timed/Makefile, which
resolved the cksum.i386.c problem.
 1.1 21-Mar-1993  cgd branches: 1.1.1;
Initial revision
 1.1.1.2 06-Jun-1993  mrg 4.4BSD-Lite2
 1.1.1.1 21-Mar-1993  cgd initial import of 386bsd-0.1 sources
 1.23 04-Feb-2007  cbiere * timed and timedc:
* Sprinkle const.
* Use EXIT_FAILURE instead of 1.
* Use err(), errx().
* Use calloc() instead of malloc()+memset().
* timedc:
* Non-terminated hostnames or unknown tsp_type could
cause a crash due to out-of-bounds reads in msite().
* Check the received packet size.
* Merged duplicated code into functions.
* Moved variables into the relevant scopes.
* Use connect() so that only the receiver can reply,
send()/recv() can be used and rejected packets
are immediately noticed by recv() instead of causing
timeouts.
* Updated manpage.
 1.22 27-Jan-2007  cbiere bind() in priv_resources() is now unnecessary as pointed out by christos.
 1.21 27-Jan-2007  cbiere * Fixed a 64-bit issue in daydiff().
* Check the packet size and sender address in daydiff().
* priv_resources(): Use bind() instead of bindresvport() because an
reserved port is not required. This also resolves the interoperability
issue reported in PR bin/35479.
 1.20 25-Jan-2007  cbiere * Modified in_cksum() so it can handle unaligned data.
* Replaced most strlcpy() with set_tsp_name() and get_tsp_name() because
strlcpy() could potentially run out-of-bounds and doesn't zero out
unused buffer space.
* Replaced bcopy/bzero() with memcpy/memset().
* Fixed potential alignment/aliasing issues in measure().
* Replace u_short/u_long with uint16_t/uint32_t/in_addr_t where appropriate.
* Renamed sin to addr because sin is a reserved identifier.
* Use bindresvport() instead of looping over bind(); rresvport() returns
a SOCK_STREAM socket not SOCK_DGRAM.
 1.19 25-Jan-2007  christos - use rresvport() instead of open-coding it.
- use warn/err.
 1.18 25-Jan-2007  christos PR/35479: djv AT bedford DOT net: fix byte order issue and zero the sockaddr.
 1.17 09-May-2006  mrg change (mostly) int to socklen_t. GCC 4 doesn't like that int and
socklen_t are different signness.
 1.16 06-Feb-2005  perry remove obsolete register declarations.
 1.15 09-Feb-2004  wiz s/transmitts/transmits/
From Gavin Atkinson (FreeBSD bug 62346) via jmc@openbsd
 1.14 07-Aug-2003  agc Move UCB-licensed code from 4-clause to 3-clause licence.

Patches provided by Joel Baker in PR 22366, verified by myself.
 1.13 17-May-2003  itojun use strlcpy
 1.12 19-Sep-2002  mycroft select() -> poll(), nanosleep()
 1.11 06-Jul-2002  wiz ANSIfy and de-__P() a bit more.
 1.10 02-Sep-2001  reinoud Code cleanup; remove all `#ifdef sgi' from the code... this clobbered the
code considerably and was mainly providing SGI specific logging facilities
and some hacks to improve the relyablility on SGI systems by increasing
priorities etc...
 1.9 06-Jul-1998  mrg - 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
 1.8 18-Oct-1997  lukem use string.h instead of strings.h
 1.7 17-Oct-1997  lukem WARNSify
 1.6 17-Oct-1997  mrg merge lite-2
 1.5 13-Apr-1997  mrg be safe with buffers.
 1.4 07-Dec-1993  mycroft Eliminate a compiler warning.
 1.3 03-Nov-1993  cgd update timed to the latest version, as supplied and ported by
<Vernon Schryver> vjs@calcite.rhyolite.com.
 1.2 01-Aug-1993  mycroft Add RCS identifiers.
 1.1 21-Mar-1993  cgd branches: 1.1.1;
Initial revision
 1.1.1.2 26-Mar-1995  mrg 4.4BSD-Lite2
 1.1.1.1 21-Mar-1993  cgd initial import of 386bsd-0.1 sources
 1.7 27-Jan-2007  cbiere * timedc is no longer setuid-root and is only usable by root due to the
use of a raw socket for ICMP; thus there is also no need to differ
between privileged and unprivileged commands.
* Switch to user "nobody" after allocating the raw socket.
* Close all file descriptors above 2 (just in case).
 1.6 07-Aug-2003  agc Move UCB-licensed code from 4-clause to 3-clause licence.

Patches provided by Joel Baker in PR 22366, verified by myself.
 1.5 17-Oct-1997  lukem WARNSify
 1.4 17-Oct-1997  mrg merge lite-2
 1.3 03-Nov-1993  cgd update timed to the latest version, as supplied and ported by
<Vernon Schryver> vjs@calcite.rhyolite.com.
 1.2 01-Aug-1993  mycroft Add RCS identifiers.
 1.1 21-Mar-1993  cgd branches: 1.1.1;
Initial revision
 1.1.1.2 06-Jun-1993  mrg 4.4BSD-Lite2
 1.1.1.1 21-Mar-1993  cgd initial import of 386bsd-0.1 sources
 1.4 06-Jul-2002  wiz Remove unused files (cf. timed{,c}/timed{,c}-extern.h).
 1.3 09-Jan-1998  perry RCS Id Police.
 1.2 17-Oct-1997  lukem WARNSify
 1.1 06-Jun-1993  mrg branches: 1.1.1;
Initial revision
 1.1.1.1 06-Jun-1993  mrg 4.4BSD-Lite2
 1.6 31-Aug-2011  joerg Use __dead
 1.5 13-Oct-2003  itojun makeargv overrun. from openbsd
 1.4 07-Aug-2003  agc Move UCB-licensed code from 4-clause to 3-clause licence.

Patches provided by Joel Baker in PR 22366, verified by myself.
 1.3 09-Jan-1998  perry RCS Id Police.
 1.2 17-Oct-1997  lukem WARNSify
 1.1 03-Nov-1993  cgd update timed to the latest version, as supplied and ported by
<Vernon Schryver> vjs@calcite.rhyolite.com.
 1.13 08-Apr-2009  joerg Remove non-sensical .ad macro. Don't use .Xo/.Xc.
 1.12 04-Feb-2007  cbiere branches: 1.12.20;
* timed and timedc:
* Sprinkle const.
* Use EXIT_FAILURE instead of 1.
* Use err(), errx().
* Use calloc() instead of malloc()+memset().
* timedc:
* Non-terminated hostnames or unknown tsp_type could
cause a crash due to out-of-bounds reads in msite().
* Check the received packet size.
* Merged duplicated code into functions.
* Moved variables into the relevant scopes.
* Use connect() so that only the receiver can reply,
send()/recv() can be used and rejected packets
are immediately noticed by recv() instead of causing
timeouts.
* Updated manpage.
 1.11 07-Aug-2003  agc Move UCB-licensed code from 4-clause to 3-clause licence.

Patches provided by Joel Baker in PR 22366, verified by myself.
 1.10 30-Jun-2003  wiz Simplify macro usage.
 1.9 02-Feb-2002  wiz Sort sections.
 1.8 05-Apr-2001  wiz Add sections to xrefs. Whitespace fixes.
 1.7 22-Mar-1999  garbled branches: 1.7.10;
More and more .Os cleanups. .Os is defined in the tmac.doc-common file,
so we shouldn't override it with versions in the manpages. Many more to
come.
 1.6 17-Oct-1997  lukem WARNSify
 1.5 17-Oct-1997  mrg merge lite-2
 1.4 18-Aug-1995  pk Remove a comma. Use `.Dq'.
 1.3 03-Nov-1993  cgd update timed to the latest version, as supplied and ported by
<Vernon Schryver> vjs@calcite.rhyolite.com.
 1.2 01-Aug-1993  mycroft Add RCS indentifiers.
 1.1 21-Mar-1993  cgd branches: 1.1.1;
Initial revision
 1.1.1.2 12-Dec-1993  mrg 4.4BSD-Lite2
 1.1.1.1 21-Mar-1993  cgd initial import of 386bsd-0.1 sources
 1.7.10.1 26-Apr-2001  he Pull up revision 1.8 (requested by wiz):
Add section numbers for cross references, and whitespace fixes.
 1.12.20.1 13-May-2009  jym Sync with HEAD.

Third (and last) commit. See http://mail-index.netbsd.org/source-changes/2009/05/13/msg221222.html
 1.22 16-Jan-2012  christos PR/45842: Henning Petersen: compare fgets with NULL not 0
 1.21 21-Jul-2008  lukem branches: 1.21.2;
Remove the \n and tabs from the __COPYRIGHT() strings.
Tweak to use a consistent format.
 1.20 16-Feb-2008  matt branches: 1.20.6;
cmdtab is supposed to be const.
 1.19 28-Jan-2007  cbiere branches: 1.19.4;
Let timedc use the dedicated account "_timedc" for dropping privileges
instead of abusing the account "nobody".
 1.18 27-Jan-2007  cbiere * timedc is no longer setuid-root and is only usable by root due to the
use of a raw socket for ICMP; thus there is also no need to differ
between privileged and unprivileged commands.
* Switch to user "nobody" after allocating the raw socket.
* Close all file descriptors above 2 (just in case).
 1.17 25-Jan-2007  christos sprinkle const.
 1.16 25-Jan-2007  cbiere * Modified in_cksum() so it can handle unaligned data.
* Replaced most strlcpy() with set_tsp_name() and get_tsp_name() because
strlcpy() could potentially run out-of-bounds and doesn't zero out
unused buffer space.
* Replaced bcopy/bzero() with memcpy/memset().
* Fixed potential alignment/aliasing issues in measure().
* Replace u_short/u_long with uint16_t/uint32_t/in_addr_t where appropriate.
* Renamed sin to addr because sin is a reserved identifier.
* Use bindresvport() instead of looping over bind(); rresvport() returns
a SOCK_STREAM socket not SOCK_DGRAM.
 1.15 25-Jan-2007  christos - use rresvport() instead of open-coding it.
- use warn/err.
 1.14 15-Jun-2006  christos This has not worked since 2003. (Hello Itojun!)
 1.13 06-Feb-2005  perry remove obsolete register declarations.
 1.12 30-Oct-2004  dsl Add (unsigned char) cast to ctype functions
 1.11 13-Oct-2003  itojun makeargv overrun. from openbsd
 1.10 07-Aug-2003  agc Move UCB-licensed code from 4-clause to 3-clause licence.

Patches provided by Joel Baker in PR 22366, verified by myself.
 1.9 06-Jul-2002  wiz ANSIfy and de-__P() a bit more.
 1.8 02-Sep-2001  reinoud Code cleanup; remove all `#ifdef sgi' from the code... this clobbered the
code considerably and was mainly providing SGI specific logging facilities
and some hacks to improve the relyablility on SGI systems by increasing
priorities etc...
 1.7 11-Jan-2001  lukem LOG_ODELAY is deprecated; it's the default
 1.6 18-Oct-1997  lukem use string.h instead of strings.h
 1.5 17-Oct-1997  lukem WARNSify
 1.4 17-Oct-1997  mrg merge lite-2
 1.3 03-Nov-1993  cgd update timed to the latest version, as supplied and ported by
<Vernon Schryver> vjs@calcite.rhyolite.com.
 1.2 01-Aug-1993  mycroft Add RCS identifiers.
 1.1 21-Mar-1993  cgd branches: 1.1.1;
Initial revision
 1.1.1.2 06-Jun-1993  mrg 4.4BSD-Lite2
 1.1.1.1 21-Mar-1993  cgd initial import of 386bsd-0.1 sources
 1.19.4.1 23-Mar-2008  matt sync with HEAD
 1.20.6.1 18-Sep-2008  wrstuden Sync with wrstuden-revivesa-base-2.
 1.21.2.1 17-Apr-2012  yamt sync with head
 1.12 27-Jan-2007  cbiere * timedc is no longer setuid-root and is only usable by root due to the
use of a raw socket for ICMP; thus there is also no need to differ
between privileged and unprivileged commands.
* Switch to user "nobody" after allocating the raw socket.
* Close all file descriptors above 2 (just in case).
 1.11 25-Jan-2007  christos sprinkle const.
 1.10 07-Aug-2003  agc Move UCB-licensed code from 4-clause to 3-clause licence.

Patches provided by Joel Baker in PR 22366, verified by myself.
 1.9 19-Sep-2002  mycroft select() -> poll(), nanosleep()
 1.8 06-Jul-2002  wiz ANSIfy and de-__P() a bit more.
 1.7 02-Sep-2001  reinoud Code cleanup; remove all `#ifdef sgi' from the code... this clobbered the
code considerably and was mainly providing SGI specific logging facilities
and some hacks to improve the relyablility on SGI systems by increasing
priorities etc...
 1.6 21-Jan-2000  mycroft Nuke `extern int errno;' in code we compile with -Wstrict-prototypes. We get
the correct definition from errno.h.
 1.5 17-Oct-1997  lukem branches: 1.5.4;
WARNSify
 1.4 17-Oct-1997  mrg merge lite-2
 1.3 03-Nov-1993  cgd update timed to the latest version, as supplied and ported by
<Vernon Schryver> vjs@calcite.rhyolite.com.
 1.2 01-Aug-1993  mycroft Add RCS identifiers.
 1.1 21-Mar-1993  cgd branches: 1.1.1;
Initial revision
 1.1.1.2 06-Jun-1993  mrg 4.4BSD-Lite2
 1.1.1.1 21-Mar-1993  cgd initial import of 386bsd-0.1 sources
 1.5.4.1 23-Jan-2000  he Pull up revision 1.6 (requested by mycroft):
Always do the errno indirection hack, so that non-threaded
libraries get the right errno value when linked with -lpthread.
This means "always include <errno.h> and never declare errno
yourself".

RSS XML Feed