diff options
author | ache <ache@FreeBSD.org> | 1996-10-17 13:43:58 +0000 |
---|---|---|
committer | ache <ache@FreeBSD.org> | 1996-10-17 13:43:58 +0000 |
commit | 76fa87e93d6457909de5988f81f282edcfb599d8 (patch) | |
tree | 0221c1a5c0f254d960d7d0538ba01d8d66dbead8 /lib/libskey | |
parent | b7ccf90470b74606b5177cea50b780686e114a0f (diff) | |
download | FreeBSD-src-76fa87e93d6457909de5988f81f282edcfb599d8.zip FreeBSD-src-76fa87e93d6457909de5988f81f282edcfb599d8.tar.gz |
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
Diffstat (limited to 'lib/libskey')
-rw-r--r-- | lib/libskey/skey_getpass.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/lib/libskey/skey_getpass.c b/lib/libskey/skey_getpass.c index e8d50d3..cc2fcc3 100644 --- a/lib/libskey/skey_getpass.c +++ b/lib/libskey/skey_getpass.c @@ -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); |