diff options
author | markm <markm@FreeBSD.org> | 2001-07-09 17:52:34 +0000 |
---|---|---|
committer | markm <markm@FreeBSD.org> | 2001-07-09 17:52:34 +0000 |
commit | 431a592722db6b9341bb9b1e6a409a39edee7797 (patch) | |
tree | dfb18c225b48df272ea8a82f1e00b304e618defc /lib/libskey/skey_getpass.c | |
parent | 92ae7a35b556bd6e54d8d69ba0079ec0004fe892 (diff) | |
download | FreeBSD-src-431a592722db6b9341bb9b1e6a409a39edee7797.zip FreeBSD-src-431a592722db6b9341bb9b1e6a409a39edee7797.tar.gz |
Axe S/Key. OPIE is the legal successor.
Diffstat (limited to 'lib/libskey/skey_getpass.c')
-rw-r--r-- | lib/libskey/skey_getpass.c | 37 |
1 files changed, 0 insertions, 37 deletions
diff --git a/lib/libskey/skey_getpass.c b/lib/libskey/skey_getpass.c deleted file mode 100644 index c3f5432..0000000 --- a/lib/libskey/skey_getpass.c +++ /dev/null @@ -1,37 +0,0 @@ -#include <unistd.h> -#include <stdio.h> -#include <skey.h> - -/* skey_getpass - read regular or s/key password */ - -char *skey_getpass(prompt, pwd, pwok) -const char *prompt; -struct passwd *pwd; -int pwok; -{ - static char buf[128]; - struct skey skey; - char *pass; - int sflag; - - /* Attempt an s/key challenge. */ - sflag = (pwd == NULL || skeyinfo(&skey, pwd->pw_name, buf)); - if (!sflag) { - printf("%s\n", buf); - if (!pwok) - printf("(s/key required)\n"); - } - - pass = getpass(prompt); - - /* Give S/Key users a chance to do it with echo on. */ - if (!sflag && !feof(stdin) && *pass == '\0') { - fputs(" (turning echo on)\n", stdout); - fputs(prompt, stdout); - fflush(stdout); - fgets(buf, sizeof(buf), stdin); - rip(buf); - return (buf); - } else - return (pass); -} |