time_to_xxx() and xxx_to_time() functions. e.g. _time_to_xxx()
instead of time_to_xxx(), to make it more obvious that these are
stopgap functions & placemarkers and not meant to create a defacto
standard. They will eventually be replaced when a real standard
comes out of committee.
header before trying to process them. Without this sanity check,
rwhod can attempt to byte-swap all of memory when a short packet
is received, and so dies with a SIGBUS.
While I'm here, change two other syslog messages to be more
informative: use dotted quad rather than hex notation for IP
addresses, and include the source IP in the 'bad from port' message.
PR: bin/14844
Reviewed by: dwmalone
Off by one in verify allowed one to march one byte off the end of
wd.wd_hostname if wd.wd_hostname had no NUL characters in it.
strncpy of myname into mywd used the source buffer's length, rather
than the dest.
we actually look for the *group* and not the user's gid. user daemon
has traditionally been group 31 (guest).
Also clear out the groups vector so that it doesn't inherit the groups
of the invoking user (ever run rwhod by hand before?) Unfortunately, we
can't empty the supplemental groups list because the !&@^#! egid is stored
in there! :-(
page. I tried all three modes (rwhod, rwhod -m, rwhod -m 32) on a machine
with 2 ethernet interfaces and they all worked.
Submitted by: Bill Fenner <fenner@parc.xerox.com>