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