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:
ache 1996-10-17 13:43:58 +00:00
parent b7ccf90470
commit 76fa87e93d

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