diff options
author | rsc <devnull@localhost> | 2005-02-13 05:59:29 +0000 |
---|---|---|
committer | rsc <devnull@localhost> | 2005-02-13 05:59:29 +0000 |
commit | 6e527fbc4d8f404a7eec934e5c9efaaaa92ffdff (patch) | |
tree | 4d9ed63c88e5a8dd8a4d5bd3582e7d5e6a24065f /src/cmd/auth/secstore/secchk.c | |
parent | 0f8ec41b0ae522b73085fa1662461e6351ba7e54 (diff) | |
download | plan9port-6e527fbc4d8f404a7eec934e5c9efaaaa92ffdff.tar.gz plan9port-6e527fbc4d8f404a7eec934e5c9efaaaa92ffdff.tar.bz2 plan9port-6e527fbc4d8f404a7eec934e5c9efaaaa92ffdff.zip |
new auth
Diffstat (limited to 'src/cmd/auth/secstore/secchk.c')
-rw-r--r-- | src/cmd/auth/secstore/secchk.c | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/src/cmd/auth/secstore/secchk.c b/src/cmd/auth/secstore/secchk.c new file mode 100644 index 00000000..59e26d51 --- /dev/null +++ b/src/cmd/auth/secstore/secchk.c @@ -0,0 +1,28 @@ +#include <u.h> +#include <libc.h> +#include <bio.h> +#include <ndb.h> + +extern char* secureidcheck(char *user, char *response); +Ndb *db; + +void +main(int argc, char **argv) +{ + Ndb *db2; + + if(argc!=2){ + fprint(2,"usage %s pinsecurid\n", argv[0]); + exits("usage"); + } + db = ndbopen("/lib/ndb/auth"); + if(db == 0) + syslog(0, "secstore", "no /lib/ndb/auth"); + db2 = ndbopen(0); + if(db2 == 0) + syslog(0, "secstore", "no /lib/ndb/local"); + db = ndbcat(db, db2); + print("user=%s\n", getenv("user")); + print("%s\n", secureidcheck(getenv("user"), argv[1])); + exits(0); +} |