summaryrefslogtreecommitdiffstats
path: root/libexec
diff options
context:
space:
mode:
authorguido <guido@FreeBSD.org>1994-08-21 19:09:58 +0000
committerguido <guido@FreeBSD.org>1994-08-21 19:09:58 +0000
commitc1db1c5a23c7066d9417ed808b01f452874ff7ed (patch)
tree880820dd016860e275c12738cc8b107ebb92db79 /libexec
parenta368a750a1b9175d41004b8ae490144c96a3a474 (diff)
downloadFreeBSD-src-c1db1c5a23c7066d9417ed808b01f452874ff7ed.zip
FreeBSD-src-c1db1c5a23c7066d9417ed808b01f452874ff7ed.tar.gz
Put skey support to ftpd
Reviewed by: Submitted by: guido
Diffstat (limited to 'libexec')
-rw-r--r--libexec/ftpd/skey-stuff.c23
1 files changed, 23 insertions, 0 deletions
diff --git a/libexec/ftpd/skey-stuff.c b/libexec/ftpd/skey-stuff.c
new file mode 100644
index 0000000..fdec650
--- /dev/null
+++ b/libexec/ftpd/skey-stuff.c
@@ -0,0 +1,23 @@
+/* Author: Wietse Venema, Eindhoven University of Technology. */
+
+#include <stdio.h>
+#include <pwd.h>
+
+#include <skey.h>
+
+/* 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);
+}
OpenPOWER on IntegriCloud