If 1) regular Unix passwords not permitted and 2) skey database

for this user not activated, there no correct password exist,
so don't bother ask for it and return "" immediately
This commit is contained in:
Andrey A. Chernov 1996-10-17 13:43:58 +00:00
parent b4c9d8eaf5
commit 590b04e005

View File

@ -11,7 +11,7 @@ int pwok;
{
static char buf[128];
struct skey skey;
char *pass;
char *pass = "";
char *username = pwd ? pwd->pw_name : "nope";
int sflag;
@ -20,8 +20,11 @@ int pwok;
if (!sflag)
printf("%s\n", buf);
if (!pwok)
if (!pwok) {
printf("(s/key required)\n");
if (sflag)
return (pass);
}
pass = getpass(prompt);