BSD 4_4 release
[unix-history] / usr / src / usr.sbin / sliplogin / sliplogin.8
index d6c2061..79628f5 100644 (file)
-.\" Copyright (c) 1990 The Regents of the University of California.
-.\" All rights reserved.
+.\" Copyright (c) 1990, 1991, 1993
+.\"    The Regents of the University of California.  All rights reserved.
 .\"
 .\"
-.\" Redistribution and use in source and binary forms are permitted provided
-.\" that: (1) source distributions retain this entire copyright notice and
-.\" comment, and (2) distributions including binaries display the following
-.\" acknowledgement:  ``This product includes software developed by the
-.\" University of California, Berkeley and its contributors'' in the
-.\" documentation or other materials provided with the distribution and in
-.\" all advertising materials mentioning features or use of this software.
-.\" 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 ``AS IS'' AND WITHOUT ANY EXPRESS OR IMPLIED
-.\" WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF
-.\" MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+.\" 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.
 .\"
 .\"
-.\"    @(#)sliplogin.8 5.2 (Berkeley) 7/1/90
+.\" 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.
 .\"
 .\"
-.TH SLIPLOGIN 8 "July 1, 1990"
-.SH NAME
-sliplogin \- attach a serial line network interface
-.SH SYNOPSIS
-.B sliplogin
-[
-.I loginname
-]
-.SH DESCRIPTION
-.B sliplogin
+.\"     @(#)sliplogin.8        8.1 (Berkeley) 6/6/93
+.\"
+.Dd June 6, 1993
+.Dt SLIPLOGIN 8
+.Os
+.Sh NAME
+.Nm sliplogin
+.Nd attach a serial line network interface
+.Sh SYNOPSIS
+.Nm sliplogin
+.Op Ar loginname
+.Sh DESCRIPTION
+.Nm Sliplogin
 is used to turn the terminal line on standard input into
 is used to turn the terminal line on standard input into
-a Serial Line IP (SLIP) link to a remote host.  To do this, the program
+a Serial Line IP
+.Pq Tn SLIP
+link to a remote host.  To do this, the program
 searches the file
 searches the file
-.B /etc/slip.hosts
+.Pa /etc/slip.hosts
 for an entry matching
 for an entry matching
-.I loginname
+.Ar loginname
 (which defaults to the current login name if omitted).
 If a matching entry is found, the line is configured appropriately
 (which defaults to the current login name if omitted).
 If a matching entry is found, the line is configured appropriately
-for slip (8-bit transparent i/o) and converted to SLIP line
+for slip (8-bit transparent i/o) and converted to
+.Tn SLIP
+line
 discipline.  Then a shell script is invoked to initialize the slip
 discipline.  Then a shell script is invoked to initialize the slip
-interface with the appropriate local and remote IP address,
+interface with the appropriate local and remote
+.Tn IP
+address,
 netmask, etc.
 netmask, etc.
-.PP
+.Pp
 The usual initialization script is
 The usual initialization script is
-.B /etc/slip.login
+.Pa /etc/slip.login
 but, if particular hosts need special initialization, the file
 but, if particular hosts need special initialization, the file
-.BI /etc/slip.login. loginname
+.Pa /etc/slip.login. Ns Ar loginname
 will be executed instead if it exists.
 The script is invoked with the parameters
 will be executed instead if it exists.
 The script is invoked with the parameters
-.TP
-.I slipunit
+.Bl -tag -width slipunit
+.It Em slipunit
 The unit number of the slip interface assigned to this line.  E.g.,
 The unit number of the slip interface assigned to this line.  E.g.,
-.B 0
+.Sy 0
 for
 for
-.BR sl0 .
-.TP
-.I speed
+.Sy sl0 .
+.It Em speed
 The speed of the line.
 The speed of the line.
-.TP
-.I args
+.It Em args
 The arguments from the
 The arguments from the
-.B /etc/slip.hosts
+.Pa /etc/slip.hosts
 entry, in order starting with
 entry, in order starting with
-.IR loginname .
-.PP
+.Ar loginname .
+.El
+.Pp
 Only the super-user may attach a network interface.  The interface is
 automatically detached when the other end hangs up or the
 Only the super-user may attach a network interface.  The interface is
 automatically detached when the other end hangs up or the
-.B sliplogin
+.Nm sliplogin
 process dies.  If the kernel slip
 module has been configured for it, all routes through that interface will
 also disappear at the same time.  If there is other processing a site
 would like done on hangup, the file
 process dies.  If the kernel slip
 module has been configured for it, all routes through that interface will
 also disappear at the same time.  If there is other processing a site
 would like done on hangup, the file
-.B /etc/slip.logout
+.Pa /etc/slip.logout
 or
 or
-.BI /etc/slip.logout. loginname
+.Pa /etc/slip.logout. Ns Ar loginname
 is executed if it exists.  It is given the same arguments as the login script.
 is executed if it exists.  It is given the same arguments as the login script.
