summaryrefslogtreecommitdiff
path: root/sys/include/authsrv.h
diff options
context:
space:
mode:
authorcinap_lenrek <cinap_lenrek@felloff.net>2016-07-31 20:04:02 +0200
committercinap_lenrek <cinap_lenrek@felloff.net>2016-07-31 20:04:02 +0200
commitcf37a1010f7c9aabce1d3598d5a62489eb01d48c (patch)
treeab850b791e22ff243c0fa37dec7d757f0cba8cfb /sys/include/authsrv.h
parentd91c4e407d4fa98101ade0bcdc524c1f6864b2e5 (diff)
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.
Diffstat (limited to 'sys/include/authsrv.h')
-rw-r--r--sys/include/authsrv.h6
1 files changed, 4 insertions, 2 deletions
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