From b8c656e744a0a9110e5eb0ea5a6587efb181b20a Mon Sep 17 00:00:00 2001 From: Damien Miller Date: Wed, 28 Jun 2000 15:22:41 +1000 Subject: - (djm) Added patch from Chris Adams to add OSF SIA support. Enable using "USE_SIA=1 ./configure [options]" --- auth1.c | 19 ++++++++++++++++++- 1 file changed, 18 insertions(+), 1 deletion(-) (limited to 'auth1.c') 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 $"); #include "auth.h" #include "session.h" +#ifdef HAVE_OSF_SIA +# include +# include +#endif + /* import */ extern ServerOptions options; extern char *forced_command; @@ -141,6 +146,10 @@ do_authloop(struct passwd * pw) unsigned int ulen; int type = 0; void (*authlog) (const char *fmt,...) = verbose; +#ifdef HAVE_OSF_SIA + extern int saved_argc; + extern char **saved_argv; +#endif /* HAVE_OSF_SIA */ /* Indicate that authentication is needed. */ packet_start(SSH_SMSG_FAILURE); @@ -299,7 +308,15 @@ do_authloop(struct passwd * pw) #ifdef USE_PAM /* Do PAM auth with password */ authenticated = auth_pam_password(pw, password); -#else /* USE_PAM */ +#elif defined(HAVE_OSF_SIA) + /* Do SIA auth with password */ + host = get_canonical_hostname(); + if (sia_validate_user(NULL, saved_argc, saved_argv, + get_canonical_hostname(), pw->pw_name, NULL, 0, + NULL, password) == SIASUCCESS) { + authenticated = 1; + } +#else /* !USE_PAM && !HAVE_OSF_SIA */ /* Try authentication with the password. */ authenticated = auth_password(pw, password); #endif /* USE_PAM */ -- cgit v1.2.3