From cf37a1010f7c9aabce1d3598d5a62489eb01d48c Mon Sep 17 00:00:00 2001 From: cinap_lenrek Date: Sun, 31 Jul 2016 20:04:02 +0200 Subject: libauthsrv: export common readcons() routine and introduce PASSWDLEN constant drawterm, factotum, secstore and the auth commands all had ther own implementation of readcons. we want to have one common function for this to avoid the duplication, so putting that in libauthsrv. introduce PASSWDLEN which makes the use more explicit than ANAMELEN. --- sys/include/authsrv.h | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'sys/include/authsrv.h') diff --git a/sys/include/authsrv.h b/sys/include/authsrv.h index b423992c1..5df6f0973 100644 --- a/sys/include/authsrv.h +++ b/sys/include/authsrv.h @@ -26,6 +26,7 @@ enum NETCHLEN= 16, /* max network challenge length (used in AS protocol) */ CONFIGLEN= 14, SECRETLEN= 32, /* secret max size */ + PASSWDLEN= 28, /* password max size */ NONCELEN= 32, @@ -102,8 +103,8 @@ struct Authenticator struct Passwordreq { char num; - char old[ANAMELEN]; - char new[ANAMELEN]; + char old[PASSWDLEN]; + char new[PASSWDLEN]; char changesecret; char secret[SECRETLEN]; /* new secret */ }; @@ -187,6 +188,7 @@ struct Nvrsafe extern uchar nvcsum(void*, int); extern int readnvram(Nvrsafe*, int); +extern char* readcons(char*, char*, int); /* * call up auth server -- cgit v1.2.3