summaryrefslogtreecommitdiffstats
path: root/crypto/openssh/auth-skey.c
diff options
context:
space:
mode:
authordes <des@FreeBSD.org>2002-06-23 16:09:08 +0000
committerdes <des@FreeBSD.org>2002-06-23 16:09:08 +0000
commitfa8aa6dfe7e9aaab9f8fa1e3290e7242fc12d83d (patch)
treecc93abce4a81ab84afa26d861b756d5c77818afa /crypto/openssh/auth-skey.c
parente9f3540c66a76052e51a348bdd05a068d0855d3d (diff)
downloadFreeBSD-src-fa8aa6dfe7e9aaab9f8fa1e3290e7242fc12d83d.zip
FreeBSD-src-fa8aa6dfe7e9aaab9f8fa1e3290e7242fc12d83d.tar.gz
Resolve conflicts. Known issues:
- sshd fails to set TERM correctly. - privilege separation may break PAM and is currently turned off. - man pages have not yet been updated I will have these issues resolved, and privilege separation turned on by default, in time for DP2. Sponsored by: DARPA, NAI Labs
Diffstat (limited to 'crypto/openssh/auth-skey.c')
-rw-r--r--crypto/openssh/auth-skey.c25
1 files changed, 16 insertions, 9 deletions
diff --git a/crypto/openssh/auth-skey.c b/crypto/openssh/auth-skey.c
index b538b39..18243ee 100644
--- a/crypto/openssh/auth-skey.c
+++ b/crypto/openssh/auth-skey.c
@@ -22,7 +22,7 @@
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
#include "includes.h"
-RCSID("$OpenBSD: auth-skey.c,v 1.16 2002/01/12 13:10:29 markus Exp $");
+RCSID("$OpenBSD: auth-skey.c,v 1.19 2002/06/19 00:27:55 deraadt Exp $");
RCSID("$FreeBSD$");
#ifdef SKEY
@@ -31,6 +31,7 @@ RCSID("$FreeBSD$");
#include "xmalloc.h"
#include "auth.h"
+#include "monitor_wrap.h"
static void *
skey_init_ctx(Authctxt *authctxt)
@@ -38,9 +39,7 @@ skey_init_ctx(Authctxt *authctxt)
return authctxt;
}
-#define PROMPT "\nOPIE Password: "
-
-static int
+int
skey_query(void *ctx, char **name, char **infotxt,
u_int* numprompts, char ***prompts, u_int **echo_on)
{
@@ -54,23 +53,23 @@ skey_query(void *ctx, char **name, char **infotxt,
if (opiechallenge(&opie, authctxt->user, challenge) == -1)
return -1;
- *name = xstrdup("");
- *infotxt = xstrdup("");
+ *name = xstrdup("");
+ *infotxt = xstrdup("");
*numprompts = 1;
*prompts = xmalloc(*numprompts * sizeof(char*));
*echo_on = xmalloc(*numprompts * sizeof(u_int));
(*echo_on)[0] = 0;
- len = strlen(challenge) + strlen(PROMPT) + 1;
+ len = strlen(challenge) + strlen(SKEY_PROMPT) + 1;
p = xmalloc(len);
strlcpy(p, challenge, len);
- strlcat(p, PROMPT, len);
+ strlcat(p, SKEY_PROMPT, len);
(*prompts)[0] = p;
return 0;
}
-static int
+int
skey_respond(void *ctx, u_int numresponses, char **responses)
{
Authctxt *authctxt = ctx;
@@ -96,4 +95,12 @@ KbdintDevice skey_device = {
skey_respond,
skey_free_ctx
};
+
+KbdintDevice mm_skey_device = {
+ "skey",
+ skey_init_ctx,
+ mm_skey_query,
+ mm_skey_respond,
+ skey_free_ctx
+};
#endif /* SKEY */
OpenPOWER on IntegriCloud