From 46439007cf417cbd9ac8049bb4122c890097a0fa Mon Sep 17 00:00:00 2001 From: "Charles.Forsyth" Date: Fri, 22 Dec 2006 20:52:35 +0000 Subject: 20060303-partial --- module/factotum.m | 36 ++++++++++++++++++++++++++++++++++++ 1 file changed, 36 insertions(+) create mode 100644 module/factotum.m (limited to 'module/factotum.m') diff --git a/module/factotum.m b/module/factotum.m new file mode 100644 index 00000000..6dd98d93 --- /dev/null +++ b/module/factotum.m @@ -0,0 +1,36 @@ +Factotum: module +{ + PATH: con "/dis/lib/factotum.dis"; + + # client interface to Plan 9 or Inferno factotum + + Authinfo: adt { + cuid: string; # caller id + suid: string; # server id + cap: string; # capability (only valid on server side) + secret: array of byte; + + unpack: fn(a: array of byte): (int, ref Authinfo); + read: fn(fd: ref Sys->FD): ref Authinfo; + }; + + mount: fn(fd: ref Sys->FD, mnt: string, flags: int, aname: string, keyspec: string): (int, ref Authinfo); + + # factotum interaction + AuthRpcMax: con 4096; + + init: fn(); + rpc: fn(fd: ref Sys->FD, verb: string, a: array of byte): (string, array of byte); + proxy: fn(afd: ref Sys->FD, facfd: ref Sys->FD, arg: string): ref Authinfo; + genproxy: fn( + readc: chan of (array of byte, chan of (int, string)), + writec: chan of (array of byte, chan of (int, string)), + donec: chan of (ref Authinfo, string), + afd: ref Sys->FD, + params: string); + + getuserpasswd: fn(keyspec: string): (string, string); + + dump: fn(a: array of byte): string; + setdebug: fn(i: int); +}; -- cgit v1.2.3