From 0f8ec41b0ae522b73085fa1662461e6351ba7e54 Mon Sep 17 00:00:00 2001 From: rsc Date: Sun, 13 Feb 2005 05:58:45 +0000 Subject: moving to auth --- src/cmd/secstore/secacct.c | 35 ----------------------------------- 1 file changed, 35 deletions(-) delete mode 100644 src/cmd/secstore/secacct.c (limited to 'src/cmd/secstore/secacct.c') diff --git a/src/cmd/secstore/secacct.c b/src/cmd/secstore/secacct.c deleted file mode 100644 index 4390129a..00000000 --- a/src/cmd/secstore/secacct.c +++ /dev/null @@ -1,35 +0,0 @@ -#include -#include -#include - -int verbose = 1; -static char testmess[] = "__secstore\tPAK\nC=%s\nm=0\n"; - -void -main(int argc, char **argv) -{ - int n, m, fd; - uchar buf[500]; - - if(argc != 2) - exits("usage: secacct userid"); - - n = snprint((char*)buf, sizeof buf, testmess, argv[1]); - hnputs(buf, 0x8000+n-2); - - fd = dial("tcp!ruble.cs.bell-labs.com!5356", 0, 0, 0); - if(fd < 0) - exits("cannot dial ruble"); - if(write(fd, buf, n) != n || readn(fd, buf, 2) != 2) - exits("cannot exchange first round"); - n = ((buf[0]&0x7f)<<8) + buf[1]; - if(n+1 > sizeof buf) - exits("implausibly large count"); - m = readn(fd, buf, n); - close(fd); - if(m != n) - fprint(2,"short read from secstore\n"); - buf[m] = 0; - print("%s\n", (char*)buf); - exits(0); -} -- cgit v1.2.3