27 lines · 991 B · Text
RawDownload
= fauth : set up authentication on a file descriptor to a file server     include "sys.m";    sys := load Sys Sys->PATH;     fauth:  fn(fd: ref FD, aname: string): ref FD; Fauth provides a means for the current user  to  authenticateto  access resources available through the 9P connection rep‐resented by fd.  The return value is a file descriptor,  con‐ventionally  called afd, that is subsequently used to executethe authentication protocol for the server.  After successfulauthentication, afd may be passed as the second argument to asubsequent mount call (see sys-bind(2)), with the same aname,as a ticket-of-entry for the user. If  fauth  returns  nil,  the error case, that means the fileserver does not require authentication  for  the  connection,and afd should be nil in the call to mount. == see ALSOattach(5), security-auth(2) == diagnosticsThe system error string is set on error, including the servernot requiring authentication, and fauth returns nil.