blob: 19fd55e3d3611037e2010c899dc716e369c46d63 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
|
/* Author: Wietse Venema, Eindhoven University of Technology.
*
* $FreeBSD$
*/
#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 == NULL || skeychallenge(&skey, pwd->pw_name, buf))
sprintf(buf, "Password required for %s.", name);
else if (!pwok)
strcat(buf, " (s/key required)");
return (buf);
}
|