diff options
| author | Andrey A. Chernov <ache@FreeBSD.org> | 1996-10-18 16:52:33 +0000 |
|---|---|---|
| committer | Andrey A. Chernov <ache@FreeBSD.org> | 1996-10-18 16:52:33 +0000 |
| commit | 9fe1a5aaabc665e2a846998209872472e92c6d20 (patch) | |
| tree | 8a28663b34810fbd22724f757503c9ab8c68ae5b /lib/libskey | |
| parent | d0ec898db5fb2c8c205eed83be18d23f54da6ad4 (diff) | |
Notes
Diffstat (limited to 'lib/libskey')
| -rw-r--r-- | lib/libskey/skey_getpass.c | 14 |
1 files changed, 5 insertions, 9 deletions
diff --git a/lib/libskey/skey_getpass.c b/lib/libskey/skey_getpass.c index 51b564baa8793..9878a5e2d9026 100644 --- a/lib/libskey/skey_getpass.c +++ b/lib/libskey/skey_getpass.c @@ -11,19 +11,15 @@ int pwok; { static char buf[128]; struct skey skey; - char *pass = ""; - char *username = pwd ? pwd->pw_name : ":"; + char *pass; int sflag; /* Attempt an s/key challenge. */ - sflag = skeyinfo(&skey, username, buf); - if (!sflag) + sflag = (pwd == NULL || skeyinfo(&skey, pwd->pw_name, buf)); + if (!sflag) { printf("%s\n", buf); - - if (!pwok) { - printf("(s/key required)\n"); - if (sflag) - return (pass); + if (!pwok) + printf("(s/key required)\n"); } pass = getpass(prompt); |
