From d007582cfe39fd3ced95818bcdaa5f37ee294297 Mon Sep 17 00:00:00 2001 From: Guido van Rooij Date: Sun, 21 Aug 1994 19:09:58 +0000 Subject: [PATCH] Put skey support to ftpd Reviewed by: Submitted by: guido --- libexec/ftpd/skey-stuff.c | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) create mode 100644 libexec/ftpd/skey-stuff.c diff --git a/libexec/ftpd/skey-stuff.c b/libexec/ftpd/skey-stuff.c new file mode 100644 index 000000000000..fdec650bcef0 --- /dev/null +++ b/libexec/ftpd/skey-stuff.c @@ -0,0 +1,23 @@ +/* Author: Wietse Venema, Eindhoven University of Technology. */ + +#include +#include + +#include + +/* skey_challenge - additional password prompt stuff */ + +char *skey_challenge(name, pwd, pwok) +char *name; +struct passwd *pwd; +int pwok; +{ + static char buf[128]; + struct skey skey; + + /* Display s/key challenge where appropriate. */ + + if (pwd == 0 || skeychallenge(&skey, pwd->pw_name, buf) != 0) + sprintf(buf, "Password required for %s.", name); + return (buf); +}