Add -A option.
[rsc] --rw-rw-r-- M 374841 glenda sys 3202 Nov 28 07:25 sys/man/4/import
/n/sourcesdump/2005/1128/plan9/sys/man/4/import:61,66 -
/n/sourcesdump/2005/1129/plan9/sys/man/4/import:61,70
.I file
is a directory.
.TP
+ .B -A
+ Skip the authentication protocol.
+ This is useful for connecting to foreign systems like Inferno.
+ .TP
.B -B
Run in ``backwards'' mode, described below.
.TP
[rsc] --rw-rw-r-- M 374841 glenda sys 7028 Nov 28 07:25 sys/src/cmd/import.c
/n/sourcesdump/2005/1128/plan9/sys/src/cmd/import.c:23,28 -
/n/sourcesdump/2005/1129/plan9/sys/src/cmd/import.c:23,29
char *aan = "/bin/aan";
AuthInfo *ai;
int debug;
+ int doauth = 1;
int connect(char*, char*, int);
int passive(void);
/n/sourcesdump/2005/1128/plan9/sys/src/cmd/import.c:74,79 -
/n/sourcesdump/2005/1129/plan9/sys/src/cmd/import.c:75,83
oldserver = 0;
mntflags = MREPL;
ARGBEGIN{
+ case 'A':
+ doauth = 0;
+ break;
case 'a':
mntflags = MAFTER;
break;
/n/sourcesdump/2005/1128/plan9/sys/src/cmd/import.c:264,278 -
/n/sourcesdump/2005/1129/plan9/sys/src/cmd/import.c:268,284
if((fd = dial(na, 0, dir, 0)) < 0)
sysfatal("can't dial %s: %r", system);
- if(oldserver)
- authp = "p9sk2";
- else
- authp = "p9any";
+ if(doauth){
+ if(oldserver)
+ authp = "p9sk2";
+ else
+ authp = "p9any";
+
+ ai = auth_proxy(fd, auth_getkey, "proto=%q role=client %s", authp, keyspec);
+ if(ai == nil)
+ sysfatal("%r: %s", system);
+ }
- ai = auth_proxy(fd, auth_getkey, "proto=%q role=client %s", authp, keyspec);
- if(ai == nil)
- sysfatal("%r: %s", system);
-
n = write(fd, tree, strlen(tree));
if(n < 0)
sysfatal("can't write tree: %r");
/n/sourcesdump/2005/1128/plan9/sys/src/cmd/import.c:295,300 -
/n/sourcesdump/2005/1129/plan9/sys/src/cmd/import.c:301,310
{
int fd;
+ /*
+ * Ignore doauth==0 on purpose. Is it useful here?
+ */
+
ai = auth_proxy(0, auth_getkey, "proto=p9any role=server");
if(ai == nil)
sysfatal("auth_proxy: %r");
/n/sourcesdump/2005/1128/plan9/sys/src/cmd/import.c:314,320 -
/n/sourcesdump/2005/1129/plan9/sys/src/cmd/import.c:324,330
void
usage(void)
{
- fprint(2, "usage: import [-abcC] [-E clear|ssl|tls] [-e 'crypt auth'|clear] [-k keypattern] [-p] host remotefs [mountpoint]\n");
+ fprint(2, "usage: import [-abcC] [-A] [-E clear|ssl|tls] [-e 'crypt auth'|clear] [-k keypattern] [-p] host remotefs [mountpoint]\n");
exits("usage");
}
|