shithub: riscv

Download patch

ref: 167ea748f8b20a5940108ef5b23132310213e77e
parent: 78c45541eb66a661f4e45c2f86bb5ac37de2408b
author: cinap_lenrek <cinap_lenrek@felloff.net>
date: Thu Aug 20 16:44:17 EDT 2015

cwfs: adjust for new libauthsrv changes

--- a/sys/src/cmd/cwfs/auth.c
+++ b/sys/src/cmd/cwfs/auth.c
@@ -55,7 +55,7 @@
 conslock(void)
 {
 	char *ln;
-	char nkey1[DESKEYLEN];
+	Authkey nkey1;
 	static char zeroes[DESKEYLEN];
 
 	if(memcmp(nvr.machkey, zeroes, DESKEYLEN) == 0) {
@@ -72,9 +72,8 @@
 		ln[Blinelen(&bin)-1] = '\0';
 
 		/* could turn on echo here */
-		memset(nkey1, 0, DESKEYLEN);
-		passtokey(nkey1, ln);
-		if(memcmp(nkey1, nvr.machkey, DESKEYLEN) == 0) {
+		passtokey(&nkey1, ln);
+		if(memcmp(nkey1.des, nvr.machkey, DESKEYLEN) == 0) {
 			prdate();
 			break;
 		}