History log of /freebsd-10-stable/usr.sbin/timed/timed/readmsg.c
Revision Date Author Comments
(<<< Hide modified files)
(Show modified files >>>)
# 256281 10-Oct-2013 gjb

Copy head (r256279) to stable/10 as part of the 10.0-RELEASE cycle.

Approved by: re (implicit)
Sponsored by: The FreeBSD Foundation

# 246209 01-Feb-2013 charnier

Change old-style function definition


# 239991 01-Sep-2012 ed

Rework all non-contributed files that use `struct timezone'.

This structure is not part of POSIX. According to POSIX, gettimeofday()
has the following prototype:

int gettimeofday(struct timeval *restrict tp, void *restrict tzp);

Also, POSIX states that gettimeofday() shall return 0 (as long as tzp is
not used). Remove dead error handling code. Also use NULL for a
nul-pointer instead of integer 0.

While there, change all pieces of code that only use tv_sec to use
time(3), as this provides less overhead.


# 228719 19-Dec-2011 dim

Some people pointed out long is 32-bit on some arches, while time_t is
64-bit, so better cast time_t to intmax_t, and use the appropriate
printf format strings.

MFC after: 1 week


# 228714 19-Dec-2011 dim

In usr.sbin/timed, fix several issues with printf formats:
- Cast time_t's to long, and print them with %ld.
- Print ptrdiff_t's with %td.
- Print ssize_t's and size_t's with %zd and %zu.
- Print int32_t's with %d.
Also, replace some int variables with the more appropriate size_t.

MFC after: 1 week


# 227221 06-Nov-2011 ed

Simplify inclusion of the tsptype array a bit.

We don't need this array in timed.c -- only readmsg.c.


# 216372 11-Dec-2010 joel

Remove the advertising clause from UCB copyrighted files in usr.sbin. This
is in accordance with the information provided at
ftp://ftp.cs.berkeley.edu/pub/4bsd/README.Impt.License.Change


# 86645 20-Nov-2001 jhb

Unifdef all the SGI code. It mainly added clutter while providing some
specialized logging, SGI-specific priority massaging, and SCI-specific
time trimming support. Also add missing $FreeBSD$'s.

Inspired by: NetBSD


# 81946 20-Aug-2001 kris

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.

Submitted by: Stephen Whiteley <stevew@best.com> (based on)
PR: misc/29867


# 70561 01-Jan-2001 ben

Check that the hostname field in received packets is NUL-terminated.


# 70446 28-Dec-2000 ben

* Fix a segfault when timed(8) receives a packet with a bad tsp_type.
* Check that received packets aren't too short, as this could cause other
problems.

Reviewed by: imp, markm


# 50479 27-Aug-1999 peter

$Id$ -> $FreeBSD$


# 37267 29-Jun-1998 bde

Don't assume that time_t is long.


# 30830 29-Oct-1997 charnier

Back out strcpy() -> strncpy() changes. According to bruce, they are unneeded.


# 30642 22-Oct-1997 charnier

Use err(3).
Sync man page and usage string.
Strcpy -> strncpy from OpenBSD.
-Wall cleaning.
Obtained from: OpenBSD


# 1554 26-May-1994 rgrimes

This commit was generated by cvs2svn to compensate for changes in r1553,
which included commits to RCS files with non-trunk default branches.


# 1553 26-May-1994 rgrimes

BSD 4.4 Lite usr.sbin Sources