8 fprint(2, "usage: auth/challenge 'params'\n");
13 main(int argc, char **argv)
15 char buf[128], bufu[128];
29 if((afd = open("/mnt/factotum/rpc", ORDWR)) < 0)
30 sysfatal("open /mnt/factotum/rpc: %r");
32 rpc = auth_allocrpc(afd);
34 sysfatal("auth_allocrpc: %r");
36 if((c = auth_challenge("%s", argv[0])) == nil)
37 sysfatal("auth_challenge: %r");
39 print("challenge: %s\n", c->chal);
41 n = read(0, bufu, sizeof bufu);
48 n = read(0, buf, sizeof buf);
55 if((ai = auth_response(c)) == nil)
56 sysfatal("auth_response: %r");
58 print("%s %s\n", ai->cuid, ai->suid);