from brian. update the 9p manual page to cover authentication. Reference: /n/atom/patch/applied2013/9pauth Date: Fri Jul 12 21:39:15 CES 2013 Signed-off-by: quanstro@quanstro.net --- /sys/man/2/9p Fri Jul 12 21:35:27 2013 +++ /sys/man/2/9p Fri Jul 12 21:35:27 2013 @@ -85,6 +85,15 @@ .PP .nf .ft L +void auth9p(Req *r) +int authattach(Req *r) +void authdestroy(Fie *fid) +void authread(Req *r) +void authwrite(Req *r) +.fi +.PP +.nf +.ft L .ta \w'\fLvoid* 'u void* emalloc9p(ulong n) void* erealloc9p(void *v, ulong n) @@ -369,6 +378,57 @@ .I ARGBEGIN (see .IR arg (2)). +.IP +If the +.I auth +member of the +.B Srv +structure is set to +.IR auth9p , +the server will prepare for a +.I p9any +authentication in conjunction with +.IR factotum (4). +When using +.IR auth9p , +the +.IR read , +.IR write , +and +.I destroy +service functions should call +.IR authread , +.IR authwrite , +and +.IR authdestroy , +respectively when operating on a +.B Fid +where +.IB r -> fid -> qid.type +has the +.B QTAUTH +flag set. +In all three cases the +.I auth +function makes the +.I respond +call. +Finally, before carrying out the normal attach operation, the +.I attach +service function should call +.IR authattach . +If there is an authentication error, then +.I authattach +will return +.B -1 +and will have called +.I respond +with an appropriate error. +Otherwise, the +.I attach +service function should continue and call +.I respond +when it's done. .TP .I Attach The