]> git.saurik.com Git - apple/network_cmds.git/blame - sliplogin.tproj/sliplogin.8
network_cmds-85.tar.gz
[apple/network_cmds.git] / sliplogin.tproj / sliplogin.8
CommitLineData
b7080c8e
A
1.\" Copyright (c) 1990, 1991, 1993
2.\" The Regents of the University of California. All rights reserved.
3.\"
4.\" Redistribution and use in source and binary forms, with or without
5.\" modification, are permitted provided that the following conditions
6.\" are met:
7.\" 1. Redistributions of source code must retain the above copyright
8.\" notice, this list of conditions and the following disclaimer.
9.\" 2. Redistributions in binary form must reproduce the above copyright
10.\" notice, this list of conditions and the following disclaimer in the
11.\" documentation and/or other materials provided with the distribution.
12.\" 3. All advertising materials mentioning features or use of this software
13.\" must display the following acknowledgement:
14.\" This product includes software developed by the University of
15.\" California, Berkeley and its contributors.
16.\" 4. Neither the name of the University nor the names of its contributors
17.\" may be used to endorse or promote products derived from this software
18.\" without specific prior written permission.
19.\"
20.\" THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
21.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
22.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
23.\" ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
24.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
25.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
26.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
27.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
28.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
29.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
30.\" SUCH DAMAGE.
31.\"
32.\" @(#)sliplogin.8 8.2 (Berkeley) 1/5/94
33.\"
34.Dd January 5, 1994
35.Dt SLIPLOGIN 8
36.Os
37.Sh NAME
38.Nm sliplogin
39.Nd attach a serial line network interface
40.Sh SYNOPSIS
41.Nm sliplogin
42.Op Ar loginname
43.Sh DESCRIPTION
44.Nm Sliplogin
45is used to turn the terminal line on standard input into
46a Serial Line IP
47.Pq Tn SLIP
48link to a remote host. To do this, the program
49searches the file
50.Pa /etc/sliphome/slip.hosts
51for an entry matching
52.Ar loginname
53(which defaults to the current login name if omitted).
54If a matching entry is found, the line is configured appropriately
55for slip (8-bit transparent i/o) and converted to
56.Tn SLIP
57line
58discipline. Then a shell script is invoked to initialize the slip
59interface with the appropriate local and remote
60.Tn IP
61address,
62netmask, etc.
63.Pp
64The usual initialization script is
65.Pa /etc/sliphome/slip.login
66but, if particular hosts need special initialization, the file
67.Pa /etc/sliphome/slip.login. Ns Ar loginname
68will be executed instead if it exists.
69The script is invoked with the parameters
70.Bl -tag -width slipunit
71.It Em slipunit
72The unit number of the slip interface assigned to this line. E.g.,
73.Sy 0
74for
75.Sy sl0 .
76.It Em speed
77The speed of the line.
78.It Em args
79The arguments from the
80.Pa /etc/sliphome/slip.hosts
81entry, in order starting with
82.Ar loginname .
83.El
84.Pp
85Only the super-user may attach a network interface. The interface is
86automatically detached when the other end hangs up or the
87.Nm sliplogin
88process dies. If the kernel slip
89module has been configured for it, all routes through that interface will
90also disappear at the same time. If there is other processing a site
91would like done on hangup, the file
92.Pa /etc/sliphome/slip.logout
93or
94.Pa /etc/sliphome/slip.logout. Ns Ar loginname
95is executed if it exists. It is given the same arguments as the login script.
96.Ss Format of /etc/sliphome/slip.hosts
97Comments (lines starting with a `#') and blank lines are ignored.
98Other lines must start with a
99.Ar loginname
100but the remaining arguments can be whatever is appropriate for the
101.Pa slip.login
102file that will be executed for that name.
103Arguments are separated by white space and follow normal
104.Xr sh 1
105quoting conventions (however,
106.Ar loginname
107cannot be quoted).
108Usually, lines have the form
109.Bd -literal -offset indent
110loginname local-address remote-address netmask opt-args
111.Ed
112.Pp
113where
114.Em local-address
115and
116.Em remote-address
117are the IP host names or addresses of the local and remote ends of the
118slip line and
119.Em netmask
120is the appropriate IP netmask. These arguments are passed
121directly to
122.Xr ifconfig 8 .
123.Em Opt-args
124are optional arguments used to configure the line.
125.Sh EXAMPLE
126The normal use of
127.Nm sliplogin
128is to create a
129.Pa /etc/passwd
130entry for each legal, remote slip site with
131.Nm sliplogin
132as the shell for that entry. E.g.,
133.Bd -literal
134Sfoo:ikhuy6:2010:1:slip line to foo:/tmp:/usr/sbin/sliplogin
135.Ed
136.Pp
137(Our convention is to name the account used by remote host
138.Ar hostname
139as
140.Em Shostname . )
141Then an entry is added to
142.Pa slip.hosts
143that looks like:
144.Pp
145.Bd -literal -offset indent -compact
146Sfoo `hostname` foo netmask
147.Ed
148.Pp
149where
150.Em `hostname`
151will be evaluated by
152.Xr sh
153to the local host name and
154.Em netmask
155is the local host IP netmask.
156.Pp
157Note that
158.Nm sliplogin
159must be setuid to root and, while not a security hole, moral defectives
160can use it to place terminal lines in an unusable state and/or deny
161access to legitimate users of a remote slip line. To prevent this,
162a site can create a group, say
163.Em slip ,
164that only the slip login accounts are put in then make sure that
165.Pa /usr/sbin/sliplogin
166is in group
167.Em slip
168and mode 4550 (setuid root, only group
169.Em slip
170can execute binary).
171.Sh DIAGNOSTICS
172.Nm Sliplogin
173logs various information to the system log daemon,
174.Xr syslogd 8 ,
175with a facility code of
176.Em daemon .
177The messages are listed here, grouped by severity level.
178.Pp
179.Sy Error Severity
180.Bl -tag -width Ds -compact
181.It Sy ioctl (TCGETS): Em reason
182A
183.Dv TCGETS
184.Fn ioctl
185to get the line parameters failed.
186.Pp
187.It Sy ioctl (TCSETS): Em reason
188A
189.Dv TCSETS
190.Fn ioctl
191to set the line parameters failed.
192.Pp
193.It Sy /etc/sliphome/slip.hosts: Em reason
194The
195.Pa /etc/sliphome/slip.hosts
196file could not be opened.
197.Pp
198.It Sy access denied for Em user
199No entry for
200.Em user
201was found in
202.Pa /etc/sliphome/slip.hosts .
203.El
204.Pp
205.Sy Notice Severity
206.Bl -tag -width Ds -compact
207.It Sy "attaching slip unit" Em unit Sy for Ar loginname
208.Tn SLIP
209unit
210.Em unit
211was successfully attached.
212.El
213.Sh SEE ALSO
214.Xr slattach 8 ,
215.Xr syslogd 8
216.Sh HISTORY
217The
218.Nm
219command
220.Bt