summaryrefslogtreecommitdiff
path: root/usr.sbin
diff options
context:
space:
mode:
Diffstat (limited to 'usr.sbin')
-rw-r--r--usr.sbin/cron/lib/entry.c17
-rw-r--r--usr.sbin/kbdmap/kbdmap.pl2
-rw-r--r--usr.sbin/tcpdump/tcpdump/Makefile4
-rw-r--r--usr.sbin/timed/timed/timed.8191
4 files changed, 81 insertions, 133 deletions
diff --git a/usr.sbin/cron/lib/entry.c b/usr.sbin/cron/lib/entry.c
index 9150a0d4ac56d..51c1a0cb78f99 100644
--- a/usr.sbin/cron/lib/entry.c
+++ b/usr.sbin/cron/lib/entry.c
@@ -135,43 +135,36 @@ load_entry(file, error_func, pw, envp)
* anymore. too much for my overloaded brain. (vix, jan90)
* HINT
*/
- Debug(DPARS, ("load_entry()...about to test shortcuts\n"))
ch = get_string(cmd, MAX_COMMAND, file, " \t\n");
if (!strcmp("reboot", cmd)) {
- Debug(DPARS, ("load_entry()...reboot shortcut\n"))
e->flags |= WHEN_REBOOT;
} else if (!strcmp("yearly", cmd) || !strcmp("annually", cmd)){
- Debug(DPARS, ("load_entry()...yearly shortcut\n"))
bit_set(e->minute, 0);
bit_set(e->hour, 0);
bit_set(e->dom, 0);
bit_set(e->month, 0);
bit_nset(e->dow, 0, (LAST_DOW-FIRST_DOW+1));
} else if (!strcmp("monthly", cmd)) {
- Debug(DPARS, ("load_entry()...monthly shortcut\n"))
bit_set(e->minute, 0);
bit_set(e->hour, 0);
bit_set(e->dom, 0);
bit_nset(e->month, 0, (LAST_MONTH-FIRST_MONTH+1));
bit_nset(e->dow, 0, (LAST_DOW-FIRST_DOW+1));
} else if (!strcmp("weekly", cmd)) {
- Debug(DPARS, ("load_entry()...weekly shortcut\n"))
bit_set(e->minute, 0);
bit_set(e->hour, 0);
bit_nset(e->dom, 0, (LAST_DOM-FIRST_DOM+1));
bit_nset(e->month, 0, (LAST_MONTH-FIRST_MONTH+1));
bit_set(e->dow, 0);
} else if (!strcmp("daily", cmd) || !strcmp("midnight", cmd)) {
- Debug(DPARS, ("load_entry()...daily shortcut\n"))
bit_set(e->minute, 0);
bit_set(e->hour, 0);
bit_nset(e->dom, 0, (LAST_DOM-FIRST_DOM+1));
bit_nset(e->month, 0, (LAST_MONTH-FIRST_MONTH+1));
bit_nset(e->dow, 0, (LAST_DOW-FIRST_DOW+1));
} else if (!strcmp("hourly", cmd)) {
- Debug(DPARS, ("load_entry()...hourly shortcut\n"))
bit_set(e->minute, 0);
- bit_nset(e->hour, 0, (LAST_HOUR-FIRST_HOUR+1));
+ bit_set(e->hour, (LAST_HOUR-FIRST_HOUR+1));
bit_nset(e->dom, 0, (LAST_DOM-FIRST_DOM+1));
bit_nset(e->month, 0, (LAST_MONTH-FIRST_MONTH+1));
bit_nset(e->dow, 0, (LAST_DOW-FIRST_DOW+1));
@@ -179,14 +172,6 @@ load_entry(file, error_func, pw, envp)
ecode = e_timespec;
goto eof;
}
- /* Advance past whitespace between shortcut and
- * username/command.
- */
- Skip_Blanks(ch, file);
- if (ch == EOF) {
- ecode = e_cmd;
- goto eof;
- }
} else {
Debug(DPARS, ("load_entry()...about to parse numerics\n"))
diff --git a/usr.sbin/kbdmap/kbdmap.pl b/usr.sbin/kbdmap/kbdmap.pl
index 6c637776edf67..64407bba9e570 100644
--- a/usr.sbin/kbdmap/kbdmap.pl
+++ b/usr.sbin/kbdmap/kbdmap.pl
@@ -85,7 +85,7 @@ sub font_current {
while(<F>) {
/^#/ && next;
- if (/^\s*font[0-9]+x[0-9]+\s*=\s*\"?([^\s\"]+)\"?/) {
+ if (/^\s*font[0-9]+x[0-9]+\s*=\s*(\S+)/) {
$font_current = $1 if $1 ne "NO";
}
}
diff --git a/usr.sbin/tcpdump/tcpdump/Makefile b/usr.sbin/tcpdump/tcpdump/Makefile
index b0098bbda1bf8..8b9423e6c7b8a 100644
--- a/usr.sbin/tcpdump/tcpdump/Makefile
+++ b/usr.sbin/tcpdump/tcpdump/Makefile
@@ -21,7 +21,9 @@ SRCS = version.c tcpdump.c \
CLEANFILES+= version.c
DPADD+= ${LIBL} ${LIBPCAP}
LDADD+= -ll -lpcap
-.if exists(../../../crypto) && !defined(NOSECURE) && !defined(NO_OPENSSL)
+.if exists(../../../secure) && !defined(NOCRYPT) && !defined(NOSECURE) && \
+ !defined(NO_OPENSSL) && !defined(RELEASE_CRUNCH)
+DISTRIBUTION=crypto
DPADD+= ${LIBCRYPTO}
LDADD+= -lcrypto
CFLAGS+= -I${DESTDIR}/usr/include/openssl -DCRYPTO -DHAVE_LIBCRYPTO -DHAVE_RC5_H -DHAVE_CAST_H
diff --git a/usr.sbin/timed/timed/timed.8 b/usr.sbin/timed/timed/timed.8
index 9ec651c8fa3c2..216e72280d8f1 100644
--- a/usr.sbin/timed/timed/timed.8
+++ b/usr.sbin/timed/timed/timed.8
@@ -40,21 +40,21 @@
.Nd time server daemon
.Sh SYNOPSIS
.Nm timed
-.Op Fl dtM
+.Op Fl M
+.Op Fl t
+.Op Fl d
.Op Fl i Ar network
.Op Fl n Ar network
-.Op Fl F Ar host ...
+.Op Fl F Ar host1 host2 ...
.Sh DESCRIPTION
-The
-.Nm
-daemon is a time server daemon
-which is normally invoked at boot time from the
-.Xr rc.network 8
+This
+is a time server daemon and is normally invoked
+at boot time from the
+.Xr rc 8
file.
It synchronizes the host's time with the time of other
-machines, which are also running
-.Nm Ns ,
-in a local area network.
+machines in a local area network running
+.Nm Ns .
These time servers will slow down the clocks of some machines
and speed up the clocks of others to bring them to the average network time.
The average network time is computed from measurements of clock differences
@@ -62,87 +62,9 @@ using the
.Tn ICMP
timestamp request message.
.Pp
-The following options are available:
-.Bl -tag -width indent
-.It Fl d
-Enable debugging mode;
-do not detach from the terminal.
-.It Fl i Ar network
-Add
-.Ar network
-to the list of networks to ignore.
-All other networks
-to which the machine is directly connected
-are used by
-.Nm Ns .
-This option may be specified multiple times
-to add more than one network to the list.
-.It Fl F Ar host ...
-Create a list of trusted hosts.
-.Nm
-will only accept trusted hosts as masters.
-If it finds an untrusted host claiming to be master,
-.Nm
-will suppress incoming messages from that host
-and call for a new election.
-This option implies the
-.Fl M
-option.
-If this option is not specified,
-all hosts on the connected networks are treated as trustworthy.
-.It Fl M
-Allow this host to become a
-.Nm
-master if necessary.
-.It Fl n Ar network
-Add
-.Ar network
-to the list of allowed networks.
-All other networks
-to which the machine is directly connected
-are ignored by
-.Nm Ns .
-This option may be specified multiple times
-to add more than one network to the list.
-.It Fl t
-Enable tracing of received messages
-and log to the file
-.It Pa /var/log/timed.log .
-Tracing can be turned on or off while
-.Nm
-is running with the
-.Xr timedc 8
-utility.
-.El
-.Pp
-The
-.Fl n
-and
-.Fl i
-are mutually exclusive
-and require as arguments real networks to which
-the host is connected
-(see
-.Xr networks 5 ) .
-If neither flag is specified,
-.Nm
-will listen on all connected networks.
-.Pp
-A
+The service provided by
.Nm
-running without the
-.Fl M
-nor
-.Fl F
-flags will always remain a slave.
-If the
-.Fl F
-flag is not used,
-.Nm
-will treat all machines as trustworthy.
-.Pp
-.Nm
-is based on a master-slave
+is based on a master-slave
scheme.
When
.Nm
@@ -158,40 +80,80 @@ It also communicates with
in order to set the date globally,
and with
.Xr timedc 8 ,
-a
+a timed control program.
+If the machine running the master crashes, then the slaves will elect
+a new master from among slaves running with the
+.Fl M
+flag.
+A
.Nm
-control program.
-If the machine running the master becomes unreachable,
-the slaves will elect a new master
-from among those slaves
-which are running with at least one of the
+running without the
.Fl M
-and
+or
.Fl F
-flags.
+flags will remain a slave.
+The
+.Fl t
+flag enables
+.Nm timed
+to trace the messages it receives in the
+file
+.Pa /var/log/timed.log .
+Tracing can be turned on or off by the program
+.Xr timedc 8 .
+The
+.Fl d
+flag is for debugging the daemon.
+It causes the program to not put itself into the background.
.Pp
-At startup
+Normally
.Nm
-normally checks for a master time server on each network to which
-it is connected, except as modified by the
-.Fl n
-and
-.Fl i
-options described above.
+checks for a master time server on each network to which
+it is connected, except as modified by the options described below.
It will request synchronization service from the first master server
located.
If permitted by the
.Fl M
-or
-.Fl F
-flags, it will provide synchronization service on any attached networks
-on which no trusted master server was detected.
+flag, it will provide synchronization service on any attached networks
+on which no current master server was detected.
Such a server propagates the time computed by the top-level master.
-.Nm
-will periodically check for the presence of a master
-on those networks for which it is operating as a slave.
-If it finds that there are no trusted masters on a network,
-it will begin the election process on that network.
+The
+.Fl n
+flag, followed by the name of a network which the host is connected to
+(see
+.Xr networks 5 ) ,
+overrides the default choice of the
+network addresses made by the program.
+Each time the
+.Fl n
+flag appears, that network name is added to a list of valid networks.
+All other networks are ignored.
+The
+.Fl i
+flag, followed by the name of a network to which the host is connected
+(see
+.Xr networks 5 ) ,
+overrides the default choice of the network addresses made by the program.
+Each time the
+.Fl i
+flag appears, that network name is added to a list of networks to ignore.
+All other networks are used by the time daemon.
+The
+.Fl n
+and
+.Fl i
+flags are meaningless if used together.
+.Pp
+.Nm Timed
+checks for a master time server on each network to which
+it is connected, except as modified by the
+.Fl n
+and
+.Fl i
+options described above.
+If it finds masters on more than one network, it chooses one network
+on which to be a "slave," and then periodically checks the other
+networks to see if the masters there have disappeared.
.Pp
One way to synchronize a group of machines is to use an
.Tn NTP
@@ -252,7 +214,6 @@ log file for master timed
.Xr adjtime 2 ,
.Xr gettimeofday 2 ,
.Xr icmp 4 ,
-.Xr networks 5 ,
.Xr timedc 8
.Rs
.%T "TSP: The Time Synchronization Protocol for UNIX 4.3BSD"