Commit Graph

50 Commits

Author SHA1 Message Date
Jens Schweikhardt
d64ada501a Fix typos, mostly s/ an / a / where appropriate and a few s/an/and/
Add FreeBSD Id tag where missing.
2002-12-30 21:18:15 +00:00
Philippe Charnier
490d5836b5 The .Nm utility 2002-07-14 14:47:15 +00:00
Robert Drehmel
94fed363fe Use the length modifier 'l' when supplying an argument of
type long to printf(3).
2002-07-11 20:10:07 +00:00
Robert Drehmel
a89c0b2458 - Remove unnecessary inclusion of <utmp.h>.
- Cast a value to time_t before comparing it to another
   time_t to fix a warning.
2002-07-11 20:01:36 +00:00
Tom Rhodes
c896b13a88 timed(8) manual page has some incorrect grammer
PR:	36457
No objections from:	ru
2002-04-09 20:47:17 +00:00
Mike Barcroft
fd8e4ebc8c o Move NTOHL() and associated macros into <sys/param.h>. These are
deprecated in favor of the POSIX-defined lowercase variants.
o Change all occurrences of NTOHL() and associated marcros in the
  source tree to use the lowercase function variants.
o Add missing license bits to sparc64's <machine/endian.h>.
  Approved by: jake
o Clean up <machine/endian.h> files.
o Remove unused __uint16_swap_uint32() from i386's <machine/endian.h>.
o Remove prototypes for non-existent bswapXX() functions.
o Include <machine/endian.h> in <arpa/inet.h> to define the
  POSIX-required ntohl() family of functions.
o Do similar things to expose the ntohl() family in libstand, <netinet/in.h>,
  and <sys/param.h>.
o Prepend underscores to the ntohl() family to help deal with
  complexities associated with having MD (asm and inline) versions, and
  having to prevent exposure of these functions in other headers that
  happen to make use of endian-specific defines.
o Create weak aliases to the canonical function name to help deal with
  third-party software forgetting to include an appropriate header.
o Remove some now unneeded pollution from <sys/types.h>.
o Add missing <arpa/inet.h> includes in userland.

Tested on:	alpha, i386
Reviewed by:	bde, jake, tmm
2002-02-18 20:35:27 +00:00
John Baldwin
9f2b972fdb 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
2001-11-20 07:13:40 +00:00
John Baldwin
3878fff7db Use fixed-size fields in the structure for the timed protocol. This
includes changing a struct timeval to an explicit structure of two
int32_t's.  This requires using temporary timevals in several places
when calling gettimeofday(), settimeofday(), etc.  With this timed now
works properly on 64-bit platforms such as Alpha.

Obtained from:	NetBSD
2001-11-20 06:36:09 +00:00
Ruslan Ermilov
cda2a9b2f0 Set BINOWN=root explicitly for setuid root binaries.
This is not "useless", as one may have non-default
setting for BINOWN in make.conf, and we still want
these to be installed setuid root in this case.
2001-09-13 06:48:18 +00:00
Kris Kennaway
73c4a23ef2 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
2001-08-20 06:16:04 +00:00
David E. O'Brien
90e655ea4e Perform a major cleanup of the usr.sbin Makefiles.
These are not perfectly in agreement with each other style-wise, but they
are orders of orders of magnitude more consistent style-wise than before.
2001-07-20 06:20:32 +00:00
Dima Dorfman
f247324df7 Remove whitespace at EOL. 2001-07-15 08:06:20 +00:00
Ruslan Ermilov
a4c37c816b mdoc(7) police: removed HISTORY info from the .Os call. 2001-07-10 15:12:08 +00:00
Kris Kennaway
e58c2d0ce4 Patches from OpenBSD:
- check the msg.tsp_type value prior to using it as an
          index into char *tsptype[]
        - use strlcpy's instead of strcpy's
        - & handle short packets properly.

Submitted by:	"Andrew R. Reiter" <arr@watson.org>
Obtained from:	OpenBSD
2001-05-09 08:37:18 +00:00
Dima Dorfman
19ab52cb4e mdoc(7) police: properly use a -diag list in the DIAGNOSTICS section.
Reviewed by:	ru
2001-04-13 19:59:47 +00:00
Ruslan Ermilov
345e52e742 - Backout botched attempt to introduce MANSECT feature.
- MAN[1-9] -> MAN.
2001-03-26 14:42:20 +00:00
Ruslan Ermilov
c73e22c3d4 Set the default manual section for usr.sbin/ to 8. 2001-03-20 18:17:26 +00:00
Jeroen Ruigrok van der Werven
d1d2ed0e78 Preceed/preceeding are not english words. Use precede and preceding.
Add $FreeBSD$.
2001-02-18 10:44:00 +00:00
Ben Smithurst
cfc038e79c Check that the hostname field in received packets is NUL-terminated. 2001-01-01 18:43:21 +00:00
Ben Smithurst
5be8ff7bb5 * 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
2000-12-28 19:50:07 +00:00
Ruslan Ermilov
8b5c4af3ff Prepare for mdoc(7)NG. 2000-12-27 15:30:30 +00:00
Ruslan Ermilov
700f2ee5c3 Eliminate groff(1) warnings.
Obtained from:	NetBSD
2000-11-23 10:15:50 +00:00
Ruslan Ermilov
e97407b4f2 mdoc(7) police: use the new features of the Nm macro. 2000-11-20 20:10:44 +00:00
Ruslan Ermilov
726b61ab5f Avoid use of direct troff requests in mdoc(7) manual pages. 2000-11-10 17:46:15 +00:00
Kris Kennaway
41ed5f6d65 Remove duplicated ';' statement delimiters.
Obtained from:	BSD/OS
2000-05-19 08:26:17 +00:00
Sheldon Hearn
a7623b801d Add a standard option list and make appropriate changes to the
body of the description.

