ref: a158c4bdb94c908face64f187aa4402a2b17bd81
parent: 814de7f6b3911dcaec1f76d8ad69ae6c35b21b7c
author: cinap_lenrek <[email protected]>
date: Wed May 4 12:35:25 EDT 2016
remove support for import command in namespace files
--- a/sys/man/6/namespace
+++ b/sys/man/6/namespace
@@ -45,14 +45,6 @@
on
.IR old .
.TP
-.BR import \ [ -abc ]\ \fIhost\fR\ "[\fIremotepath\fR\^\^] \fImountpoint\fR
-Import
-.I remotepath
-from machine
-.I server
-and attach it to
-.IR mountpoint .
-.TP
.BI cd \ dir
Change the working directory to
.IR dir .
@@ -81,14 +73,11 @@
.PD
.PP
The options for
-.IR bind ,
-.IR mount ,
+.I bind
and
-.I import
+.I mount
are interpreted as in
-.IR bind (1)
-and
-.IR import (4).
+.IR bind (1).
.SH "SEE ALSO"
.IR bind (1),
.IR namespace (4),
--- a/sys/src/libauth/newns.c
+++ b/sys/src/libauth/newns.c
@@ -16,7 +16,6 @@
static int splitargs(char*, char*[], char*, int);
static int nsfile(char*, Biobuf *, AuthRpc *);
static int nsop(char*, int, char*[], AuthRpc*);
-static int callexport(char*, char*);
static int catch(void*, char*);
int newnsdebug;
@@ -202,13 +201,6 @@
fprint(2, "%s: mount: %s %s %s: %r\n", fn, argv[0], argv[1], argv[2]);
}
close(fd);
- }else if(strcmp(argv0, "import") == 0){
- fd = callexport(argv[0], argv[1]);
- if(argc == 2)
- famount(fd, rpc, argv[1], flags, "");
- else if(argc == 3)
- famount(fd, rpc, argv[2], flags, "");
- close(fd);
}else if(strcmp(argv0, "cd") == 0 && argc == 1){
if(chdir(argv[0]) == 0 && *argv[0] == '/')
cdroot = 1;
@@ -223,27 +215,6 @@
{
USED(x);
return strncmp(m, wocp, strlen(wocp)) == 0;
-}
-
-static int
-callexport(char *sys, char *tree)
-{
- char *na, buf[3];
- int fd;
- AuthInfo *ai;
-
- na = netmkaddr(sys, 0, "exportfs");
- if((fd = dial(na, 0, 0, 0)) < 0)
- return -1;
- if((ai = auth_proxy(fd, auth_getkey, "proto=p9any role=client")) == nil
- || write(fd, tree, strlen(tree)) < 0
- || read(fd, buf, 3) != 2 || buf[0]!='O' || buf[1]!= 'K'){
- close(fd);
- auth_freeAI(ai);
- return -1;
- }
- auth_freeAI(ai);
- return fd;
}
static char*