Make the -a flag to opiekey(1) actually work as advertised.

Reviewed by:	ache, audit, security
MFC after:	1 week
This commit is contained in:
Joerg Wunsch 2002-01-09 13:36:26 +00:00
parent 127713f491
commit 32eb5fea1a
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=89135

View File

@ -119,7 +119,7 @@ static void getsecret FUNCTION((secret, promptextra, retype), char *secret AND c
}
memset(verify, 0, sizeof(verify));
}
if (!(flags & 2) && opiepasscheck(secret)) {
if (!(flags & 2) && !aflag && opiepasscheck(secret)) {
memset(secret, 0, sizeof(secret));
fprintf(stderr, "Secret pass phrases must be between %d and %d characters long.\n", OPIE_SECRET_MIN, OPIE_SECRET_MAX);
exit(1);