diff options
author | cinap_lenrek <cinap_lenrek@felloff.net> | 2015-08-21 18:43:25 +0200 |
---|---|---|
committer | cinap_lenrek <cinap_lenrek@felloff.net> | 2015-08-21 18:43:25 +0200 |
commit | 0ce50ebc5750c15e30c6f2d5ba23a0dd329c6c47 (patch) | |
tree | 632820e8f512fb36342f62fcfb92c517089e6e3c /sys/src/cmd/cwfs/auth.c | |
parent | 501774b0968d59994d5012fab62fa8221d8b7923 (diff) |
cwfs: remove 9p1 support
Diffstat (limited to 'sys/src/cmd/cwfs/auth.c')
-rw-r--r-- | sys/src/cmd/cwfs/auth.c | 68 |
1 files changed, 0 insertions, 68 deletions
diff --git a/sys/src/cmd/cwfs/auth.c b/sys/src/cmd/cwfs/auth.c index 5f088a17e..6a16fff64 100644 --- a/sys/src/cmd/cwfs/auth.c +++ b/sys/src/cmd/cwfs/auth.c @@ -1,48 +1,13 @@ #include "all.h" #include "io.h" -#include <authsrv.h> #include <auth.h> -Nvrsafe nvr; - -static int gotnvr; /* flag: nvr contains nvram; it could be bad */ - char* nvrgetconfig(void) { return conf.confdev; } -/* - * we shouldn't be writing nvram any more. - * the secstore/config field is now just secstore key. - */ - -int -nvrcheck(void) -{ - uchar csum; - - if (readnvram(&nvr, NVread) < 0) { - fprint(2, "nvrcheck: can't read nvram\n"); - return 1; - } else - gotnvr = 1; - - if(chatty) - print("nvr read\n"); - - csum = nvcsum(nvr.machkey, sizeof nvr.machkey); - if(csum != nvr.machsum) { - fprint(2, "\n\n ** NVR key checksum is incorrect **\n"); - fprint(2, " ** set password to allow attaches **\n\n"); - memset(nvr.machkey, 0, sizeof nvr.machkey); - return 1; - } - - return 0; -} - int nvrsetconfig(char* word) { @@ -51,39 +16,6 @@ nvrsetconfig(char* word) return 0; } -int -conslock(void) -{ - char *ln; - Authkey nkey1; - static char zeroes[DESKEYLEN]; - - if(memcmp(nvr.machkey, zeroes, DESKEYLEN) == 0) { - print("no password set\n"); - return 0; - } - - for(;;) { - print("%s password:", service); - /* could turn off echo here */ - - if ((ln = Brdline(&bin, '\n')) == nil) - return 0; - ln[Blinelen(&bin)-1] = '\0'; - - /* could turn on echo here */ - passtokey(&nkey1, ln); - if(memcmp(nkey1.des, nvr.machkey, DESKEYLEN) == 0) { - prdate(); - break; - } - - print("Bad password\n"); - delay(1000); - } - return 1; -} - static char *keyspec = "proto=p9any role=server"; void* |