Add back -n flag to mount. [rsc] --rw-rw-r-- M 1118886 glenda sys 4009 Jan 23 19:19 sys/man/1/bind /n/sourcesdump/2006/0123/plan9/sys/man/1/bind:144,155 - /n/sourcesdump/2006/0124/plan9/sys/man/1/bind:144,161 .PD .PP .I Mount - takes an additional option, + takes two additional options. + The first, .B -k .IR keypattern , - to constrain the set of + constrains the set of .IR factotum (4) keys used for an authenticated mount. + The second, + .BR -n , + causes + .I mount + to skip authentication entirely. .PP The .I spec [rsc] --rw-rw-r-- M 1118886 glenda sys 1633 Jan 23 19:17 sys/src/cmd/mount.c /n/sourcesdump/2006/0123/plan9/sys/src/cmd/mount.c:30,36 - /n/sourcesdump/2006/0124/plan9/sys/src/cmd/mount.c:30,37 char *spec; ulong flag = 0; int qflag = 0; - int fd; + int noauth = 0; + int fd, rv; ARGBEGIN{ case 'a': /n/sourcesdump/2006/0123/plan9/sys/src/cmd/mount.c:48,53 - /n/sourcesdump/2006/0124/plan9/sys/src/cmd/mount.c:49,57 case 'k': keyspec = EARGF(usage()); break; + case 'n': + noauth = 1; + break; case 'q': qflag = 1; break; /n/sourcesdump/2006/0123/plan9/sys/src/cmd/mount.c:75,81 - /n/sourcesdump/2006/0124/plan9/sys/src/cmd/mount.c:79,89 } notify(catch); - if(amount0(fd, argv[1], flag, spec, keyspec) < 0){ + if(noauth) + rv = mount(fd, -1, argv[1], flag, spec); + else + rv = amount0(fd, argv[1], flag, spec, keyspec); + if(rv < 0){ if(qflag) exits(0); fprint(2, "%s: mount %s: %r\n", argv0, argv[1]); /n/sourcesdump/2006/0123/plan9/sys/src/cmd/mount.c:95,100 - /n/sourcesdump/2006/0124/plan9/sys/src/cmd/mount.c:103,108 void usage(void) { - fprint(2, "usage: mount [-a|-b] [-c] [-k keypattern] [-r] /srv/service dir [spec]\n"); + fprint(2, "usage: mount [-a|-b] [-cnrq] [-k keypattern] /srv/service dir [spec]\n"); exits("usage"); }