5 #include "authcmdlib.h"
10 fprint(2, "usage: netkey\n");
15 main(int argc, char *argv[])
17 char buf[32], key[DESKEYLEN], *pass;
28 s = getenv("service");
29 if(s != nil && strcmp(s, "cpu") == 0){
30 fprint(2, "netkey must not be run on the cpu server\n");
35 pass = readcons("Password", nil, 1);
38 passtodeskey(key, pass);
39 memset(pass, 0, strlen(pass));
44 n = read(0, buf, sizeof buf - 1);
48 n = strtol(buf, 0, 10);
51 print("response: %s\n", buf);