9fans / plan9port

Plan 9 from User Space
https://9fans.github.io/plan9port/
Other
1.62k stars 320 forks source link

9pfuse doesn't try to be authenticated #531

Open karisawa opened 2 years ago

karisawa commented 2 years ago

9pfuse doesn't try to be authenticated. the result is: mounted at most as user none.

one of the fix is as shown below.

mbook$ diff -c a.h.orig a.h *** a.h.orig 2021-04-22 05:44:26.000000000 +0900 --- a.h 2021-09-24 08:45:50.000000000 +0900


* 8,13 ** --- 8,14 ----

include

include

include <9pclient.h>

mbook$ diff -c main.c.orig main.c mbook$ diff -c main.c.orig main.c *** main.c.orig 2021-04-22 05:44:26.000000000 +0900 --- main.c 2021-09-24 09:42:43.000000000 +0900


* 60,65 ** --- 60,66 ----

endif

int debug;

--- 92,98 ---- void usage(void) { ! fprint(2, "usage: 9pfuse [-D] [-n] [-A attrtimeout] [-a aname] address mtpt\n"); / -Kenar- / exit(1); }


* 118,123 ** --- 119,127 ---- case 'a': aname = EARGF(usage()); break;

--- 175,190 ---- if((fd = dial(netmkaddr(addr, "tcp", "564"), nil, nil, nil)) < 0) sysfatal("dial %s: %r", addr); proccreate(watchfd, (void)(uintptr)fd, STACK); !
! /
-Kenar- */ ! if(nflag){ ! if((fsys = fsmount(fd, spec)) == nil) ! sysfatal("fsmount: %r"); ! } ! else{ ! if ((fsys = fsamount(fd, spec)) == nil) ! sysfatal("fsamount: %r"); ! } fsysroot = fsroot(fsys); }

mbook$