mirror of
https://github.com/opnsense/src.git
synced 2026-06-08 16:22:46 -04:00
Put skey support to ftpd
Reviewed by: Submitted by: guido
This commit is contained in:
parent
726040de0e
commit
d007582cfe
1 changed files with 23 additions and 0 deletions
23
libexec/ftpd/skey-stuff.c
Normal file
23
libexec/ftpd/skey-stuff.c
Normal file
|
|
@ -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);
|
||||
}
|
||||
Loading…
Reference in a new issue