summaryrefslogtreecommitdiff
path: root/auth1.c
diff options
context:
space:
mode:
Diffstat (limited to 'auth1.c')
-rw-r--r--auth1.c19
1 files changed, 18 insertions, 1 deletions
diff --git a/auth1.c b/auth1.c
index 3e7efcb2a..0d440e521 100644
--- a/auth1.c
+++ b/auth1.c
@@ -18,6 +18,11 @@ RCSID("$OpenBSD: auth1.c,v 1.2 2000/04/29 18:11:52 markus Exp $");
18#include "auth.h" 18#include "auth.h"
19#include "session.h" 19#include "session.h"
20 20
21#ifdef HAVE_OSF_SIA
22# include <sia.h>
23# include <siad.h>
24#endif
25
21/* import */ 26/* import */
22extern ServerOptions options; 27extern ServerOptions options;
23extern char *forced_command; 28extern char *forced_command;
@@ -141,6 +146,10 @@ do_authloop(struct passwd * pw)
141 unsigned int ulen; 146 unsigned int ulen;
142 int type = 0; 147 int type = 0;
143 void (*authlog) (const char *fmt,...) = verbose; 148 void (*authlog) (const char *fmt,...) = verbose;
149#ifdef HAVE_OSF_SIA
150 extern int saved_argc;
151 extern char **saved_argv;
152#endif /* HAVE_OSF_SIA */
144 153
145 /* Indicate that authentication is needed. */ 154 /* Indicate that authentication is needed. */
146 packet_start(SSH_SMSG_FAILURE); 155 packet_start(SSH_SMSG_FAILURE);
@@ -299,7 +308,15 @@ do_authloop(struct passwd * pw)
299#ifdef USE_PAM 308#ifdef USE_PAM
300 /* Do PAM auth with password */ 309 /* Do PAM auth with password */
301 authenticated = auth_pam_password(pw, password); 310 authenticated = auth_pam_password(pw, password);
302#else /* USE_PAM */ 311#elif defined(HAVE_OSF_SIA)
312 /* Do SIA auth with password */
313 host = get_canonical_hostname();
314 if (sia_validate_user(NULL, saved_argc, saved_argv,
315 get_canonical_hostname(), pw->pw_name, NULL, 0,
316 NULL, password) == SIASUCCESS) {
317 authenticated = 1;
318 }
319#else /* !USE_PAM && !HAVE_OSF_SIA */
303 /* Try authentication with the password. */ 320 /* Try authentication with the password. */
304 authenticated = auth_password(pw, password); 321 authenticated = auth_password(pw, password);
305#endif /* USE_PAM */ 322#endif /* USE_PAM */