summaryrefslogtreecommitdiff
path: root/module/factotum.m
diff options
context:
space:
mode:
authorCharles.Forsyth <devnull@localhost>2008-01-16 23:03:53 +0000
committerCharles.Forsyth <devnull@localhost>2008-01-16 23:03:53 +0000
commitf808c71c90d0de09f34309e6075120e1328eccc6 (patch)
tree774d5eebb6995ceaa3b3f6287585e199f34edd09 /module/factotum.m
parent8ea28ab820ed0fca4c8351622182074b37a3fa71 (diff)
20080116-2309
Diffstat (limited to 'module/factotum.m')
-rw-r--r--module/factotum.m14
1 files changed, 14 insertions, 0 deletions
diff --git a/module/factotum.m b/module/factotum.m
index 85165ebd..5d1df5f8 100644
--- a/module/factotum.m
+++ b/module/factotum.m
@@ -9,6 +9,7 @@ Factotum: module
suid: string; # server id
cap: string; # capability (only valid on server side)
secret: array of byte;
+ # TO DO: add attrs
unpack: fn(a: array of byte): (int, ref Authinfo);
read: fn(fd: ref Sys->FD): ref Authinfo;
@@ -20,6 +21,7 @@ Factotum: module
AuthRpcMax: con 4096;
init: fn();
+ open: fn(): ref Sys->FD;
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(
@@ -28,9 +30,21 @@ Factotum: module
donec: chan of (ref Authinfo, string),
afd: ref Sys->FD,
params: string);
+ rpcattrs: fn(afd: ref Sys->FD): list of ref Attr;
getuserpasswd: fn(keyspec: string): (string, string);
+ # challenge/response
+ Challenge: adt {
+ user: string;
+ chal: string;
+ afd: ref Sys->FD;
+ };
+
+ challenge: fn(keyspec: string): ref Challenge;
+ response: fn(c: ref Challenge, resp: string): ref Authinfo;
+ respond: fn(chal: string, keyspec: string): (string, string);
+
dump: fn(a: array of byte): string;
setdebug: fn(i: int);