diff options
| author | Charles.Forsyth <devnull@localhost> | 2006-12-22 20:52:35 +0000 |
|---|---|---|
| committer | Charles.Forsyth <devnull@localhost> | 2006-12-22 20:52:35 +0000 |
| commit | 46439007cf417cbd9ac8049bb4122c890097a0fa (patch) | |
| tree | 6fdb25e5f3a2b6d5657eb23b35774b631d4d97e4 /module/factotum.m | |
| parent | 37da2899f40661e3e9631e497da8dc59b971cbd0 (diff) | |
20060303-partial
Diffstat (limited to 'module/factotum.m')
| -rw-r--r-- | module/factotum.m | 36 |
1 files changed, 36 insertions, 0 deletions
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); +}; |