-.SS Format of /etc/slip.hosts
+.Ss Format of /etc/slip.hosts
 Comments (lines starting with a `#') and blank lines are ignored.
 Other lines must start with a
 Comments (lines starting with a `#') and blank lines are ignored.
 Other lines must start with a
-.I loginname
+.Ar loginname
 but the remaining arguments can be whatever is appropriate for the
 but the remaining arguments can be whatever is appropriate for the
-.B slip.login
+.Pa  slip.login
 file that will be executed for that name.
 Arguments are separated by white space and follow normal
 file that will be executed for that name.
 Arguments are separated by white space and follow normal
-.BR sh (1)
+.Xr sh 1
 quoting conventions (however,
 quoting conventions (however,
-.I loginname
+.Ar loginname
 cannot be quoted).
 Usually, lines have the form
 cannot be quoted).
 Usually, lines have the form
-.RS
-.I
+.Bd -literal -offset indent
 loginname local-address remote-address netmask opt-args
 loginname local-address remote-address netmask opt-args
-.RE
+.Ed
+.Pp
 where
 where
-.I local-address
+.Em local-address
 and
 and
-.I remote-address
+.Em remote-address
 are the IP host names or addresses of the local and remote ends of the
 slip line and
 are the IP host names or addresses of the local and remote ends of the
 slip line and
-.I netmask
+.Em netmask
 is the appropriate IP netmask.  These arguments are passed
 directly to
 is the appropriate IP netmask.  These arguments are passed
 directly to
-.BR ifconfig (8).
-.I Opt-args
+.Xr ifconfig 8 .
+.Em Opt-args
 are optional arguments used to configure the line.
 are optional arguments used to configure the line.
-.SH EXAMPLE
+.Sh EXAMPLE
 The normal use of
 The normal use of
-.B sliplogin
+.Nm sliplogin
 is to create a
 is to create a
-.B /etc/passwd
+.Pa /etc/passwd
 entry for each legal, remote slip site with
 entry for each legal, remote slip site with
-.B sliplogin
+.Nm sliplogin
 as the shell for that entry.  E.g.,
 as the shell for that entry.  E.g.,
-.RS
+.Bd -literal
 Sfoo:ikhuy6:2010:1:slip line to foo:/tmp:/etc/sliplogin
 Sfoo:ikhuy6:2010:1:slip line to foo:/tmp:/etc/sliplogin
-.RE
+.Ed
+.Pp
 (Our convention is to name the account used by remote host
 (Our convention is to name the account used by remote host
-.I hostname
+.Ar hostname
 as
 as
-.IR Shostname .)
+.Em Shostname . )
 Then an entry is added to
 Then an entry is added to
-.B slip.hosts
+.Pa slip.hosts
 that looks like:
 that looks like:
-.RS
+.Pp
+.Bd -literal -offset indent -compact
 Sfoo   `hostname`      foo     netmask
 Sfoo   `hostname`      foo     netmask
-.RE
+.Ed
+.Pp
 where
 where
-.I `hostname`
+.Em `hostname`
 will be evaluated by
 will be evaluated by
-.B sh
+.Xr sh
 to the local host name and
 to the local host name and
-.I netmask
+.Em netmask
 is the local host IP netmask.
 is the local host IP netmask.
-.PP
+.Pp
 Note that
 Note that
-.B sliplogin
+.Nm sliplogin
 must be setuid to root and, while not a security hole, moral defectives
 can use it to place terminal lines in an unusable state and/or deny
 access to legitimate users of a remote slip line.  To prevent this,
 a site can create a group, say
 must be setuid to root and, while not a security hole, moral defectives
 can use it to place terminal lines in an unusable state and/or deny
 access to legitimate users of a remote slip line.  To prevent this,
 a site can create a group, say
-.IR slip ,
+.Em slip ,
 that only the slip login accounts are put in then make sure that
 that only the slip login accounts are put in then make sure that
-.B /etc/sliplogin
+.Pa /etc/sliplogin
 is in group
 is in group
-.I slip
+.Em slip
 and mode 4550 (setuid root, only group
 and mode 4550 (setuid root, only group
-.I slip
+.Em slip
 can execute binary).
 can execute binary).
-.SH "DIAGNOSTICS"
-.B sliplogin
+.Sh DIAGNOSTICS
+.Nm Sliplogin
 logs various information to the system log daemon,
 logs various information to the system log daemon,
-.BR syslogd (8),
+.Xr syslogd 8 ,
 with a facility code of
 with a facility code of
-.BR daemon .
+.Em daemon .
 The messages are listed here, grouped by severity level.
 The messages are listed here, grouped by severity level.
-.SS Err Severity
-.TP
-.BI "ioctl (TCGETS): " reason
+.Pp
+.Sy Error Severity
+.Bl -tag -width Ds -compact
+.It Sy ioctl (TCGETS): Em reason
 A
 A
-.SB TCGETS
-.B ioctl
+.Dv TCGETS
+.Fn ioctl
 to get the line parameters failed.
 to get the line parameters failed.
-.TP
-.BI "ioctl (TCSETS): " reason
+.Pp
+.It Sy ioctl (TCSETS): Em reason
 A
 A
-.SB TCSETS
-.B ioctl
+.Dv TCSETS
+.Fn ioctl
 to set the line parameters failed.
 to set the line parameters failed.
-.TP
-.BI "/etc/slip.hosts: " reason
+.Pp
+.It Sy /etc/slip.hosts: Em reason
 The
 The
-.B /etc/slip.hosts
+.Pa /etc/slip.hosts
 file could not be opened.
 file could not be opened.
-.TP
-.BI "access denied for " user
+.Pp
+.It Sy access denied for Em user
 No entry for
 No entry for
-.I user
+.Em user
 was found in
 was found in
-.BR /etc/slip.hosts .
-.SS Notice Severity
-.TP
-.BI "attaching slip unit " unit " for " loginname
-SLIP unit
-.I unit
+.Pa /etc/slip.hosts .
+.El
+.Pp
+.Sy Notice Severity
+.Bl -tag -width Ds -compact
+.It Sy "attaching slip unit" Em unit Sy for Ar loginname
+.Tn SLIP
+unit
+.Em unit
 was successfully attached.
 was successfully attached.
-.SH "SEE ALSO"
-.BR slattach (8),
-.BR syslogd (8)
+.El
+.Sh SEE ALSO
+.Xr slattach 8 ,
+.Xr syslogd 8
+.Sh HISTORY
+The
+.Nm
+command
+.Bt