This is based on a patch from Nick Sanders <fishy@hotbot.com>.

PR:		11978
2000-03-13 14:54:55 +00:00
Yoshinobu Inoue
1fece1a6b6 Change type of vars which hold in_addr.s_addr from u_long to u_int32_t,
for more safety on alpha.

Approved by: jkh
2000-03-03 13:01:57 +00:00
Peter Wemm
97d92980a9 $Id$ -> $FreeBSD$ 1999-08-28 01:35:59 +00:00
Nik Clayton
414a35e60a Add $Id$, to make it simpler for members of the translation teams to
track.

The Id line is normally at the bottom of the main comment block in the
man page, separated from the rest of the manpage by an empty comment,
like so;

     .\"    $Id$
     .\"

If the immediately preceding comment is a @(#) format ID marker than the
the $Id$ will line up underneath it with no intervening blank lines.
Otherwise, an additional blank line is inserted.

Approved by:            bde
1999-07-12 20:12:29 +00:00
David E. O'Brien
2887f586f0 Remove useless `BINOWN=root' now that it is the default. 1998-09-19 22:42:14 +00:00
Bruce Evans
8720f72c80 Don't assume that time_t is long. Fixed printf format errors. 1998-06-29 18:12:08 +00:00
Bruce Evans
418c2cdc85 Don't assume that time_t is long. 1998-06-29 18:09:59 +00:00
Philippe Charnier
0b10309e4d Make all strings representing hostnames to be NUL-terminated within
MAXHOSTNAMELEN chars, like everywhere else in the system, so that strcpy()s
and printf()s won't fail.
1997-10-31 12:33:14 +00:00
Philippe Charnier
5e24be183a Back out strcpy() -> strncpy() changes. According to Bruce, they are unneeded.
Check the return value of gethostname() like in timed. Make enough place to
NUL-terminate the result.
1997-10-29 07:35:27 +00:00
Philippe Charnier
0b778a4e7f Back out strcpy() -> strncpy() changes. According to bruce, they are unneeded. 1997-10-29 07:32:30 +00:00
Philippe Charnier
8418db88a2 ntohl->htonl.
OKed by:	Bruce
1997-10-27 07:41:12 +00:00
Philippe Charnier
06457d2f32 Use err(3).
Sync man page and usage string.
Strcpy -> strncpy from OpenBSD.
-Wall cleaning.
Obtained from: OpenBSD
1997-10-22 06:20:04 +00:00
Jonathan Lemon
5b49d899ec Convert nets specified with -i/-n to network byte order.
PR:		3906, 3801
Submitted by:	Bob Willcox <bob@luke.pmr.com>, Hiroya Tsubakimoto
1997-08-21 19:53:04 +00:00
Masafumi Max NAKANE
5a9a2fe551 Typo: .SH --> .Sh.
PR:		3683
Submitted by:	Kazuo Horikawa <k-horik@yk.rim.or.jp>
1997-05-25 19:11:26 +00:00
Warner Losh
6c3f552a31 compare return value from getopt against -1 rather than EOF, per the final
posix standard on the topic.
1997-03-31 05:11:47 +00:00
Wolfram Schneider
bfd34a4a60 Sort cross references. 1997-01-20 00:03:00 +00:00
Mike Pritchard
c0d4d042e9 Fix some formatting problems. Closed PR# 2377.
Pointed out by: David O'Brien
1997-01-08 06:42:27 +00:00
Marc G. Fournier
8c78c8f41c Fixes:
If timed is running when system clock is changed by date command,
improper wtmp entry is made.  According to wtmp(5), two entries, one
with "|" as ut_line field and one with "{" for ut_line, should be
recorded, but, one with "|" and one with "}" are made.

Closes: PR#bin/1182

Submitted by:	 Masafumi NAKANE <masafumi@tky007.tth.expo96.ad.jp>
1996-10-22 05:13:42 +00:00
Mike Pritchard
906c1e27fc Correct some man page cross references and file location references. 1996-04-07 00:06:21 +00:00
Rodney W. Grimes
709e8f9ae1 Remove trailing whitespace. 1995-05-30 03:57:47 +00:00
David Greenman
84fbd1c727 Fully initialize (bzero) the stack-allocated "struct sockaddr_in server"
structure. Random junk on the stack would cause the call to bind to fail
in some cases (since the address portion wasn't initialized).
1995-05-15 09:56:49 +00:00
Bruce Evans
e89bcdb80f Apply an even number of ntohl's to icmp_otime. This fixes
`timedc clockdiff ...'.
1994-11-27 16:06:31 +00:00
Garrett Wollman
84e59eb50d Get rid of update. Make man page installation work with our scheme
(and rename a few in the process).
1994-08-05 16:31:05 +00:00
Rodney W. Grimes
4bf240e3b9 Why cast a constant to (unsigned long) when you can make it this by
appending UL.
1994-05-28 06:38:34 +00:00
Rodney W. Grimes
dea673e932 BSD 4.4 Lite usr.sbin Sources 1994-05-26 05:23:31 +00:00