Skip the authentication protocol.
This is useful for connecting to foreign systems like Inferno.
.TP
+.B -z
+Bypass the initial protocol request for which remote tree to serve.
+This is necessary when the remote
+.IR exportfs (4)
+is running with the
+.B -r
+or
+.B -S
+options which pre-select a file tree to serve. The exception is if both sides are
+operating in the
+.B -B
+backwards mode.
+.TP
.B -B
Run in ``backwards'' mode, described below.
.TP
int debug;
int doauth = 1;
int timedout;
+int skiptree;
int connect(char*, char*, int);
int passive(void);
case 'B':
backwards = 1;
break;
+ case 'z':
+ skiptree = 1;
+ break;
default:
usage();
}ARGEND;
sysfatal("%r: %s", system);
}
- procsetname("writing tree name %s", tree);
- n = write(fd, tree, strlen(tree));
- if(n < 0)
- sysfatal("can't write tree: %r");
-
- strcpy(buf, "can't read tree");
-
- procsetname("awaiting OK for %s", tree);
- n = read(fd, buf, sizeof buf - 1);
- if(n!=2 || buf[0]!='O' || buf[1]!='K'){
- if (timedout)
- sysfatal("timed out connecting to %s", na);
- buf[sizeof buf - 1] = '\0';
- sysfatal("bad remote tree: %s", buf);
+ if(!skiptree){
+ procsetname("writing tree name %s", tree);
+ n = write(fd, tree, strlen(tree));
+ if(n < 0)
+ sysfatal("can't write tree: %r");
+
+ strcpy(buf, "can't read tree");
+
+ procsetname("awaiting OK for %s", tree);
+ n = read(fd, buf, sizeof buf - 1);
+ if(n!=2 || buf[0]!='O' || buf[1]!='K'){
+ if (timedout)
+ sysfatal("timed out connecting to %s", na);
+ buf[sizeof buf - 1] = '\0';
+ sysfatal("bad remote tree: %s", buf);
+ }
}
if(oldserver)
usage(void)
{
fprint(2, "usage: import [-abcC] [-A] [-E clear|ssl|tls] "
-"[-e 'crypt auth'|clear] [-k keypattern] [-p] host remotefs [mountpoint]\n");
+"[-e 'crypt auth'|clear] [-k keypattern] [-p] [-z] host remotefs [mountpoint]\n");
exits("usage");
}