]> git.lizzy.rs Git - plan9front.git/blob - sys/man/4/import
ip/dhcpd, ip/tftpd: change default for tftp homedir to /
[plan9front.git] / sys / man / 4 / import
1 .TH IMPORT 4
2 .SH NAME
3 import \- import a name space from a remote system
4 .SH SYNOPSIS
5 .B import
6 [
7 .I options
8 ]
9 .I system
10 .I file
11 [
12 .I mountpoint
13 ]
14 .PP
15 .B import
16 .B -B
17 [
18 .I options
19 ]
20 .I mountpoint
21 [
22 .I cmd
23 [
24 .I args ...
25 ]
26 ]
27 .SH DESCRIPTION
28 This tool is deprecated and has been replaced by
29 .I rimport
30 (see
31 .IR rcpu (1)).
32 .PP
33 .I Import
34 allows an arbitrary
35 .I file
36 on a remote
37 .I system
38 to be imported into the local name space.
39 Usually
40 .I file
41 is a directory, so the complete
42 file tree under the directory is made available.
43 .PP
44 A process is started on the
45 remote machine, with authority of the user of
46 .IR import ,
47 to perform work for the local machine using the
48 .IR exportfs (4)
49 service.
50 The default port used is TCP 17007.
51 If
52 .I mountpoint
53 is omitted
54 .I import
55 uses the name of the remote
56 .I file
57 as the local mount point.
58 .PP
59 The options are:
60 .TF "-s namexxx"
61 .PD
62 .TP
63 .B -a -b -c -C
64 Control the construction of union directories, as in
65 .I mount
66 and
67 .IR bind (1).
68 Only valid when 
69 .I file
70 is a directory.
71 .TP
72 .B -A
73 Skip the authentication protocol.
74 This is useful for connecting to foreign systems like Inferno.
75 .TP
76 .B -z
77 Bypass the initial protocol request for which remote tree to serve.
78 This is necessary when the remote 
79 .IR exportfs (4) 
80 is running with the 
81 .B -r 
82 or 
83 .B -S 
84 options which pre-select a file tree to serve. The exception is if both sides are
85 operating in the
86 .B -B
87 backwards mode.
88 .TP
89 .B -B
90 Run in ``backwards'' mode, described below.
91 .TP
92 .B -E \fIenc
93 Push an encryption protocol on its network connection.
94 The supported protocols are
95 .B clear
96 (the default, no protocol)
97 and
98 .BR ssl .
99 There are plans to make
100 .B tls
101 available.
102 .TP
103 .B -e '\fIenc hash\fR'
104 Specify the encryption and hash algorithms to use for
105 encrypting and authenticating the wire traffic
106 (see
107 .IR ssl (3)).
108 The defaults are
109 .B rc4_256
110 and
111 .BR sha1 .
112 .TP
113 .B -k \fIkeypattern
114 Use
115 .I keypattern
116 to select a key to authenticate to the remote side
117 (see
118 .IR auth (2)).
119 .TP
120 .B -p
121 Push the
122 .IR aan (8)
123 filter onto the connection to protect against
124 temporary network outages.
125 .TP
126 .B -n
127 Specify announce string for
128 .IR aan (8)
129 filter when run in ``backwards'' mode.
130 .TP
131 .B -s \fIname
132 Post the connection's mountable file descriptor as
133 .BI /srv/ name\fR.
134 .PD
135 .PP
136 The 
137 .B -B
138 option runs
139 .I import
140 in ``backwards'' mode.
141 In this mode,
142 .I import
143 runs a
144 .I p9any
145 authentication (as server) over its file descriptor 0
146 (expected to be an incoming network connection from
147 .B exportfs
148 .BR -B ),
149 mounts the connection onto
150 .IR mntpt ,
151 and optionally runs
152 .I cmd
153 .IR args .
154 .SH EXAMPLES
155 Assume a machine
156 .B kremvax
157 that has IP interfaces for the company intranet and the global
158 internet mounted on
159 .I /net
160 and
161 .I /net.alt
162 respectively.
163 Any machine inside the company can get telnet out to the global
164 internet using:
165 .IP
166 .EX
167 import -a kremvax /net.alt
168 telnet /net.alt/tcp!ucbvax
169 .EE
170 .PP
171 Suppose that the machine
172 .B moscvax
173 has access to a private file server containing public web pages
174 that need to be served by the less-trusted server
175 .BR webvax .
176 .B Webvax
177 runs the following listener 
178 (see
179 .IR listen (8))
180 on TCP port 999:
181 .IP
182 .EX
183 #!/bin/rc
184 import -B -s rowebfs /usr/web /bin/restarthttpd
185 .EE
186 .PP
187 When
188 .B moscvax
189 boots, it runs
190 .IP
191 .EX
192 exportfs -R -r /usr/web -B tcp!webvax!999
193 .EE
194 .PP
195 to serve a read-only copy of
196 .B /usr/web
197 to
198 .BR webvax .
199 When
200 .B webvax
201 gets the call, 
202 .B import
203 mounts the served tree onto its own
204 .B /usr/web
205 and then runs
206 .B /bin/restarthttpd
207 to restart
208 .IR httpd (8).
209 .SH SOURCE
210 .B /sys/src/cmd/import.c
211 .SH SEE ALSO
212 .IR rcpu (1),
213 .IR bind (1),
214 .IR ssl (3),
215 .IR exportfs (4),
216 .IR srv (4),
217 .IR aan (8),
218 .IR listen (8),
219 .B cs
220 in
221 .IR ndb (8)