diff options
| author | rsc <devnull@localhost> | 2005-02-13 05:58:45 +0000 |
|---|---|---|
| committer | rsc <devnull@localhost> | 2005-02-13 05:58:45 +0000 |
| commit | 0f8ec41b0ae522b73085fa1662461e6351ba7e54 (patch) | |
| tree | 2d54cfd8208bdd903273ccc7df889677cf7fe8d5 /src/cmd/factotum/plan9.c | |
| parent | 7637c81af02c49ef508b946dfdec39f757a658d4 (diff) | |
| download | plan9port-0f8ec41b0ae522b73085fa1662461e6351ba7e54.tar.gz plan9port-0f8ec41b0ae522b73085fa1662461e6351ba7e54.zip | |
moving to auth
Diffstat (limited to 'src/cmd/factotum/plan9.c')
| -rw-r--r-- | src/cmd/factotum/plan9.c | 45 |
1 files changed, 0 insertions, 45 deletions
diff --git a/src/cmd/factotum/plan9.c b/src/cmd/factotum/plan9.c deleted file mode 100644 index 0b6bb601..00000000 --- a/src/cmd/factotum/plan9.c +++ /dev/null @@ -1,45 +0,0 @@ -#include "std.h" -#include "dat.h" -#include <bio.h> - -int -memrandom(void *p, int n) -{ - uchar *cp; - - for(cp = (uchar*)p; n > 0; n--) - *cp++ = fastrand(); - return 0; -} - -Attr* -addcap(Attr *a, char *from, Ticket *t) -{ - return addattr(a, "cuid=%q suid=%q cap=''", t->cuid, t->suid); -} - -int -_authdial(char *net, char *authdom) -{ - return authdial(net, authdom); -} - -Key* -plan9authkey(Attr *a) -{ - char *dom; - Key *k; - - /* - * The only important part of a is dom. - * We don't care, for example, about user name. - */ - dom = strfindattr(a, "dom"); - if(dom) - k = keylookup("proto=p9sk1 role=server user? dom=%q", dom); - else - k = keylookup("proto=p9sk1 role=server user? dom?"); - if(k == nil) - werrstr("could not find plan 9 auth key dom %q", dom); - return k; -} |
