summaryrefslogtreecommitdiffstats
path: root/usr.sbin
diff options
context:
space:
mode:
Diffstat (limited to 'usr.sbin')
-rw-r--r--usr.sbin/amd/amd/afs_ops.c8
-rw-r--r--usr.sbin/amd/amd/amd.85
-rw-r--r--usr.sbin/amd/amd/nfs_ops.c10
-rw-r--r--usr.sbin/amd/amd/ufs_ops.c6
-rw-r--r--usr.sbin/amd/config/misc-bsd44l.h12
-rw-r--r--usr.sbin/amd/config/mtab_bsd.c6
-rw-r--r--usr.sbin/amd/config/os-bsd44.h39
-rw-r--r--usr.sbin/amd/text/INSTALL2
-rw-r--r--usr.sbin/arp/arp.89
-rw-r--r--usr.sbin/arp/arp.c65
-rw-r--r--usr.sbin/arp/arp4.4124
-rw-r--r--usr.sbin/bad144/bad144.c6
-rw-r--r--usr.sbin/config.new/Makefile6
-rw-r--r--usr.sbin/config.new/config.8167
-rw-r--r--usr.sbin/diskpart/diskpart.c18
-rw-r--r--usr.sbin/edquota/edquota.8160
-rw-r--r--usr.sbin/edquota/edquota.c8
-rw-r--r--usr.sbin/inetd/inetd.85
-rw-r--r--usr.sbin/iostat/iostat.c4
-rw-r--r--usr.sbin/mtree/Makefile3
-rw-r--r--usr.sbin/mtree/spec.c4
-rw-r--r--usr.sbin/pwd_mkdb/pwd_mkdb.820
-rw-r--r--usr.sbin/repquota/repquota.c3
-rw-r--r--usr.sbin/rmt/rmt.85
-rw-r--r--usr.sbin/sendmail/README4
-rw-r--r--usr.sbin/sliplogin/slip.hosts11
-rw-r--r--usr.sbin/sliplogin/slip.login12
-rw-r--r--usr.sbin/sysctl/sysctl.825
-rw-r--r--usr.sbin/sysctl/sysctl.c88
-rw-r--r--usr.sbin/traceroute/traceroute.85
-rw-r--r--usr.sbin/update/Makefile6
-rw-r--r--usr.sbin/update/update.874
-rw-r--r--usr.sbin/update/update.c75
-rw-r--r--usr.sbin/vipw/pw_util.c36
34 files changed, 840 insertions, 191 deletions
diff --git a/usr.sbin/amd/amd/afs_ops.c b/usr.sbin/amd/amd/afs_ops.c
index 6dfdc14..efd8da4 100644
--- a/usr.sbin/amd/amd/afs_ops.c
+++ b/usr.sbin/amd/amd/afs_ops.c
@@ -35,7 +35,7 @@
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
- * @(#)afs_ops.c 8.1 (Berkeley) 6/6/93
+ * @(#)afs_ops.c 8.2 (Berkeley) 5/10/95
*
* $Id: afs_ops.c,v 5.2.2.4 1992/05/31 16:36:36 jsp Exp $
*
@@ -50,10 +50,10 @@
#ifdef NFS_3
typedef nfs_fh fhandle_t;
#endif /* NFS_3 */
+#include <sys/mount.h>
#ifdef NFS_HDR
#include NFS_HDR
#endif /* NFS_HDR */
-#include <sys/mount.h>
#include "mount.h"
/*
@@ -143,6 +143,10 @@ char *opts;
return EINVAL;
}
+#ifdef NFS_ARGSVERSION
+ nfs_args.version = NFS_ARGSVERSION;
+#endif
+
NFS_FH_DREF(nfs_args.fh, (NFS_FH_TYPE) fhp);
/*
diff --git a/usr.sbin/amd/amd/amd.8 b/usr.sbin/amd/amd/amd.8
index 9fa01a2..1d3e5ec 100644
--- a/usr.sbin/amd/amd/amd.8
+++ b/usr.sbin/amd/amd/amd.8
@@ -35,11 +35,11 @@
.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
.\" SUCH DAMAGE.
.\"
-.\" @(#)amd.8 5.10 (Berkeley) 4/19/94
+.\" @(#)amd.8 5.11 (Berkeley) 6/1/94
.\"
.\" $Id: amd.8,v 5.2.2.1 1992/02/09 15:11:39 jsp beta $
.\"
-.Dd "April 19, 1994"
+.Dd "June 1, 1994"
.Dt AMD 8
.Os
.Sh NAME
@@ -148,6 +148,7 @@ Useful defaults are supplied if either or both
values are missing.
.It Fl v
Version. Displays version and configuration information on standard error.
+.ne 1i
.It Fl w Ar interval
Specify an
.Ar interval ,
diff --git a/usr.sbin/amd/amd/nfs_ops.c b/usr.sbin/amd/amd/nfs_ops.c
index bcfd7a5..6b3cec9 100644
--- a/usr.sbin/amd/amd/nfs_ops.c
+++ b/usr.sbin/amd/amd/nfs_ops.c
@@ -39,7 +39,7 @@
*/
#ifndef lint
-static char sccsid[] = "@(#)nfs_ops.c 8.1 (Berkeley) 6/6/93";
+static char sccsid[] = "@(#)nfs_ops.c 8.2 (Berkeley) 5/10/95";
#endif /* not lint */
#include "am.h"
@@ -52,10 +52,10 @@ static char sccsid[] = "@(#)nfs_ops.c 8.1 (Berkeley) 6/6/93";
#ifdef NFS_3
typedef nfs_fh fhandle_t;
#endif /* NFS_3 */
+#include <sys/mount.h>
#ifdef NFS_HDR
#include NFS_HDR
#endif /* NFS_HDR */
-#include <sys/mount.h>
#include "mount.h"
/*
@@ -510,8 +510,6 @@ mntfs *mf;
else
xopts = strdup(opts);
- bzero((voidp) &nfs_args, sizeof(nfs_args));
-
mnt.mnt_dir = dir;
mnt.mnt_fsname = fs_name;
mnt.mnt_type = MTAB_TYPE_NFS;
@@ -528,6 +526,10 @@ mntfs *mf;
/*
* set mount args
*/
+#ifdef NFS_ARGSVERSION
+ nfs_args.version = NFS_ARGSVERSION;
+#endif
+
NFS_FH_DREF(nfs_args.fh, (NFS_FH_TYPE) fhp->fhstatus_u.fhs_fhandle);
#ifdef ULTRIX_HACK
diff --git a/usr.sbin/amd/amd/ufs_ops.c b/usr.sbin/amd/amd/ufs_ops.c
index fd81c37..28cb418 100644
--- a/usr.sbin/amd/amd/ufs_ops.c
+++ b/usr.sbin/amd/amd/ufs_ops.c
@@ -35,7 +35,7 @@
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
- * @(#)ufs_ops.c 8.1 (Berkeley) 6/6/93
+ * @(#)ufs_ops.c 8.2 (Berkeley) 5/10/95
*
* $Id: ufs_ops.c,v 5.2.2.1 1992/02/09 15:09:08 jsp beta $
*
@@ -50,12 +50,12 @@
typedef nfs_fh fhandle_t;
#endif /* NFS_3 */
+#include <sys/mount.h>
+
#ifdef UFS_HDR
#include UFS_HDR
#endif /* UFS_HDR */
-#include <sys/mount.h>
-
/*
* UN*X file system
*/
diff --git a/usr.sbin/amd/config/misc-bsd44l.h b/usr.sbin/amd/config/misc-bsd44l.h
index d252a97..7f4e595 100644
--- a/usr.sbin/amd/config/misc-bsd44l.h
+++ b/usr.sbin/amd/config/misc-bsd44l.h
@@ -39,20 +39,10 @@
*/
#define M_NEWTYPE 0
-#define NFS_NPROCS 26
-struct nfs_fattr;
-union nfsfh;
-typedef union nfsfh nfsfh_t;
#include <sys/ucred.h>
-#define mount __kern_mount
-#include <sys/mount.h>
-#undef mount
#include <nfs/rpcv2.h>
-#define KERNEL
-#define nfs_init __kern_nfs_init
+#define NFS_NPROCS 26 /* from <nfs/nfsproto.h> */
#include <nfs/nfs.h>
-#undef nfs_init
-#undef KERNEL
#include <ufs/ufs/ufsmount.h>
diff --git a/usr.sbin/amd/config/mtab_bsd.c b/usr.sbin/amd/config/mtab_bsd.c
index 1d81127..c541096 100644
--- a/usr.sbin/amd/config/mtab_bsd.c
+++ b/usr.sbin/amd/config/mtab_bsd.c
@@ -35,7 +35,7 @@
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
- * @(#)mtab_bsd.c 8.1 (Berkeley) 6/6/93
+ * @(#)mtab_bsd.c 8.2 (Berkeley) 5/10/95
*
* $Id: mtab_bsd.c,v 5.2.2.1 1992/02/09 15:10:13 jsp beta $
*
@@ -55,12 +55,16 @@ struct statfs *mp;
new_mp->mnt_fsname = strdup(mp->f_mntfromname);
new_mp->mnt_dir = strdup(mp->f_mntonname);
+#if BSD >= 199506
+ ty = mp->f_fstypename;
+#else
switch (mp->f_type) {
case MOUNT_UFS: ty = MTAB_TYPE_UFS; break;
case MOUNT_NFS: ty = MTAB_TYPE_NFS; break;
case MOUNT_MFS: ty = MTAB_TYPE_MFS; break;
default: ty = "unknown"; break;
}
+#endif
new_mp->mnt_type = strdup(ty);
new_mp->mnt_opts = strdup("unset");
new_mp->mnt_freq = 0;
diff --git a/usr.sbin/amd/config/os-bsd44.h b/usr.sbin/amd/config/os-bsd44.h
index 837d596..7f6a558 100644
--- a/usr.sbin/amd/config/os-bsd44.h
+++ b/usr.sbin/amd/config/os-bsd44.h
@@ -35,7 +35,7 @@
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
- * @(#)os-bsd44.h 8.1 (Berkeley) 6/6/93
+ * @(#)os-bsd44.h 8.2 (Berkeley) 5/10/95
*
* $Id: os-bsd44.h,v 5.2.2.1 1992/02/09 15:10:11 jsp beta $
*
@@ -54,6 +54,12 @@
*/
#define RPC_4
+#include <sys/param.h>
+#if BSD >= 199506
+#define NFS_HDR "misc-bsd44l.h"
+#define UFS_HDR "misc-bsd44l.h"
+#endif
+
/*
* Which version of the NFS interface are we using.
* This is the implementation release number, not
@@ -107,12 +113,31 @@
* How to copy an address into an NFS filehandle
*/
#undef NFS_SA_DREF
+#if BSD >= 199506
+#define NFS_SA_DREF(dst, src) { \
+ (dst).addr = (struct sockaddr *) (src); \
+ (dst).addrlen = sizeof(*src); \
+ (dst).sotype = SOCK_DGRAM; \
+ (dst).proto = 0; \
+ (dst).fhsize = FHSIZE; \
+ (dst).wsize = NFS_WSIZE; \
+ (dst).rsize = NFS_RSIZE; \
+ (dst).readdirsize = NFS_READDIRSIZE; \
+ (dst).timeo = 10; \
+ (dst).retrans = NFS_RETRANS; \
+ (dst).maxgrouplist = NFS_MAXGRPS; \
+ (dst).readahead = NFS_DEFRAHEAD; \
+ (dst).leaseterm = 0; \
+ (dst).deadthresh = 0; \
+ }
+#else
#define NFS_SA_DREF(dst, src) { \
(dst).addr = (struct sockaddr *) (src); \
(dst).addrlen = sizeof(*src); \
(dst).sotype = SOCK_DGRAM; \
(dst).proto = 0; \
}
+#endif
/*
* Byte ordering
@@ -169,7 +194,11 @@ struct mntent {
* Type of a file handle
*/
#undef NFS_FH_TYPE
+#if BSD >= 199506
+#define NFS_FH_TYPE void *
+#else
#define NFS_FH_TYPE nfsv2fh_t *
+#endif
/*
* How to get a mount list
@@ -189,3 +218,11 @@ struct mntent {
*/
#undef RE_HDR
#define RE_HDR <regexp.h>
+
+#if BSD >= 199506
+#undef MTYPE_TYPE
+#define MTYPE_TYPE char *
+#define MOUNT_NFS "nfs"
+#define MOUNT_UFS "ffs"
+#define MOUNT_MFS "mfs"
+#endif
diff --git a/usr.sbin/amd/text/INSTALL b/usr.sbin/amd/text/INSTALL
index d35aaaa..5cdf889 100644
--- a/usr.sbin/amd/text/INSTALL
+++ b/usr.sbin/amd/text/INSTALL
@@ -159,7 +159,7 @@ enter a deadlock inside the kernel. For example, attempting to automount a
directory which is automounted. This will cause the automounter to issue a mount
request causing the kernel to send an NFS request back to the same automounter,
which is currently stuck in a system call and unable to respond - even
-kill -KILL won't get you out of this one.
+kill -s KILL won't get you out of this one.
There is nothing you can do to fix it without rebooting your machine, so...
diff --git a/usr.sbin/arp/arp.8 b/usr.sbin/arp/arp.8
index 27252dd..313aba2 100644
--- a/usr.sbin/arp/arp.8
+++ b/usr.sbin/arp/arp.8
@@ -29,9 +29,9 @@
.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
.\" SUCH DAMAGE.
.\"
-.\" @(#)arp.8 8.1 (Berkeley) 6/6/93
+.\" @(#)arp.8 8.2 (Berkeley) 4/27/95
.\"
-.Dd June 6, 1993
+.Dd April 27, 1995
.Dt ARP 8
.Os BSD 4.3
.Sh NAME
@@ -48,7 +48,6 @@
.Fl s Ar hostname ether_addr
.Op Ar temp
.Op Ar pub
-.Op Ar trail
.Nm arp
.Fl f Ar filename
.Sh DESCRIPTION
@@ -96,9 +95,6 @@ server,
responding to requests for
.Ar hostname
even though the host address is not its own.
-The word
-.Ar trail
-indicates that trailer encapsulations may be sent to this host.
.It Fl f
Causes the file
.Ar filename
@@ -111,7 +107,6 @@ in the file should be of the form
.Ar hostname ether_addr
.Op Ar temp
.Op Ar pub
-.Op Ar trail
.Ed
.Pp
with argument meanings as given above.
diff --git a/usr.sbin/arp/arp.c b/usr.sbin/arp/arp.c
index 2182dc8..4ab7177 100644
--- a/usr.sbin/arp/arp.c
+++ b/usr.sbin/arp/arp.c
@@ -41,7 +41,7 @@ static char copyright[] =
#endif /* not lint */
#ifndef lint
-static char sccsid[] = "@(#)arp.c 8.2 (Berkeley) 1/2/94";
+static char sccsid[] = "@(#)arp.c 8.3 (Berkeley) 4/28/95";
#endif /* not lint */
/*
@@ -64,18 +64,32 @@ static char sccsid[] = "@(#)arp.c 8.2 (Berkeley) 1/2/94";
#include <arpa/inet.h>
-#include <netdb.h>
+#include <err.h>
#include <errno.h>
+#include <netdb.h>
#include <nlist.h>
-#include <stdio.h>
#include <paths.h>
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+#include <unistd.h>
-extern int errno;
static int pid;
-static int kflag;
static int nflag;
static int s = -1;
+int delete __P((char *, char *));
+void dump __P((u_long));
+int ether_aton __P((char *, u_char *));
+void ether_print __P((u_char *));
+int file __P((char *));
+void get __P((char *));
+void getsocket __P((void));
+int rtmsg __P((int));
+int set __P((int, char **));
+void usage __P((void));
+
+int
main(argc, argv)
int argc;
char **argv;
@@ -107,12 +121,13 @@ main(argc, argv)
if (argc != 2)
usage();
get(argv[1]);
- exit(0);
+ return (0);
}
/*
* Process a file to set standard arp entries
*/
+int
file(name)
char *name;
{
@@ -145,6 +160,7 @@ file(name)
return (retval);
}
+void
getsocket() {
if (s < 0) {
s = socket(PF_ROUTE, SOCK_RAW, 0);
@@ -167,6 +183,7 @@ struct {
/*
* Set an individual arp entry
*/
+int
set(argc, argv)
int argc;
char **argv;
@@ -252,12 +269,12 @@ overwrite:
/*
* Display an individual arp entry
*/
+void
get(host)
char *host;
{
struct hostent *hp;
struct sockaddr_inarp *sin = &sin_m;
- u_char *ea;
sin_m = blank_sin;
sin->sin_addr.s_addr = inet_addr(host);
@@ -281,6 +298,7 @@ get(host)
/*
* Delete an arp entry
*/
+int
delete(host, info)
char *host;
char *info;
@@ -289,8 +307,6 @@ delete(host, info)
register struct sockaddr_inarp *sin = &sin_m;
register struct rt_msghdr *rtm = &m_rtmsg.m_rtm;
struct sockaddr_dl *sdl;
- u_char *ea;
- char *eaddr;
if (info && strncmp(info, "pro", 3) )
export_only = 1;
@@ -334,19 +350,22 @@ delete:
printf("cannot locate %s\n", host);
return (1);
}
- if (rtmsg(RTM_DELETE) == 0)
- printf("%s (%s) deleted\n", host, inet_ntoa(sin->sin_addr));
+ if (rtmsg(RTM_DELETE))
+ return (1);
+ printf("%s (%s) deleted\n", host, inet_ntoa(sin->sin_addr));
+ return (0);
}
/*
* Dump the entire arp table
*/
+void
dump(addr)
-u_long addr;
+ u_long addr;
{
int mib[6];
size_t needed;
- char *host, *malloc(), *lim, *buf, *next;
+ char *host, *lim, *buf, *next;
struct rt_msghdr *rtm;
struct sockaddr_inarp *sin;
struct sockaddr_dl *sdl;
@@ -360,11 +379,11 @@ u_long addr;
mib[4] = NET_RT_FLAGS;
mib[5] = RTF_LLINFO;
if (sysctl(mib, 6, NULL, &needed, NULL, 0) < 0)
- quit("route-sysctl-estimate");
+ err(1, "route-sysctl-estimate");
if ((buf = malloc(needed)) == NULL)
- quit("malloc");
+ err(1, "malloc");
if (sysctl(mib, 6, buf, &needed, NULL, 0) < 0)
- quit("actual retrieval of routing table");
+ err(1, "actual retrieval of routing table");
lim = buf + needed;
for (next = buf; next < lim; next += rtm->rtm_msglen) {
rtm = (struct rt_msghdr *)next;
@@ -389,7 +408,7 @@ u_long addr;
}
printf("%s (%s) at ", host, inet_ntoa(sin->sin_addr));
if (sdl->sdl_alen)
- ether_print(LLADDR(sdl));
+ ether_print((u_char *)LLADDR(sdl));
else
printf("(incomplete)");
if (rtm->rtm_rmx.rmx_expire == 0)
@@ -408,12 +427,14 @@ u_long addr;
}
}
+void
ether_print(cp)
u_char *cp;
{
printf("%x:%x:%x:%x:%x:%x", cp[0], cp[1], cp[2], cp[3], cp[4], cp[5]);
}
+int
ether_aton(a, n)
char *a;
u_char *n;
@@ -431,6 +452,7 @@ ether_aton(a, n)
return (0);
}
+void
usage()
{
printf("usage: arp hostname\n");
@@ -441,7 +463,9 @@ usage()
exit(1);
}
+int
rtmsg(cmd)
+ int cmd;
{
static int seq;
int rlen;
@@ -505,10 +529,3 @@ doit:
strerror(errno));
return (0);
}
-
-quit(msg)
-char *msg;
-{
- fprintf(stderr, "%s\n", msg);
- exit(1);
-}
diff --git a/usr.sbin/arp/arp4.4 b/usr.sbin/arp/arp4.4
new file mode 100644
index 0000000..0cd7161
--- /dev/null
+++ b/usr.sbin/arp/arp4.4
@@ -0,0 +1,124 @@
+.\" Copyright (c) 1985, 1986, 1988, 1994
+.\" The Regents of the University of California. All rights reserved.
+.\"
+.\" Redistribution and use in source and binary forms, with or without
+.\" modification, are permitted provided that the following conditions
+.\" are met:
+.\" 1. Redistributions of source code must retain the above copyright
+.\" notice, this list of conditions and the following disclaimer.
+.\" 2. Redistributions in binary form must reproduce the above copyright
+.\" notice, this list of conditions and the following disclaimer in the
+.\" documentation and/or other materials provided with the distribution.
+.\" 3. All advertising materials mentioning features or use of this software
+.\" must display the following acknowledgement:
+.\" This product includes software developed by the University of
+.\" California, Berkeley and its contributors.
+.\" 4. Neither the name of the University nor the names of its contributors
+.\" may be used to endorse or promote products derived from this software
+.\" without specific prior written permission.
+.\"
+.\" THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
+.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+.\" ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
+.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+.\" SUCH DAMAGE.
+.\"
+.\" @(#)arp4.4 6.5 (Berkeley) 4/18/94
+.\"
+.Dd April 18, 1994
+.Dt ARP 4
+.Os BSD 4
+.Sh NAME
+.Nm arp
+.Nd Address Resolution Protocol
+.Sh SYNOPSIS
+.Em "pseudo-device ether"
+.Sh DESCRIPTION
+The Address Resolution Protocol (ARP) is a protocol used to dynamically
+map between Internet host addresses and 10Mb/s Ethernet addresses.
+It is used by all the 10Mb/s Ethernet interface drivers.
+It is not specific to Internet protocols or to 10Mb/s Ethernet,
+but this implementation currently supports only that combination.
+.Pp
+ARP caches Internet-Ethernet address mappings.
+When an interface requests a mapping for an address not in the cache,
+ARP queues the message which requires the mapping and broadcasts
+a message on the associated network requesting the address mapping.
+If a response is provided, the new mapping is cached and any pending
+message is transmitted.
+ARP will queue at most one packet while waiting for a response to a
+mapping request;
+only the most recently ``transmitted'' packet is kept.
+If the target host does not respond after several requests,
+the host is considered to be down for a short period (normally 20 seconds),
+allowing an error to be returned to transmission attempts during this
+interval.
+The error is
+.Li EHOSTDOWN
+for a non-responding destination host, and
+.Li EHOSTUNREACH
+for a non-responding router.
+.Pp
+The ARP cache is stored in the system routing table as
+dynamically-created host routes.
+The route to a directly-attached Ethernet network is installed as a
+.Dq cloning
+route (one with the
+.Li RTF_CLONING
+flag set),
+causing routes to individual hosts on that network to be created on
+demand.
+These routes time out periodically (normally 20 minutes after validated;
+entries are not validated when not in use).
+An entry for a host which is not responding is a
+.Dq reject
+route (one with the
+.Li RTF_REJECT
+flag set).
+.Pp
+ARP entries may be added, deleted or changed with the
+.Xr arp 8
+utility.
+Manually-added entries may be temporary or permanent,
+and may be
+.Dq published ,
+in which case the system will respond to ARP requests for that host
+as if it were the target of the request.
+.Pp
+In the past,
+ARP was used to negotiate the use of a trailer encapsulation.
+This is no longer supported.
+.Pp
+ARP watches passively for hosts impersonating the local host (i.e. a host
+which responds to an ARP mapping request for the local host's address).
+.Sh DIAGNOSTICS
+.Em "duplicate IP address %x!! sent from ethernet address: %x:%x:%x:%x:%x:%x."
+ARP has discovered another host on the local network which responds to
+mapping requests for its own Internet address with a different Ethernet
+address, generally indicating that two hosts are attempting to use the
+same Internet address.
+.Sh SEE ALSO
+.Xr inet 4 ,
+.Xr route 4 ,
+.Xr arp 8 ,
+.Xr ifconfig 8 ,
+.Xr route 8
+.sp
+.Rs
+.%A Plummer, D.
+.%B "An Ethernet Address Resolution Protocol"
+.%T RFC826
+.Re
+.Rs
+.%A Leffler, S.J.
+.%A Karels, M.J.
+.%B "Trailer Encapsulations
+.%T RFC893
+.Re
+
diff --git a/usr.sbin/bad144/bad144.c b/usr.sbin/bad144/bad144.c
index 0afa9e4..aa9f631 100644
--- a/usr.sbin/bad144/bad144.c
+++ b/usr.sbin/bad144/bad144.c
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1993, 198019861988
+ * Copyright (c) 1980, 1986, 1988, 1993
* The Regents of the University of California. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
@@ -33,12 +33,12 @@
#ifndef lint
static char copyright[] =
-"@(#) Copyright (c) 1993, 198019861988\n\
+"@(#) Copyright (c) 1980, 1986, 1988, 1993\n\
The Regents of the University of California. All rights reserved.\n";
#endif not lint
#ifndef lint
-static char sccsid[] = "@(#)bad144.c 8.1 (Berkeley) 6/6/93";
+static char sccsid[] = "@(#)bad144.c 8.2 (Berkeley) 4/27/95";
#endif not lint
/*
diff --git a/usr.sbin/config.new/Makefile b/usr.sbin/config.new/Makefile
index 6dc5a7e..aec467b 100644
--- a/usr.sbin/config.new/Makefile
+++ b/usr.sbin/config.new/Makefile
@@ -1,13 +1,11 @@
-# @(#)Makefile 8.2 (Berkeley) 4/19/94
+# @(#)Makefile 8.3 (Berkeley) 5/29/94
PROG= config
SRCS= files.c gram.y hash.c main.c mkheaders.c mkioconf.c mkmakefile.c \
mkswap.c pack.c scan.l sem.c util.c
CFLAGS+=-I${.CURDIR} -I.
CLEANFILES=gram.c scan.c y.tab.h
-MAN8= config.new.0
-
-MLINKS+=config.new.0 config.0
+MAN8= config.0
.include <bsd.prog.mk>
diff --git a/usr.sbin/config.new/config.8 b/usr.sbin/config.new/config.8
new file mode 100644
index 0000000..5eae8d3
--- /dev/null
+++ b/usr.sbin/config.new/config.8
@@ -0,0 +1,167 @@
+.\" Copyright (c) 1980, 1991, 1993
+.\" The Regents of the University of California. All rights reserved.
+.\"
+.\" Redistribution and use in source and binary forms, with or without
+.\" modification, are permitted provided that the following conditions
+.\" are met:
+.\" 1. Redistributions of source code must retain the above copyright
+.\" notice, this list of conditions and the following disclaimer.
+.\" 2. Redistributions in binary form must reproduce the above copyright
+.\" notice, this list of conditions and the following disclaimer in the
+.\" documentation and/or other materials provided with the distribution.
+.\" 3. All advertising materials mentioning features or use of this software
+.\" must display the following acknowledgement:
+.\" This product includes software developed by the University of
+.\" California, Berkeley and its contributors.
+.\" 4. Neither the name of the University nor the names of its contributors
+.\" may be used to endorse or promote products derived from this software
+.\" without specific prior written permission.
+.\"
+.\" THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
+.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+.\" ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
+.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+.\" SUCH DAMAGE.
+.\"
+.\" @(#)config.8 8.2 (Berkeley) 4/19/94
+.\"
+.Dd April 19, 1994
+.Dt CONFIG.NEW 8
+.Os BSD 4
+.Sh NAME
+.Nm config.new
+.Nd build kernel compilation directories
+.Sh SYNOPSIS
+.Nm config
+.Op Fl p
+.Ar system-name
+.Sh DESCRIPTION
+.Pp
+This is the new version of the
+.Nm config
+program.
+It understands the more modern autoconfiguration scheme
+used on the SPARC and i386 platforms.
+The old version of config is still used with the
+HP300, DECstation, and derivative platforms.
+Only the version of
+.Nm config
+applicable to the architecture that you are running
+will be installed on your machine.
+.Pp
+.Nm Config
+builds a set of configuration files from the file
+.Ar system-name ,
+which describes
+the system to configure.
+.Pp
+.Nm Config
+should run from the
+.Pa conf
+subdirectory of the top-level machine-specific directory
+of the system source (usually
+.Pa /sys/MACHINE/conf ,
+where
+.Pa MACHINE
+is one of
+.Pa vax ,
+.Pa tahoe ,
+.Pa hp300 ,
+and so forth).
+.Nm Config
+assumes the directory
+.Pa ../../compile
+exists; it places all output files in a subdirectory there,
+creating the subdirectory if necessary.
+The subdirectory name is taken from the
+.Ar system-name ;
+thus, configuring with
+.Dq Li config PICKLE
+will use the directory
+.Pa ../../compile/PICKLE .
+.Pp
+If the
+.Fl p
+option is supplied,
+.Pa .PROF
+is appended to the compilation directory name, and
+.Nm config
+acts as if the lines
+.Dq Li makeoptions PROF="-pg"
+and
+.Dq Li options GPROF
+appeared in the configuration file.
+This will build a system that includes profiling code; see
+.Xr kgmon 8
+and
+.Xr gprof 1 .
+The
+.Fl p
+flag is expected to be used for
+.Dq one-shot
+profiles of existing systems;
+for regular profiling,
+it is probably wiser to make a separate configuration
+containing the
+.Li makeoptions
+line.
+.Pp
+The old undocumented
+.Fl g
+flag is no longer supported.
+Instead, use
+.Dq Li makeoptions DEBUG="-g"
+and (typically)
+.Dq Li options KGDB .
+.Pp
+The output of
+.Nm config
+consists of a number of files, principally
+.Pa ioconf.c ,
+a description of I/O devices that may be attached to the system; and a
+.Pa Makefile ,
+used by
+.Xr make 1
+in building the kernel.
+.Pp
+After running
+.Nm config ,
+it is wise to run
+.Dq Li make depend
+in the directory where the new makefile
+was created.
+.Nm Config
+prints a reminder of this when it completes.
+.Pp
+If
+.Nm config
+stops due to errors, the problems reported should be corrected and
+.Nm config
+should be run again.
+.Nm Config
+attempts to avoid changing the compilation directory
+if there are configuration errors,
+but this code is not well-tested,
+and some problems (such as running out of disk space)
+are unrecoverable.
+.Sh SEE ALSO
+The SYNOPSIS portion of each device in section 4.
+.Rs
+.%T "Building 4.4 BSD Systems with Config"
+.\" .%T "Device Support in 4.4BSD"
+.Re
+.sp
+.Xr config 8
+.Sh HISTORY
+The
+.Nm
+command appeared in
+.Bx 4.1 .
+It was completely revised in
+.Bx 4.4 .
diff --git a/usr.sbin/diskpart/diskpart.c b/usr.sbin/diskpart/diskpart.c
index c89d0f1..3732f76 100644
--- a/usr.sbin/diskpart/diskpart.c
+++ b/usr.sbin/diskpart/diskpart.c
@@ -38,7 +38,7 @@ static char copyright[] =
#endif /* not lint */
#ifndef lint
-static char sccsid[] = "@(#)diskpart.c 8.1 (Berkeley) 6/6/93";
+static char sccsid[] = "@(#)diskpart.c 8.3 (Berkeley) 11/30/94";
#endif /* not lint */
/*
@@ -343,9 +343,9 @@ main(argc, argv)
struct disklabel disk;
struct field {
- char *f_name;
- char *f_defaults;
- u_long *f_location;
+ char *f_name;
+ char *f_defaults;
+ u_int32_t *f_location;
} fields[] = {
{ "sector size", "512", &disk.d_secsize },
{ "#sectors/track", 0, &disk.d_nsectors },
@@ -373,12 +373,14 @@ promptfordisk(name)
for (;;) {
fprintf(stderr, "Disk/controller type (%s)? ", dktypenames[1]);
(void) gets(buf);
- if (buf[0] == 0)
+ if (buf[0] == 0) {
dp->d_type = 1;
- else
- dp->d_type = gettype(buf, dktypenames);
- if (dp->d_type >= 0)
break;
+ }
+ if ((i = gettype(buf, dktypenames)) >= 0) {
+ dp->d_type = i;
+ break;
+ }
fprintf(stderr, "%s: unrecognized controller type\n", buf);
fprintf(stderr, "use one of:\n", buf);
for (tp = dktypenames; *tp; tp++)
diff --git a/usr.sbin/edquota/edquota.8 b/usr.sbin/edquota/edquota.8
index f5bf705..664357b 100644
--- a/usr.sbin/edquota/edquota.8
+++ b/usr.sbin/edquota/edquota.8
@@ -32,119 +32,129 @@
.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
.\" SUCH DAMAGE.
.\"
-.\" @(#)edquota.8 8.1 (Berkeley) 6/6/93
+.\" @(#)edquota.8 8.2 (Berkeley) 4/27/95
.\"
-.TH EDQUOTA 8 "June 6, 1993"
-.UC 5
-.SH NAME
-edquota \- edit user quotas
-.SH SYNOPSIS
-.B edquota
-[
-.I \-u
-] [
-.I \-p
-proto-username
-]
-username ...
-.br
-.B edquota
-.I \-g
-[
-.I \-p
-proto-groupname
-]
-groupname ...
-.br
-.B edquota
-.I -t
-[
-.I -u
-]
-.br
-.B edquota
-.I -t
-.I -g
-.br
-.SH DESCRIPTION
-.I Edquota
-is a quota editor.
-By default, or if the \fI-u\fP flag is specified,
+.Dd "April 27, 1995"
+.Dt EDQUOTA 8
+.Os
+.Sh NAME
+.Nm edquota
+.Nd edit user quotas
+.Sh SYNOPSIS
+.Nm edquota
+.Op Fl u
+.Op Fl p Ar proto-username
+.Ar username ...
+.Nm edquota
+.Fl g
+.Op Fl p Ar proto-groupname
+.Ar groupname ...
+.Nm edquota
+.Fl t
+.Op Fl u
+.Nm edquota
+.Fl t
+.Fl g
+.Sh DESCRIPTION
+.Nm Edquota
+is a quota editor.
+By default, or if the
+.Fl u
+flag is specified,
one or more users may be specified on the command line.
For each user a temporary file is created
with an ASCII representation of the current
disk quotas for that user.
The list of filesystems with user quotas is determined from
-.IR /etc/fstab .
+.Pa /etc/fstab .
An editor is invoked on the ASCII file.
The editor invoked is
-.IR vi (1)
-unless the environment variable EDITOR specifies otherwise.
-.PP
+.Xr vi 1
+unless the environment variable
+.Ev EDITOR
+specifies otherwise.
+.Pp
The quotas may then be modified, new quotas added, etc.
Setting a quota to zero indicates that no quota should be imposed.
Setting a hard limit to one indicates that no allocations should
be permitted.
Setting a soft limit to one with a hard limit of zero
indicates that allocations should be permitted on
-only a temporary basis (see \fI-t\fP below).
+only a temporary basis (see
+.Fl t
+below).
The current usage information in the file is for informational purposes;
only the hard and soft limits can be changed.
-.PP
+.Pp
On leaving the editor,
-.I edquota
+.Nm edquota
reads the temporary file and modifies the binary
quota files to reflect the changes made.
-.PP
+.Pp
If the
-.B \-p
-option is specified,
-.I edquota
+.Fl p
+flag is specified,
+.Nm edquota
will duplicate the quotas of the prototypical user
specified for each user specified.
This is the normal mechanism used to
initialize quotas for groups of users.
-.PP
-If the \fI-g\fP flag is specified,
-.I edquota
+.Pp
+If the
+.Fl g
+flag is specified,
+.Nm edquota
is invoked to edit the quotas of
one or more groups specified on the command line.
-The \fI-p\fP flag can be specified in conjunction with
-the \fI-g\fP flag to specify a prototypical group
+The
+.Fl p
+flag can be specified in conjunction with
+the
+.Fl g
+flag to specify a prototypical group
to be duplicated among the listed set of groups.
-.PP
+.Pp
Users are permitted to exceed their soft limits
for a grace period that may be specified per filesystem.
Once the grace period has expired,
the soft limit is enforced as a hard limit.
The default grace period for a filesystem is specified in
-.IR /usr/include/ufs/quota.h .
-The \fI-t\fP flag can be used to change the grace period.
-By default, or when invoked with the \fI-u\fP flag,
-the grace period is set for all the filesystems with user
+.Pa /usr/include/ufs/ufs/quota.h .
+The
+.Fl t
+flag can be used to change the grace period.
+By default, or when invoked with the
+.Fl u
+flag, the grace period is set for all the filesystems with user
quotas specified in
-.IR /etc/fstab .
-When invoked with the \fI-g\fP flag the grace period is
+.Pa /etc/fstab .
+When invoked with the
+.Fl g
+flag the grace period is
set for all the filesystems with group quotas specified in
-.IR /etc/fstab .
+.Pa /etc/fstab .
The grace period may be specified in days, hours, minutes, or seconds.
Setting a grace period to zero indicates that the default
grace period should be imposed.
Setting a grace period to one second indicates that no
grace period should be granted.
-.PP
+.Pp
Only the super-user may edit quotas.
-.SH FILES
-.DT
-\fIquota.user\fP at the filesystem root with user quotas
-.br
-\fIquota.group\fP at the filesystem root with group quotas
-.br
-/etc/fstab to find filesystem names and locations
-.SH SEE ALSO
-quota(1),
-quotactl(2),
-fstab(5),
-quotacheck(8), quotaon(8), repquota(8)
-.SH DIAGNOSTICS
+.Sh FILES
+.Bl -tag -width 24n -compact
+.It Pa quota.user
+at the filesystem root with user quotas
+.It Pa quota.group
+at the filesystem root with group quotas
+.It Pa /etc/fstab
+to find filesystem names and locations
+.El
+.Sh SEE ALSO
+.Xr quota 1 ,
+.Xr quotactl 2 ,
+.Xr fstab 5 ,
+.Xr quotacheck 8 ,
+.Xr quotaon 8 ,
+.Xr repquota 8
+.Sh DIAGNOSTICS
Various messages about inaccessible files; self-explanatory.
diff --git a/usr.sbin/edquota/edquota.c b/usr.sbin/edquota/edquota.c
index 3646720..28e1da5 100644
--- a/usr.sbin/edquota/edquota.c
+++ b/usr.sbin/edquota/edquota.c
@@ -41,7 +41,7 @@ static char copyright[] =
#endif /* not lint */
#ifndef lint
-static char sccsid[] = "@(#)edquota.c 8.1 (Berkeley) 6/6/93";
+static char sccsid[] = "@(#)edquota.c 8.3 (Berkeley) 4/27/95";
#endif /* not lint */
/*
@@ -51,6 +51,7 @@ static char sccsid[] = "@(#)edquota.c 8.1 (Berkeley) 6/6/93";
#include <sys/stat.h>
#include <sys/file.h>
#include <sys/wait.h>
+#include <sys/queue.h>
#include <ufs/ufs/quota.h>
#include <errno.h>
#include <fstab.h>
@@ -249,7 +250,7 @@ getprivs(id, quotatype)
getentry(quotagroup, GRPQUOTA));
(void) fchmod(fd, 0640);
}
- lseek(fd, (long)(id * sizeof(struct dqblk)), L_SET);
+ lseek(fd, (off_t)(id * sizeof(struct dqblk)), L_SET);
switch (read(fd, &qup->dqblk, sizeof(struct dqblk))) {
case 0: /* EOF */
/*
@@ -303,7 +304,8 @@ putprivs(id, quotatype, quplist)
if ((fd = open(qup->qfname, O_WRONLY)) < 0) {
perror(qup->qfname);
} else {
- lseek(fd, (long)id * (long)sizeof (struct dqblk), 0);
+ lseek(fd,
+ (off_t)(id * (long)sizeof (struct dqblk)), L_SET);
if (write(fd, &qup->dqblk, sizeof (struct dqblk)) !=
sizeof (struct dqblk)) {
fprintf(stderr, "edquota: ");
diff --git a/usr.sbin/inetd/inetd.8 b/usr.sbin/inetd/inetd.8
index 5fe5711..72c5b4f 100644
--- a/usr.sbin/inetd/inetd.8
+++ b/usr.sbin/inetd/inetd.8
@@ -29,9 +29,9 @@
.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
.\" SUCH DAMAGE.
.\"
-.\" @(#)inetd.8 8.3 (Berkeley) 4/13/94
+.\" @(#)inetd.8 8.4 (Berkeley) 6/1/94
.\"
-.Dd April 13, 1994
+.Dd June 1, 1994
.Dt INETD 8
.Os BSD 4.4
.Sh NAME
@@ -301,6 +301,7 @@ causes
.Nm inetd
to list TCPMUX services in
.Pa inetd.conf .
+.ne 1i
.Sh "EXAMPLES"
.Pp
Here are several example service entries for the various types of services:
diff --git a/usr.sbin/iostat/iostat.c b/usr.sbin/iostat/iostat.c
index a41cac4..42da0fa 100644
--- a/usr.sbin/iostat/iostat.c
+++ b/usr.sbin/iostat/iostat.c
@@ -38,7 +38,7 @@ static char copyright[] =
#endif /* not lint */
#ifndef lint
-static char sccsid[] = "@(#)iostat.c 8.2 (Berkeley) 1/26/94";
+static char sccsid[] = "@(#)iostat.c 8.3 (Berkeley) 4/28/95";
#endif /* not lint */
#include <sys/param.h>
@@ -335,7 +335,7 @@ phdr(signo)
for (i = 0; i < dk_ndrive; i++)
if (dr_select[i])
(void)printf(" sps tps msps ");
- (void)printf(" us ni sy id\n");
+ (void)printf(" us ni sy in id\n");
}
void
diff --git a/usr.sbin/mtree/Makefile b/usr.sbin/mtree/Makefile
index fb8b424..c8f6b35 100644
--- a/usr.sbin/mtree/Makefile
+++ b/usr.sbin/mtree/Makefile
@@ -1,6 +1,7 @@
-# @(#)Makefile 8.1 (Berkeley) 6/6/93
+# @(#)Makefile 8.2 (Berkeley) 4/27/95
PROG= mtree
+MAN8= mtree.0
#CFLAGS+=-DDEBUG
SRCS= compare.c crc.c create.c misc.c mtree.c spec.c verify.c
.PATH: ${.CURDIR}/../../usr.bin/cksum
diff --git a/usr.sbin/mtree/spec.c b/usr.sbin/mtree/spec.c
index a50574f..bb40471 100644
--- a/usr.sbin/mtree/spec.c
+++ b/usr.sbin/mtree/spec.c
@@ -32,7 +32,7 @@
*/
#ifndef lint
-static char sccsid[] = "@(#)spec.c 8.1 (Berkeley) 6/6/93";
+static char sccsid[] = "@(#)spec.c 8.2 (Berkeley) 4/28/95";
#endif /* not lint */
#include <sys/types.h>
@@ -205,7 +205,7 @@ set(t, ip)
err("invalid link count %s", val);
break;
case F_SIZE:
- ip->st_size = strtoul(val, &ep, 10);
+ ip->st_size = strtouq(val, &ep, 10);
if (*ep)
err("invalid size %s", val);
break;
diff --git a/usr.sbin/pwd_mkdb/pwd_mkdb.8 b/usr.sbin/pwd_mkdb/pwd_mkdb.8
index 01bc1c2..3d012e3 100644
--- a/usr.sbin/pwd_mkdb/pwd_mkdb.8
+++ b/usr.sbin/pwd_mkdb/pwd_mkdb.8
@@ -29,9 +29,9 @@
.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
.\" SUCH DAMAGE.
.\"
-.\" @(#)pwd_mkdb.8 8.1 (Berkeley) 6/6/93
+.\" @(#)pwd_mkdb.8 8.2 (Berkeley) 4/27/95
.\"
-.Dd June 6, 1993
+.Dd April 27, 1995
.Dt PWD_MKDB 8
.Os
.Sh NAME
@@ -75,18 +75,18 @@ The databases are used by the C library password routines (see
exits zero on success, non-zero on failure.
.Sh FILES
.Bl -tag -width Pa -compact
-.It Pa /var/db/pwd.db
-The insecure password database file.
-.It Pa /var/db/pwd.db.tmp
-A temporary file.
-.It Pa /var/db/spwd.db
-The secure password database file.
-.It Pa /var/db/spwd.db.tmp
-A temporary file.
.It Pa /etc/master.passwd
The current password file.
.It Pa /etc/passwd
A Version 7 format password file.
+.It Pa /etc/pwd.db
+The insecure password database file.
+.It Pa /etc/pwd.db.tmp
+A temporary file.
+.It Pa /etc/spwd.db
+The secure password database file.
+.It Pa /etc/spwd.db.tmp
+A temporary file.
.El
.Sh BUGS
Because of the necessity for atomic update of the password files,
diff --git a/usr.sbin/repquota/repquota.c b/usr.sbin/repquota/repquota.c
index 29989eb..a37cea0 100644
--- a/usr.sbin/repquota/repquota.c
+++ b/usr.sbin/repquota/repquota.c
@@ -41,7 +41,7 @@ static char copyright[] =
#endif /* not lint */
#ifndef lint
-static char sccsid[] = "@(#)repquota.c 8.1 (Berkeley) 6/6/93";
+static char sccsid[] = "@(#)repquota.c 8.2 (Berkeley) 11/22/94";
#endif /* not lint */
/*
@@ -49,6 +49,7 @@ static char sccsid[] = "@(#)repquota.c 8.1 (Berkeley) 6/6/93";
*/
#include <sys/param.h>
#include <sys/stat.h>
+#include <sys/queue.h>
#include <ufs/ufs/quota.h>
#include <fstab.h>
#include <pwd.h>
diff --git a/usr.sbin/rmt/rmt.8 b/usr.sbin/rmt/rmt.8
index fae5628..dd3fead 100644
--- a/usr.sbin/rmt/rmt.8
+++ b/usr.sbin/rmt/rmt.8
@@ -29,9 +29,9 @@
.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
.\" SUCH DAMAGE.
.\"
-.\" @(#)rmt.8 8.2 (Berkeley) 12/11/93
+.\" @(#)rmt.8 8.3 (Berkeley) 6/1/94
.\"
-.Dd December 11, 1993
+.Dd June 1, 1994
.Dt RMT 8
.Os BSD 4.2
.Sh NAME
@@ -184,6 +184,7 @@ fields of the structure used in the
call. The return value is the
.Ar count
parameter when the operation is successful.
+.ne 1i
.It Sy S
Return the status of the open device, as
obtained with a
diff --git a/usr.sbin/sendmail/README b/usr.sbin/sendmail/README
new file mode 100644
index 0000000..9b91f7e
--- /dev/null
+++ b/usr.sbin/sendmail/README
@@ -0,0 +1,4 @@
+The beta version of sendmail 2.7.0 was removed at the developers request.
+
+You can FTP the latest version from ftp.cs.berkeley.edu:/ucb/sendmail
+
diff --git a/usr.sbin/sliplogin/slip.hosts b/usr.sbin/sliplogin/slip.hosts
new file mode 100644
index 0000000..f6ebf40
--- /dev/null
+++ b/usr.sbin/sliplogin/slip.hosts
@@ -0,0 +1,11 @@
+# @(#)slip.hosts 8.1 (Berkeley) 6/6/93
+#
+# login local-addr remote-addr mask opt1 opt2
+# (normal,compress,noicmp)
+#
+Schez vangogh chez 0xffffff00 compress
+Sjun vangogh 128.32.130.36 0xffffff00 normal
+Sleconte vangogh leconte 0xffffff00 compress
+Sleeb vangogh leeb 0xffffff00 compress
+Smjk vangogh pissaro-sl 0xffffff00 compress
+Soxford vangogh oxford 0xffffff00 compress
diff --git a/usr.sbin/sliplogin/slip.login b/usr.sbin/sliplogin/slip.login
new file mode 100644
index 0000000..3c70095
--- /dev/null
+++ b/usr.sbin/sliplogin/slip.login
@@ -0,0 +1,12 @@
+#!/bin/sh -
+#
+# @(#)slip.login 8.1 (Berkeley) 6/6/93
+
+#
+# generic login file for a slip line. sliplogin invokes this with
+# the parameters:
+# 1 2 3 4 5 6 7-n
+# slipunit ttyspeed loginname local-addr remote-addr mask opt-args
+#
+/sbin/ifconfig sl$1 inet $4 $5 netmask $6
+exit
diff --git a/usr.sbin/sysctl/sysctl.8 b/usr.sbin/sysctl/sysctl.8
index 9def509..bc348a9 100644
--- a/usr.sbin/sysctl/sysctl.8
+++ b/usr.sbin/sysctl/sysctl.8
@@ -29,9 +29,9 @@
.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
.\" SUCH DAMAGE.
.\"
-.\" @(#)sysctl.8 8.1 (Berkeley) 6/6/93
+.\" @(#)sysctl.8 8.2 (Berkeley) 5/9/95
.\"
-.Dd "June 6, 1993"
+.Dd "May 9, 1995"
.Dt SYSCTL 8
.Os
.Sh NAME
@@ -159,6 +159,27 @@ privilege can change the value.
.It user.posix2_sw_dev integer no
.It user.posix2_upe integer no
.El
+.Pp
+The
+.Nm sysctl
+program can get or set debugging variables
+that have been identified for its display.
+This information can be obtained by using the command:
+.Bd -literal -offset indent
+sysctl debug
+.Ed
+In addition,
+.Nm sysctl
+can extract information about the filesystems that have been compiled
+into the running system.
+This information can be obtained by using the command:
+.Bd -literal -offset indent
+sysctl vfs
+.Ed
+By default, only filesystems that are actively being used are listed.
+Use of the
+.Fl A
+flag lists all the filesystems compiled into the running kernel.
.Sh EXAMPLES
.Pp
For example, to retrieve the maximum number of processes allowed
diff --git a/usr.sbin/sysctl/sysctl.c b/usr.sbin/sysctl/sysctl.c
index a342686..9f42981 100644
--- a/usr.sbin/sysctl/sysctl.c
+++ b/usr.sbin/sysctl/sysctl.c
@@ -38,11 +38,12 @@ static char copyright[] =
#endif /* not lint */
#ifndef lint
-static char sccsid[] = "@(#)sysctl.c 8.1 (Berkeley) 6/6/93";
+static char sccsid[] = "@(#)sysctl.c 8.5 (Berkeley) 5/9/95";
#endif /* not lint */
#include <sys/param.h>
#include <sys/gmon.h>
+#include <sys/mount.h>
#include <sys/stat.h>
#include <sys/sysctl.h>
#include <sys/socket.h>
@@ -70,10 +71,12 @@ struct ctlname netname[] = CTL_NET_NAMES;
struct ctlname hwname[] = CTL_HW_NAMES;
struct ctlname username[] = CTL_USER_NAMES;
struct ctlname debugname[CTL_DEBUG_MAXID];
+struct ctlname *vfsname;
#ifdef CTL_MACHDEP_NAMES
struct ctlname machdepname[] = CTL_MACHDEP_NAMES;
#endif
char names[BUFSIZ];
+int lastused;
struct list {
struct ctlname *list;
@@ -84,7 +87,7 @@ struct list secondlevel[] = {
{ 0, 0 }, /* CTL_UNSPEC */
{ kernname, KERN_MAXID }, /* CTL_KERN */
{ vmname, VM_MAXID }, /* CTL_VM */
- { 0, 0 }, /* CTL_FS */
+ { 0, 0 }, /* CTL_VFS */
{ netname, NET_MAXID }, /* CTL_NET */
{ 0, CTL_DEBUG_MAXID }, /* CTL_DEBUG */
{ hwname, HW_MAXID }, /* CTL_HW */
@@ -140,15 +143,16 @@ main(argc, argv)
argc -= optind;
argv += optind;
- if (Aflag || aflag) {
+ if (argc == 0 && (Aflag || aflag)) {
debuginit();
+ vfsinit();
for (lvl1 = 1; lvl1 < CTL_MAXID; lvl1++)
listall(topname[lvl1].ctl_name, &secondlevel[lvl1]);
exit(0);
}
if (argc == 0)
usage();
- while (argc-- > 0)
+ for (; *argv != NULL; ++argv)
parse(*argv, 1);
exit(0);
}
@@ -185,12 +189,14 @@ parse(string, flags)
char *string;
int flags;
{
- int indx, type, state, size, len;
+ int indx, type, state, len;
+ size_t size;
int special = 0;
void *newval = 0;
int intval, newsize = 0;
quad_t quadval;
struct list *lp;
+ struct vfsconf vfc;
int mib[CTL_MAXNAME];
char *cp, *bufp, buf[BUFSIZ], strval[BUFSIZ];
@@ -211,6 +217,8 @@ parse(string, flags)
if ((indx = findname(string, "top", &bufp, &toplist)) == -1)
return;
mib[0] = indx;
+ if (indx == CTL_VFS)
+ vfsinit();
if (indx == CTL_DEBUG)
debuginit();
lp = &secondlevel[indx];
@@ -314,7 +322,26 @@ parse(string, flags)
#endif
break;
- case CTL_FS:
+ case CTL_VFS:
+ mib[3] = mib[1];
+ mib[1] = VFS_GENERIC;
+ mib[2] = VFS_CONF;
+ len = 4;
+ size = sizeof vfc;
+ if (sysctl(mib, 4, &vfc, &size, (void *)0, (size_t)0) < 0) {
+ perror("vfs print");
+ return;
+ }
+ if (flags == 0 && vfc.vfc_refcount == 0)
+ return;
+ if (!nflag)
+ fprintf(stdout, "%s has %d mounted instance%s\n",
+ string, vfc.vfc_refcount,
+ vfc.vfc_refcount != 1 ? "s" : "");
+ else
+ fprintf(stdout, "%d\n", vfc.vfc_refcount);
+ return;
+
case CTL_USER:
break;
@@ -450,14 +477,15 @@ parse(string, flags)
*/
debuginit()
{
- int mib[3], size, loc, i;
+ int mib[3], loc, i;
+ size_t size;
if (secondlevel[CTL_DEBUG].list != 0)
return;
secondlevel[CTL_DEBUG].list = debugname;
mib[0] = CTL_DEBUG;
mib[2] = CTL_DEBUG_NAME;
- for (loc = 0, i = 0; i < CTL_DEBUG_MAXID; i++) {
+ for (loc = lastused, i = 0; i < CTL_DEBUG_MAXID; i++) {
mib[1] = i;
size = BUFSIZ - loc;
if (sysctl(mib, 3, &names[loc], &size, NULL, 0) == -1)
@@ -466,6 +494,50 @@ debuginit()
debugname[i].ctl_type = CTLTYPE_INT;
loc += size;
}
+ lastused = loc;
+}
+
+/*
+ * Initialize the set of filesystem names
+ */
+vfsinit()
+{
+ int mib[4], maxtypenum, cnt, loc, size;
+ struct vfsconf vfc;
+ size_t buflen;
+
+ if (secondlevel[CTL_VFS].list != 0)
+ return;
+ mib[0] = CTL_VFS;
+ mib[1] = VFS_GENERIC;
+ mib[2] = VFS_MAXTYPENUM;
+ buflen = 4;
+ if (sysctl(mib, 3, &maxtypenum, &buflen, (void *)0, (size_t)0) < 0)
+ return;
+ if ((vfsname = malloc(maxtypenum * sizeof(*vfsname))) == 0)
+ return;
+ memset(vfsname, 0, maxtypenum * sizeof(*vfsname));
+ mib[2] = VFS_CONF;
+ buflen = sizeof vfc;
+ for (loc = lastused, cnt = 0; cnt < maxtypenum; cnt++) {
+ mib[3] = cnt;
+ if (sysctl(mib, 4, &vfc, &buflen, (void *)0, (size_t)0) < 0) {
+ if (errno == EOPNOTSUPP)
+ continue;
+ perror("vfsinit");
+ free(vfsname);
+ return;
+ }
+ strcat(&names[loc], vfc.vfc_name);
+ vfsname[cnt].ctl_name = &names[loc];
+ vfsname[cnt].ctl_type = CTLTYPE_INT;
+ size = strlen(vfc.vfc_name) + 1;
+ loc += size;
+ }
+ lastused = loc;
+ secondlevel[CTL_VFS].list = vfsname;
+ secondlevel[CTL_VFS].size = maxtypenum;
+ return;
}
struct ctlname inetname[] = CTL_IPPROTO_NAMES;
diff --git a/usr.sbin/traceroute/traceroute.8 b/usr.sbin/traceroute/traceroute.8
index c1e13bb..5a1ca4c 100644
--- a/usr.sbin/traceroute/traceroute.8
+++ b/usr.sbin/traceroute/traceroute.8
@@ -32,9 +32,9 @@
.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
.\" SUCH DAMAGE.
.\"
-.\" @(#)traceroute.8 8.1 (Berkeley) 6/6/93
+.\" @(#)traceroute.8 8.2 (Berkeley) 6/1/94
.\"
-.Dd June 6, 1993
+.Dd June 1, 1994
.Dt TRACEROUTE 8
.Os BSD 4.3
.Sh NAME
@@ -122,6 +122,7 @@ force the source address to be something other than the IP address
of the interface the probe packet is sent on. If the IP address
is not one of this machine's interface addresses, an error is
returned and nothing is sent.
+.ne 1i
.It Fl t Ar tos
Set the
.Em type-of-service
diff --git a/usr.sbin/update/Makefile b/usr.sbin/update/Makefile
new file mode 100644
index 0000000..ea20d05
--- /dev/null
+++ b/usr.sbin/update/Makefile
@@ -0,0 +1,6 @@
+# @(#)Makefile 8.1 (Berkeley) 6/6/93
+
+PROG= update
+MAN8= update.0
+
+.include <bsd.prog.mk>
diff --git a/usr.sbin/update/update.8 b/usr.sbin/update/update.8
new file mode 100644
index 0000000..78665fa
--- /dev/null
+++ b/usr.sbin/update/update.8
@@ -0,0 +1,74 @@
+.\" Copyright (c) 1991, 1993
+.\" The Regents of the University of California. All rights reserved.
+.\"
+.\" Redistribution and use in source and binary forms, with or without
+.\" modification, are permitted provided that the following conditions
+.\" are met:
+.\" 1. Redistributions of source code must retain the above copyright
+.\" notice, this list of conditions and the following disclaimer.
+.\" 2. Redistributions in binary form must reproduce the above copyright
+.\" notice, this list of conditions and the following disclaimer in the
+.\" documentation and/or other materials provided with the distribution.
+.\" 3. All advertising materials mentioning features or use of this software
+.\" must display the following acknowledgement:
+.\" This product includes software developed by the University of
+.\" California, Berkeley and its contributors.
+.\" 4. Neither the name of the University nor the names of its contributors
+.\" may be used to endorse or promote products derived from this software
+.\" without specific prior written permission.
+.\"
+.\" THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
+.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+.\" ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
+.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+.\" SUCH DAMAGE.
+.\"
+.\" @(#)update.8 8.3 (Berkeley) 4/19/94
+.\"
+.Dd April 19, 1994
+.Dt UPDATE 8
+.Os
+.Sh NAME
+.Nm update
+.Nd flush internal filesystem caches to disk frequently
+.Sh SYNOPSIS
+.Nm update
+.Sh DESCRIPTION
+The
+.Nm update
+command helps protect the integrity of disk volumes
+by flushing
+volatile cached filesystem data
+to disk at thirty second intervals.
+.Nm Update
+uses the
+.Xr sync 2
+function call to do the task.
+.Pp
+.Nm Update
+is commonly invoked at startup time by
+.Xr rc 8
+when the system goes multi-user.
+.Sh SEE ALSO
+.Xr sync 2 ,
+.Xr fsck 8 ,
+.Xr init 8 ,
+.Xr rc 8 ,
+.Xr sync 8
+.Sh BUGS
+It is possible on some systems that a
+.Xr sync
+occurring simultaneously with a crash may cause
+file system damage. See
+.Xr fsck 8 .
+.Sh HISTORY
+An
+.Nm update
+command appeared in
+.At v6 .
diff --git a/usr.sbin/update/update.c b/usr.sbin/update/update.c
new file mode 100644
index 0000000..ae83ad1
--- /dev/null
+++ b/usr.sbin/update/update.c
@@ -0,0 +1,75 @@
+/*-
+ * Copyright (c) 1987, 1990, 1993
+ * The Regents of the University of California. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ * 3. All advertising materials mentioning features or use of this software
+ * must display the following acknowledgement:
+ * This product includes software developed by the University of
+ * California, Berkeley and its contributors.
+ * 4. Neither the name of the University nor the names of its contributors
+ * may be used to endorse or promote products derived from this software
+ * without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
+ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+ * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ */
+
+#ifndef lint
+static char copyright[] =
+"@(#) Copyright (c) 1987, 1990, 1993\n\
+ The Regents of the University of California. All rights reserved.\n";
+#endif /* not lint */
+
+#ifndef lint
+static char sccsid[] = "@(#)update.c 8.1 (Berkeley) 6/6/93";
+#endif /* not lint */
+
+#include <sys/time.h>
+#include <signal.h>
+#include <stdlib.h>
+#include <stdio.h>
+#include <unistd.h>
+
+main()
+{
+ struct itimerval value;
+ void mysync();
+
+ daemon(0, 0);
+
+ (void)signal(SIGALRM, mysync);
+
+ value.it_interval.tv_sec = 30;
+ value.it_interval.tv_usec = 0;
+ value.it_value = value.it_interval;
+ if (setitimer(ITIMER_REAL, &value, NULL)) {
+ perror("update: setitimer");
+ exit(1);
+ }
+ for (;;)
+ sigpause(sigblock(0L));
+ /* NOTREACHED */
+}
+
+void
+mysync()
+{
+ (void)sync();
+}
diff --git a/usr.sbin/vipw/pw_util.c b/usr.sbin/vipw/pw_util.c
index 9873f74..13851a1 100644
--- a/usr.sbin/vipw/pw_util.c
+++ b/usr.sbin/vipw/pw_util.c
@@ -32,7 +32,7 @@
*/
#ifndef lint
-static char sccsid[] = "@(#)pw_util.c 8.3 (Berkeley) 4/2/94";
+static char sccsid[] = "@(#)pw_util.c 8.4 (Berkeley) 4/28/95";
#endif /* not lint */
/*
@@ -60,6 +60,17 @@ static char sccsid[] = "@(#)pw_util.c 8.3 (Berkeley) 4/2/94";
#include "pw_util.h"
extern char *tempname;
+static pid_t editpid = -1;
+static int lockfd;
+
+void
+pw_cont(sig)
+ int sig;
+{
+
+ if (editpid != -1)
+ kill(editpid, sig);
+}
void
pw_init()
@@ -85,15 +96,12 @@ pw_init()
(void)signal(SIGPIPE, SIG_IGN);
(void)signal(SIGQUIT, SIG_IGN);
(void)signal(SIGTERM, SIG_IGN);
- (void)signal(SIGTSTP, SIG_IGN);
- (void)signal(SIGTTOU, SIG_IGN);
+ (void)signal(SIGCONT, pw_cont);
/* Create with exact permissions. */
(void)umask(0);
}
-static int lockfd;
-
int
pw_lock()
{
@@ -153,7 +161,6 @@ pw_edit(notsetuid)
int notsetuid;
{
int pstat;
- pid_t pid;
char *p, *editor;
if (!(editor = getenv("EDITOR")))
@@ -163,7 +170,7 @@ pw_edit(notsetuid)
else
p = editor;
- if (!(pid = vfork())) {
+ if (!(editpid = vfork())) {
if (notsetuid) {
(void)setgid(getgid());
(void)setuid(getuid());
@@ -171,9 +178,18 @@ pw_edit(notsetuid)
execlp(editor, p, tempname, NULL);
_exit(1);
}
- pid = waitpid(pid, (int *)&pstat, 0);
- if (pid == -1 || !WIFEXITED(pstat) || WEXITSTATUS(pstat) != 0)
- pw_error(editor, 1, 1);
+ for (;;) {
+ editpid = waitpid(editpid, (int *)&pstat, WUNTRACED);
+ if (editpid == -1)
+ pw_error(editor, 1, 1);
+ else if (WIFSTOPPED(pstat))
+ raise(WSTOPSIG(pstat));
+ else if (WIFEXITED(pstat) && WEXITSTATUS(pstat) == 0)
+ break;
+ else
+ pw_error(editor, 1, 1);
+ }
+ editpid = -1;
}
void
OpenPOWER on IntegriCloud