summaryrefslogtreecommitdiffstats
path: root/auth1.c
diff options
context:
space:
mode:
authorDamien Miller <djm@mindrot.org>2000-06-28 15:22:41 +1000
committerDamien Miller <djm@mindrot.org>2000-06-28 15:22:41 +1000
commitb8c656e744a0a9110e5eb0ea5a6587efb181b20a (patch)
tree090ecdf170d3a8e3b184a1607a1807fac26d663a /auth1.c
parent262ff170fbd9d2071a43e97656a6bd705dda7e4c (diff)
- (djm) Added patch from Chris Adams <cmadams@hiwaay.net> to add OSF SIA
support. Enable using "USE_SIA=1 ./configure [options]"
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 3e7efcb2..0d440e52 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 <sia.h>
+# include <siad.h>
+#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 */