summaryrefslogtreecommitdiff
path: root/auth1.c
diff options
context:
space:
mode:
authorDamien Miller <djm@mindrot.org>2001-02-14 01:25:23 +1100
committerDamien Miller <djm@mindrot.org>2001-02-14 01:25:23 +1100
commit92ddb7d6f0d6a1942e27f75883d29dc0ea99223f (patch)
tree505a90486e59c722c4226a7c597b449f4b651529 /auth1.c
parent116b6bdda81d6647cc2742280c15b3f42ab3dd24 (diff)
- (djm) Split out and improve OSF SIA auth code. Patch from Chris Adams
<cmadams@hiwaay.net> with a little modification and KNF.
Diffstat (limited to 'auth1.c')
-rw-r--r--auth1.c18
1 files changed, 4 insertions, 14 deletions
diff --git a/auth1.c b/auth1.c
index a7693df59..31034262b 100644
--- a/auth1.c
+++ b/auth1.c
@@ -12,11 +12,6 @@
12#include "includes.h" 12#include "includes.h"
13RCSID("$OpenBSD: auth1.c,v 1.15 2001/02/07 22:35:45 markus Exp $"); 13RCSID("$OpenBSD: auth1.c,v 1.15 2001/02/07 22:35:45 markus Exp $");
14 14
15#ifdef HAVE_OSF_SIA
16# include <sia.h>
17# include <siad.h>
18#endif
19
20#include "xmalloc.h" 15#include "xmalloc.h"
21#include "rsa.h" 16#include "rsa.h"
22#include "ssh1.h" 17#include "ssh1.h"
@@ -36,10 +31,6 @@ extern char *forced_command;
36#ifdef WITH_AIXAUTHENTICATE 31#ifdef WITH_AIXAUTHENTICATE
37extern char *aixloginmsg; 32extern char *aixloginmsg;
38#endif /* WITH_AIXAUTHENTICATE */ 33#endif /* WITH_AIXAUTHENTICATE */
39#ifdef HAVE_OSF_SIA
40extern int saved_argc;
41extern char **saved_argv;
42#endif /* HAVE_OSF_SIA */
43 34
44/* 35/*
45 * convert ssh auth msg type into description 36 * convert ssh auth msg type into description
@@ -98,6 +89,8 @@ do_authloop(Authctxt *authctxt)
98#endif 89#endif
99#ifdef USE_PAM 90#ifdef USE_PAM
100 auth_pam_password(pw, "")) { 91 auth_pam_password(pw, "")) {
92#elif defined(HAVE_OSF_SIA)
93 0) {
101#else 94#else
102 auth_password(pw, "")) { 95 auth_password(pw, "")) {
103#endif 96#endif
@@ -265,11 +258,8 @@ do_authloop(Authctxt *authctxt)
265 authenticated = auth_pam_password(pw, password); 258 authenticated = auth_pam_password(pw, password);
266#elif defined(HAVE_OSF_SIA) 259#elif defined(HAVE_OSF_SIA)
267 /* Do SIA auth with password */ 260 /* Do SIA auth with password */
268 if (sia_validate_user(NULL, saved_argc, saved_argv, 261 authenticated = auth_sia_password(authctxt->user,
269 get_canonical_hostname(options.reverse_mapping_check), 262 password);
270 authctxt->user?authctxt->user:"NOUSER", NULL,
271 0, NULL, password) == SIASUCCESS)
272 authenticated = 1;
273#else /* !USE_PAM && !HAVE_OSF_SIA */ 263#else /* !USE_PAM && !HAVE_OSF_SIA */
274 /* Try authentication with the password. */ 264 /* Try authentication with the password. */
275 authenticated = auth_password(pw, password); 265 authenticated = auth_password(pw, password);