summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
Diffstat (limited to 'lib')
-rw-r--r--lib/libc/gen/arc4random.383
-rw-r--r--lib/libc/gen/arc4random.c172
-rw-r--r--lib/libc/gen/stringlist.3120
-rw-r--r--lib/libc/gen/stringlist.c120
-rw-r--r--lib/libc/i386/string/memcpy.S2
-rw-r--r--lib/libc/locale/mskanji.c107
-rw-r--r--lib/libedit/editrc.5292
-rw-r--r--lib/libutil/login_auth.371
8 files changed, 0 insertions, 967 deletions
diff --git a/lib/libc/gen/arc4random.3 b/lib/libc/gen/arc4random.3
deleted file mode 100644
index 25c6d4d0a02ec..0000000000000
--- a/lib/libc/gen/arc4random.3
+++ /dev/null
@@ -1,83 +0,0 @@
-.\" $OpenBSD: arc4random.3,v 1.2 1997/04/27 22:40:25 angelos Exp $
-.\" Copyright 1997 Niels Provos <provos@physnet.uni-hamburg.de>
-.\" 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 Niels Provos.
-.\" 4. The name of the author may not be used to endorse or promote products
-.\" derived from this software without specific prior written permission.
-.\"
-.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``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 AUTHOR 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.
-.\"
-.\" Manual page, using -mandoc macros
-.\"
-.Dd April 15, 1997
-.Dt ARC4RANDOM 3
-.Os
-.Sh NAME
-.Nm arc4random,
-.Nm arc4random_stir,
-.Nm arc4random_addrandom
-.Nd arc4 random number generator.
-.Sh SYNOPSIS
-.Fd #include <stdlib.h>
-.Ft u_int32_t
-.Fn arc4random "void"
-.Ft void
-.Fn arc4random_stir "void"
-.Ft void
-.Fn arc4random_addrandom "unsigned char *dat" "int datlen"
-.Sh DESCRIPTION
-The
-.Fn arc4random
-function uses the key stream generator employed by the
-arc4 cipher, which uses 8*8 8 bit S-Boxes. The S-Boxes
-can be in about
-.if t 2\u\s71700\s10\d
-.if n (2**1700)
-states.
-.Pp
-The
-.Fn arc4random_stir
-function reads data from
-.Pa /dev/urandom
-and uses it to permutate the S-Boxes via
-.Fn arc4random_addrandom .
-.Pp
-There is no need to call
-.Fn arc4random_stir
-before using
-.Fn arc4random ,
-since
-.Fn arc4random
-automatically initalizes itself.
-.Sh SEE ALSO
-.Xr rand 3 ,
-.Xr random 3 ,
-.Xr srandomdev 3
-.Sh HISTORY
-.Pa RC4
-has been designed by RSA Data Security, Inc. It was posted anonymously
-to the USENET and was confirmed to be equivalent by several sources who
-had access to the original cipher. Since
-.Pa RC4
-used to be a trade secret, the cipher is now refered to as
-.Pa ARC4 .
diff --git a/lib/libc/gen/arc4random.c b/lib/libc/gen/arc4random.c
deleted file mode 100644
index b9f8a48468328..0000000000000
--- a/lib/libc/gen/arc4random.c
+++ /dev/null
@@ -1,172 +0,0 @@
-/* $Id: arc4random.c,v 1.1 1996/12/28 06:33:01 dm Exp $ */
-
-/*
- * Arc4 random number generator for OpenBSD.
- * Copyright 1996 David Mazieres <dm@lcs.mit.edu>.
- *
- * Modification and redistribution in source and binary forms is
- * permitted provided that due credit is given to the author and the
- * OpenBSD project (for instance by leaving this copyright notice
- * intact).
- */
-
-/*
- * This code is derived from section 17.1 of Applied Cryptography,
- * second edition, which describes a stream cipher allegedly
- * compatible with RSA Labs "RC4" cipher (the actual description of
- * which is a trade secret). The same algorithm is used as a stream
- * cipher called "arcfour" in Tatu Ylonen's ssh package.
- *
- * Here the stream cipher has been modified always to include the time
- * when initializing the state. That makes it impossible to
- * regenerate the same random sequence twice, so this can't be used
- * for encryption, but will generate good random numbers.
- *
- * RC4 is a registered trademark of RSA Laboratories.
- */
-
-#include <stdlib.h>
-#include <fcntl.h>
-#include <unistd.h>
-#include <sys/types.h>
-#include <sys/time.h>
-
-struct arc4_stream {
- u_int8_t i;
- u_int8_t j;
- u_int8_t s[256];
-};
-
-static int rs_initialized;
-static struct arc4_stream rs;
-
-static inline void
-arc4_init(as)
- struct arc4_stream *as;
-{
- int n;
-
- for (n = 0; n < 256; n++)
- as->s[n] = n;
- as->i = 0;
- as->j = 0;
-}
-
-static inline void
-arc4_addrandom(as, dat, datlen)
- struct arc4_stream *as;
- u_char *dat;
- int datlen;
-{
- int n;
- u_int8_t si;
-
- as->i--;
- for (n = 0; n < 256; n++) {
- as->i = (as->i + 1);
- si = as->s[as->i];
- as->j = (as->j + si + dat[n % datlen]);
- as->s[as->i] = as->s[as->j];
- as->s[as->j] = si;
- }
-}
-
-static void
-arc4_stir(as)
- struct arc4_stream *as;
-{
- int fd;
- struct {
- struct timeval tv;
- pid_t pid;
- u_int8_t rnd[128 - sizeof(struct timeval) - sizeof(pid_t)];
- } rdat;
-
- gettimeofday(&rdat.tv, NULL);
- rdat.pid = getpid();
- fd = open("/dev/urandom", O_RDONLY, 0);
- if (fd >= 0) {
- (void) read(fd, rdat.rnd, sizeof(rdat.rnd));
- close(fd);
- }
- /* fd < 0? Ah, what the heck. We'll just take whatever was on the
- * stack... */
-
- arc4_addrandom(as, (void *) &rdat, sizeof(rdat));
-}
-
-static inline u_int8_t
-arc4_getbyte(as)
- struct arc4_stream *as;
-{
- u_int8_t si, sj;
-
- as->i = (as->i + 1);
- si = as->s[as->i];
- as->j = (as->j + si);
- sj = as->s[as->j];
- as->s[as->i] = sj;
- as->s[as->j] = si;
- return (as->s[(si + sj) & 0xff]);
-}
-
-static inline u_int32_t
-arc4_getword(as)
- struct arc4_stream *as;
-{
- u_int32_t val;
- val = arc4_getbyte(as) << 24;
- val |= arc4_getbyte(as) << 16;
- val |= arc4_getbyte(as) << 8;
- val |= arc4_getbyte(as);
- return val;
-}
-
-void
-arc4random_stir()
-{
- if (!rs_initialized) {
- arc4_init(&rs);
- rs_initialized = 1;
- }
- arc4_stir(&rs);
-}
-
-void
-arc4random_addrandom(dat, datlen)
- u_char *dat;
- int datlen;
-{
- if (!rs_initialized)
- arc4random_stir();
- arc4_addrandom(&rs, dat, datlen);
-}
-
-u_int32_t
-arc4random()
-{
- if (!rs_initialized)
- arc4random_stir();
- return arc4_getword(&rs);
-}
-
-#if 0
-/*-------- Test code for i386 --------*/
-#include <stdio.h>
-#include <machine/pctr.h>
-int
-main(int argc, char **argv)
-{
- const int iter = 1000000;
- int i;
- pctrval v;
-
- v = rdtsc();
- for (i = 0; i < iter; i++)
- arc4random();
- v = rdtsc() - v;
- v /= iter;
-
- printf("%qd cycles\n", v);
-}
-#endif
diff --git a/lib/libc/gen/stringlist.3 b/lib/libc/gen/stringlist.3
deleted file mode 100644
index 5023c5cebb02a..0000000000000
--- a/lib/libc/gen/stringlist.3
+++ /dev/null
@@ -1,120 +0,0 @@
-.\" $NetBSD: stringlist.3,v 1.2 1997/04/09 08:59:25 kleink Exp $
-.\"
-.\" Copyright (c) 1997 The NetBSD Foundation, Inc.
-.\" All rights reserved.
-.\"
-.\" This file was contributed to The NetBSD Foundation by Luke Mewburn.
-.\"
-.\" 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 NetBSD
-.\" Foundation, Inc. and its contributors.
-.\" 4. Neither the name of The NetBSD Foundation 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 NETBSD FOUNDATION, INC. 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.
-.\"
-.Dd February 24, 1997
-.Os NetBSD 1.3
-.Dt STRINGLIST 3
-.Sh NAME
-.Nm stringlist ,
-.Nm sl_init ,
-.Nm sl_add ,
-.Nm sl_free ,
-.Nm sl_find
-.Nd stringlist manipulation functions
-.Sh SYNOPSIS
-.Fd #include <stringlist.h>
-.Ft StringList *
-.Fn sl_init
-.Ft void
-.Fn sl_add "StringList *sl" "char *item"
-.Ft void
-.Fn sl_free "StringList *sl" "int freeall"
-.Ft char *
-.Fn sl_find "StringList *sl" "char *item"
-.Sh DESCRIPTION
-The
-.Nm
-functions manipulate stringlists, which are lists of
-strings that extend automatically if necessary.
-.Pp
-The
-.Ar StringList
-structure has the following definition:
-.Bd -literal -offset indent
-typedef struct _stringlist {
- char **sl_str;
- size_t sl_max;
- size_t sl_cur;
-} StringList;
-.Ed
-.Pp
-.Bl -tag -width "sl_str" -offset indent
-.It Ar sl_str
-a pointer to the base of the array containing the list.
-.It Ar sl_max
-the size of
-.Ar sl_str .
-.It Ar sl_cur
-the offset in
-.Ar sl_str
-of the current element.
-.El
-.Pp
-The following stringlist manipulation functions are available:
-.Bl -tag -width "sl_init()"
-.It Fn sl_init
-Create a stringlist.
-Returns a pointer to a
-.Ar StringList .
-.It Fn sl_free
-Releases memory occupied by
-.Ar sl
-and the
-.Ar sl->sl_str
-array.
-If
-.Ar freeall
-is non-zero, then each of the items within
-.Ar sl->sl_str
-is released as well.
-.It Fn sl_add
-Add
-.Ar item
-to
-.Ar sl->sl_str
-at
-.Ar sl->sl_cur ,
-extending the size of
-.Ar sl->sl_str
-.It Fn sl_find
-Find
-.Ar item
-in
-.Ar sl ,
-returning NULL if it's not found.
-.El
-.Sh SEE ALSO
-.Xr free 3 ,
-.Xr malloc 3
diff --git a/lib/libc/gen/stringlist.c b/lib/libc/gen/stringlist.c
deleted file mode 100644
index 57c4d91485e80..0000000000000
--- a/lib/libc/gen/stringlist.c
+++ /dev/null
@@ -1,120 +0,0 @@
-/* $NetBSD: stringlist.c,v 1.2 1997/01/17 07:26:20 lukem Exp $ */
-
-/*
- * Copyright (c) 1994 Christos Zoulas
- * 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 Christos Zoulas.
- * 4. The name of the author may not be used to endorse or promote products
- * derived from this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``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 AUTHOR 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.
- */
-
-#if defined(LIBC_SCCS) && !defined(lint)
-static char *rcsid = "$NetBSD: stringlist.c,v 1.2 1997/01/17 07:26:20 lukem Exp $";
-#endif /* LIBC_SCCS and not lint */
-
-#include <stdio.h>
-#include <string.h>
-#include <err.h>
-#include <stdlib.h>
-#include <stringlist.h>
-
-#define _SL_CHUNKSIZE 20
-
-/*
- * sl_init(): Initialize a string list
- */
-StringList *
-sl_init()
-{
- StringList *sl = malloc(sizeof(StringList));
- if (sl == NULL)
- err(1, "stringlist: %m");
-
- sl->sl_cur = 0;
- sl->sl_max = _SL_CHUNKSIZE;
- sl->sl_str = malloc(sl->sl_max * sizeof(char *));
- if (sl->sl_str == NULL)
- err(1, "stringlist: %m");
- return sl;
-}
-
-
-/*
- * sl_add(): Add an item to the string list
- */
-void
-sl_add(sl, name)
- StringList *sl;
- char *name;
-{
- if (sl->sl_cur == sl->sl_max - 1) {
- sl->sl_max += _SL_CHUNKSIZE;
- sl->sl_str = realloc(sl->sl_str, sl->sl_max * sizeof(char *));
- if (sl->sl_str == NULL)
- err(1, "stringlist: %m");
- }
- sl->sl_str[sl->sl_cur++] = name;
-}
-
-
-/*
- * sl_free(): Free a stringlist
- */
-void
-sl_free(sl, all)
- StringList *sl;
- int all;
-{
- size_t i;
-
- if (sl == NULL)
- return;
- if (sl->sl_str) {
- if (all)
- for (i = 0; i < sl->sl_cur; i++)
- free(sl->sl_str[i]);
- free(sl->sl_str);
- }
- free(sl);
-}
-
-
-/*
- * sl_find(): Find a name in the string list
- */
-char *
-sl_find(sl, name)
- StringList *sl;
- char *name;
-{
- size_t i;
-
- for (i = 0; i < sl->sl_cur; i++)
- if (strcmp(sl->sl_str[i], name) == 0)
- return sl->sl_str[i];
-
- return NULL;
-}
diff --git a/lib/libc/i386/string/memcpy.S b/lib/libc/i386/string/memcpy.S
deleted file mode 100644
index 1617c7153aacb..0000000000000
--- a/lib/libc/i386/string/memcpy.S
+++ /dev/null
@@ -1,2 +0,0 @@
-#define MEMCOPY
-#include "bcopy.S"
diff --git a/lib/libc/locale/mskanji.c b/lib/libc/locale/mskanji.c
deleted file mode 100644
index bce27fe433863..0000000000000
--- a/lib/libc/locale/mskanji.c
+++ /dev/null
@@ -1,107 +0,0 @@
-/*
- * ja_JP.SJIS locale table for BSD4.4/rune
- * version 1.0
- * (C) Sin'ichiro MIYATANI / Phase One, Inc
- * May 12, 1995
- *
- * 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 Phase One, Inc.
- * 4. The name of Phase One, Inc. 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.
- */
-
-#ifdef XPG4
-#if defined(LIBC_SCCS) && !defined(lint)
-static char sccsid[] = "@(#)mskanji.c 1.0 (Phase One) 5/5/95";
-#endif /* LIBC_SCCS and not lint */
-
-#include <sys/types.h>
-
-#include <errno.h>
-#include <rune.h>
-#include <stddef.h>
-#include <stdio.h>
-#include <stdlib.h>
-
-rune_t _MSKanji_sgetrune __P((const char *, size_t, char const **));
-int _MSKanji_sputrune __P((rune_t, char *, size_t, char **));
-
-int
-_MSKanji_init(rl)
- _RuneLocale *rl;
-{
- rl->sgetrune = _MSKanji_sgetrune;
- rl->sputrune = _MSKanji_sputrune;
-
- _CurrentRuneLocale = rl;
- __mb_cur_max = 2;
- return (0);
-}
-
-rune_t
-_MSKanji_sgetrune(string, n, result)
- const char *string;
- size_t n;
- char const **result;
-{
- rune_t rune = 0;
-
- if (n < 1 ) {
- rune = _INVALID_RUNE;
- } else {
- rune = *( string++ ) & 0xff;
- if ( ( rune > 0x80 && rune < 0xa0 )
- || ( rune >= 0xe0 && rune < 0xfa ) ) {
- if ( n < 2 ) {
- rune = (rune_t)_INVALID_RUNE;
- --string;
- } else {
- rune = ( rune << 8 ) | ( *( string++ ) & 0xff );
- }
- }
- }
- if (result) *result = string;
- return rune;
-}
-
-int
-_MSKanji_sputrune(c, string, n, result)
- rune_t c;
- char *string, **result;
- size_t n;
-{
- int len, i;
-
- len = ( c > 0x100 ) ? 2 : 1;
- if ( n < len ) {
- if ( result ) *result = (char *) 0;
- } else {
- if ( result ) *result = string + len;
- for ( i = len; i-- > 0; ) {
- *( string++ ) = c >> ( i << 3 );
- }
- }
- return len;
-}
-#endif /* XPG4 */
diff --git a/lib/libedit/editrc.5 b/lib/libedit/editrc.5
deleted file mode 100644
index e9b2992aaf06a..0000000000000
--- a/lib/libedit/editrc.5
+++ /dev/null
@@ -1,292 +0,0 @@
-.\" $NetBSD: editrc.5,v 1.4 1997/04/24 20:20:31 christos Exp $
-.\"
-.\" Copyright (c) 1997 The NetBSD Foundation, Inc.
-.\" All rights reserved.
-.\"
-.\" This file was contributed to The NetBSD Foundation by Luke Mewburn.
-.\"
-.\" 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 NetBSD
-.\" Foundation, Inc. and its contributors.
-.\" 4. Neither the name of The NetBSD Foundation 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 NETBSD FOUNDATION, INC. 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.
-.\"
-.Dd January 11, 1997
-.Os BSD 4.4
-.Dt EDITRC 5
-.Sh NAME
-.Nm editrc
-.Nd configuration file for editline library
-.Sh SYNOPSIS
-.Nm
-.Sh DESCRIPTION
-The
-.Nm
-file defines various settings to be used by the
-.Xr editline 3
-library.
-.Pp
-The format of each line is either:
-.Dl prog:command [arg [...]]
-or
-.Dl command [arg [...]]
-.Pp
-.Ar command
-is one of the
-.Xr editline 3
-builtin commands.
-Refer to
-.Sx BUILTIN COMMANDS
-for more information.
-.Pp
-.Ar prog
-is the program name string that a program defines when it calls
-.Xr el_init 3
-to setup
-.Xr editline 3 ,
-which is usually
-.Va argv[0] .
-.Ar command
-will be executed for any program which matches
-.Ar prog .
-.Pp
-.Ar prog
-may also be a
-.Xr regex 3
-style
-regular expression, in which case
-.Ar command
-will be executed for any program that matches the regular expression.
-.Sh BUILTIN COMMANDS
-The
-.Nm editline
-library has some builtin commands, which affect the way
-that the line editing and history functions operate.
-These are based on similar named builtins present in the
-.Xr tcsh 1
-shell.
-.Pp
-The following builtin commands are available:
-.Bl -tag -width 4n
-.It Ic bind Xo
-.Op Fl a
-.Op Fl e
-.Op Fl k
-.Op Fl l
-.Op Fl r
-.Op Fl s
-.Op Fl v
-.Op Ar key Op Ar command
-.Xc
-Without options, list all bound keys, and the editor command to which
-each is bound.
-If
-.Ar key
-is supplied, show the bindings for
-.Ar key .
-If
-.Ar key command
-is supplied, bind
-.Ar command
-to
-.Ar key .
-Options include:
-.Bl -tag -width 4n
-.It Fl e
-Bind all keys to the standard GNU Emacs-like bindings.
-.It Fl v
-Bind all keys to the standard
-.Xr vi 1 -like
-bindings.
-.It Fl a
-List or change key bindings in the
-.Xr vi 1
-mode alternate (command mode) key map.
-.It Fl k
-.Ar key
-is interpreted as a symbolic arrow key name, which may be one of
-.Sq up ,
-.Sq down ,
-.Sq left
-or
-.Sq right .
-.It Fl l
-List all editor commands and a short description of each.
-.It Fl r
-Remove a key's binding.
-.It Fl s
-.Ar command
-is taken as a literal string and treated as terminal input when
-.Ar key
-is typed.
-Bound keys in
-.Ar command
-are themselves reinterpreted, and this continues for ten levels of
-interpretation.
-.El
-.Pp
-.Ar key
-and
-.Ar command
-can contain control characters of the form
-.Sm off
-.Sq No ^ Ar character
-.Sm on
-.Po
-e.g.
-.Sq ^A
-.Pc ,
-and the following backslashed escape sequences:
-.Pp
-.Bl -tag -compact -offset indent -width 4n
-.It Ic \ea
-Bell
-.It Ic \eb
-Backspace
-.It Ic \ee
-Escape
-.It Ic \ef
-Formfeed
-.It Ic \en
-Newline
-.It Ic \er
-Carriage return
-.It Ic \et
-Horizontal tab
-.It Ic \ev
-Vertical tab
-.Sm off
-.It Sy \e Ar nnn
-.Sm on
-The ASCII character corresponding to the octal number
-.Ar nnn .
-.El
-.Pp
-.Sq \e
-nullifies the special meaning of the following character,
-if it has any, notably
-.Sq \e
-and
-.Sq ^ .
-.It Ic echotc Xo
-.Op Fl sv
-.Ar arg
-.Ar ...
-.Xc
-Exercise terminal capabilities given in
-.Ar arg Ar ... .
-If
-.Ar arg
-is
-.Sq baud ,
-.Sq cols ,
-.Sq lines ,
-.Sq rows ,
-.Sq meta or
-.Sq tabs ,
-the value of that capability is printed, with
-.Dq yes
-or
-.Dq no
-indicating that the terminal does or does not have that capability.
-.Pp
-.Fl s
-returns an emptry string for non-existant capabilities, rather than
-causing an error.
-.Fl v
-causes messages to be verbose.
-.It Ic history
-List the history.
-.It Ic telltc
-List the values of all the terminal capabilities (see
-.Xr termcap 5 ).
-.It Ic settc Ar cap Ar val
-Set the terminal capability
-.Ar cap
-to
-.Ar val ,
-as defined in
-.Xr termcap 5 .
-No sanity checking is done.
-.It Ic setty Xo
-.Op Fl a
-.Op Fl d
-.Op Fl q
-.Op Fl x
-.Op Ar +mode
-.Op Ar -mode
-.Op Ar mode
-.Xc
-Control which tty modes that
-.Nm
-won't allow the user to change.
-.Fl d ,
-.Fl q
-or
-.Fl x
-tells
-.Ic setty
-to act on the
-.Sq edit ,
-.Sq quote
-or
-.Sq execute
-set of tty modes respectively; defaulting to
-.Fl x .
-.Pp
-Without other arguments,
-.Ic setty
-lists the modes in the chosen set which are fixed on
-.Po
-.Sq +mode
-.Pc
-or off
-.Po
-.Sq -mode
-.Pc .
-.Fl a
-lists all tty modes in the chosen set regardless of the setting.
-With
-.Ar +mode ,
-.Ar -mode
-or
-.Ar mode ,
-fixes
-.Ar mode
-on or off or removes control of
-.Ar mode
-in the chosen set.
-.El
-.Sh SEE ALSO
-.Xr editline 3 ,
-.Xr regex 3 ,
-.Xr termcap 5
-.Sh AUTHORS
-The
-.Nm editline
-library was written by Christos Zoulas,
-and this manual was written by Luke Mewburn,
-with some sections inspired by
-.Xr tcsh 1 .
diff --git a/lib/libutil/login_auth.3 b/lib/libutil/login_auth.3
deleted file mode 100644
index 14a2a63fcf0f4..0000000000000
--- a/lib/libutil/login_auth.3
+++ /dev/null
@@ -1,71 +0,0 @@
-.\" Copyright (c) 1995 David Nugent <davidn@blaze.net.au>
-.\" All rights reserved.
-.\"
-.\" Redistribution and use in source and binary forms, with or without
-.\" modification, is permitted provided that the following conditions
-.\" are met:
-.\" 1. Redistributions of source code must retain the above copyright
-.\" notice immediately at the beginning of the file, without modification,
-.\" 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. This work was done expressly for inclusion into FreeBSD. Other use
-.\" is permitted provided this notation is included.
-.\" 4. Absolutely no warranty of function or purpose is made by the author
-.\" David Nugent.
-.\" 5. Modifications may be freely made to this file providing the above
-.\" conditions are met.
-.\"
-.\" $Id$
-.\"
-.Dd December 29, 1996
-.Os FreeBSD
-.Dt LOGIN_AUTH 3
-.Sh NAME
-.Nm authenticate
-.Nm auth_script
-.Nm auth_env
-.Nm auth_scan
-.Nm auth_rmfiles
-.Nm auth_checknologin
-.Nm auth_cat
-.Nm auth_ttyok
-.Nm auth_hostok
-.Nm auth_timesok
-.Nd Authentication style support library for login class capabilities database.
-.Sh SYNOPSIS
-.Fd #include <sys/types.h>
-.Fd #include <login_cap.h>
-.Ft int
-.Fn authenticate "const char *name" "const char *classname" "const char *style" "const char *service"
-.Ft int
-.Fn auth_script "const char * path" ...
-.Ft int
-.Fn auth_env "void"
-.Ft int
-.Fn auth_scan "int ok"
-.Ft int
-.Fn auth_rmfiles "void"
-.Ft int
-.Fn auth_checknologin "login_cap_t *lc"
-.Ft int
-.Fn auth_cat "const char *file"
-.Ft int
-.Fn auth_ttyok "login_cap_t *lc" "const char *tty"
-.Ft int
-.Fn auth_hostok "login_cap_t *lc" "const char *hostname" "char const *ip"
-.Ft int
-.Fn auth_timesok "login_cap_t *lc" "time_t now"
-.Sh DESCRIPTION
-This set of functions support the login class authorisation style interface provided
-by
-.Xr login.conf 5 .
-
-.Sh RETURN VALUES
-.Sh SEE ALSO
-.Xr getcap 3 ,
-.Xr login_cap 3 ,
-.Xr login_class 3 ,
-.Xr login.conf 5 ,
-.Xr termcap 5