]>
Commit | Line | Data |
---|---|---|
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 | |
45 | is used to turn the terminal line on standard input into | |
46 | a Serial Line IP | |
47 | .Pq Tn SLIP | |
48 | link to a remote host. To do this, the program | |
49 | searches the file | |
50 | .Pa /etc/sliphome/slip.hosts | |
51 | for an entry matching | |
52 | .Ar loginname | |
53 | (which defaults to the current login name if omitted). | |
54 | If a matching entry is found, the line is configured appropriately | |
55 | for slip (8-bit transparent i/o) and converted to | |
56 | .Tn SLIP | |
57 | line | |
58 | discipline. Then a shell script is invoked to initialize the slip | |
59 | interface with the appropriate local and remote | |
60 | .Tn IP | |
61 | address, | |
62 | netmask, etc. | |
63 | .Pp | |
64 | The usual initialization script is | |
65 | .Pa /etc/sliphome/slip.login | |
66 | but, if particular hosts need special initialization, the file | |
67 | .Pa /etc/sliphome/slip.login. Ns Ar loginname | |
68 | will be executed instead if it exists. | |
69 | The script is invoked with the parameters | |
70 | .Bl -tag -width slipunit | |
71 | .It Em slipunit | |
72 | The unit number of the slip interface assigned to this line. E.g., | |
73 | .Sy 0 | |
74 | for | |
75 | .Sy sl0 . | |
76 | .It Em speed | |
77 | The speed of the line. | |
78 | .It Em args | |
79 | The arguments from the | |
80 | .Pa /etc/sliphome/slip.hosts | |
81 | entry, in order starting with | |
82 | .Ar loginname . | |
83 | .El | |
84 | .Pp | |
85 | Only the super-user may attach a network interface. The interface is | |
86 | automatically detached when the other end hangs up or the | |
87 | .Nm sliplogin | |
88 | process dies. If the kernel slip | |
89 | module has been configured for it, all routes through that interface will | |
90 | also disappear at the same time. If there is other processing a site | |
91 | would like done on hangup, the file | |
92 | .Pa /etc/sliphome/slip.logout | |
93 | or | |
94 | .Pa /etc/sliphome/slip.logout. Ns Ar loginname | |
95 | is executed if it exists. It is given the same arguments as the login script. | |
96 | .Ss Format of /etc/sliphome/slip.hosts | |
97 | Comments (lines starting with a `#') and blank lines are ignored. | |
98 | Other lines must start with a | |
99 | .Ar loginname | |
100 | but the remaining arguments can be whatever is appropriate for the | |
101 | .Pa slip.login | |
102 | file that will be executed for that name. | |
103 | Arguments are separated by white space and follow normal | |
104 | .Xr sh 1 | |
105 | quoting conventions (however, | |
106 | .Ar loginname | |
107 | cannot be quoted). | |
108 | Usually, lines have the form | |
109 | .Bd -literal -offset indent | |
110 | loginname local-address remote-address netmask opt-args | |
111 | .Ed | |
112 | .Pp | |
113 | where | |
114 | .Em local-address | |
115 | and | |
116 | .Em remote-address | |
117 | are the IP host names or addresses of the local and remote ends of the | |
118 | slip line and | |
119 | .Em netmask | |
120 | is the appropriate IP netmask. These arguments are passed | |
121 | directly to | |
122 | .Xr ifconfig 8 . | |
123 | .Em Opt-args | |
124 | are optional arguments used to configure the line. | |
125 | .Sh EXAMPLE | |
126 | The normal use of | |
127 | .Nm sliplogin | |
128 | is to create a | |
129 | .Pa /etc/passwd | |
130 | entry for each legal, remote slip site with | |
131 | .Nm sliplogin | |
132 | as the shell for that entry. E.g., | |
133 | .Bd -literal | |
134 | Sfoo: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 | |
139 | as | |
140 | .Em Shostname . ) | |
141 | Then an entry is added to | |
142 | .Pa slip.hosts | |
143 | that looks like: | |
144 | .Pp | |
145 | .Bd -literal -offset indent -compact | |
146 | Sfoo `hostname` foo netmask | |
147 | .Ed | |
148 | .Pp | |
149 | where | |
150 | .Em `hostname` | |
151 | will be evaluated by | |
152 | .Xr sh | |
153 | to the local host name and | |
154 | .Em netmask | |
155 | is the local host IP netmask. | |
156 | .Pp | |
157 | Note that | |
158 | .Nm sliplogin | |
159 | must be setuid to root and, while not a security hole, moral defectives | |
160 | can use it to place terminal lines in an unusable state and/or deny | |
161 | access to legitimate users of a remote slip line. To prevent this, | |
162 | a site can create a group, say | |
163 | .Em slip , | |
164 | that only the slip login accounts are put in then make sure that | |
165 | .Pa /usr/sbin/sliplogin | |
166 | is in group | |
167 | .Em slip | |
168 | and mode 4550 (setuid root, only group | |
169 | .Em slip | |
170 | can execute binary). | |
171 | .Sh DIAGNOSTICS | |
172 | .Nm Sliplogin | |
173 | logs various information to the system log daemon, | |
174 | .Xr syslogd 8 , | |
175 | with a facility code of | |
176 | .Em daemon . | |
177 | The 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 | |
182 | A | |
183 | .Dv TCGETS | |
184 | .Fn ioctl | |
185 | to get the line parameters failed. | |
186 | .Pp | |
187 | .It Sy ioctl (TCSETS): Em reason | |
188 | A | |
189 | .Dv TCSETS | |
190 | .Fn ioctl | |
191 | to set the line parameters failed. | |
192 | .Pp | |
193 | .It Sy /etc/sliphome/slip.hosts: Em reason | |
194 | The | |
195 | .Pa /etc/sliphome/slip.hosts | |
196 | file could not be opened. | |
197 | .Pp | |
198 | .It Sy access denied for Em user | |
199 | No entry for | |
200 | .Em user | |
201 | was 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 | |
209 | unit | |
210 | .Em unit | |
211 | was successfully attached. | |
212 | .El | |
213 | .Sh SEE ALSO | |
214 | .Xr slattach 8 , | |
215 | .Xr syslogd 8 | |
216 | .Sh HISTORY | |
217 | The | |
218 | .Nm | |
219 | command | |
220 | .Bt |