summaryrefslogtreecommitdiff
path: root/auth2.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 /auth2.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 'auth2.c')
-rw-r--r--auth2.c27
1 files changed, 25 insertions, 2 deletions
diff --git a/auth2.c b/auth2.c
index a3d4ab60..f20953a8 100644
--- a/auth2.c
+++ b/auth2.c
@@ -56,6 +56,11 @@ RCSID("$OpenBSD: auth2.c,v 1.11 2000/06/19 00:50:11 markus Exp $");
#include "uidswap.h"
#include "auth-options.h"
+#ifdef HAVE_OSF_SIA
+# include <sia.h>
+# include <siad.h>
+#endif
+
/* import */
extern ServerOptions options;
extern unsigned char *session_id2;
@@ -244,10 +249,20 @@ input_userauth_request(int type, int plen)
int
ssh2_auth_none(struct passwd *pw)
{
+#ifdef HAVE_OSF_SIA
+ extern int saved_argc;
+ extern char **saved_argv;
+#endif
+
packet_done();
+
#ifdef USE_PAM
return auth_pam_password(pw, "");
-#else /* USE_PAM */
+#elif defined(HAVE_OSF_SIA)
+ return(sia_validate_user(NULL, saved_argc, saved_argv,
+ get_canonical_hostname(), pw->pw_name, NULL, 0, NULL,
+ "") == SIASUCCESS);
+#else /* !HAVE_OSF_SIA && !USE_PAM */
return auth_password(pw, "");
#endif /* USE_PAM */
}
@@ -258,6 +273,10 @@ ssh2_auth_password(struct passwd *pw)
int authenticated = 0;
int change;
unsigned int len;
+#ifdef HAVE_OSF_SIA
+ extern int saved_argc;
+ extern char **saved_argv;
+#endif
change = packet_get_char();
if (change)
log("password change not supported");
@@ -266,7 +285,11 @@ ssh2_auth_password(struct passwd *pw)
if (options.password_authentication &&
#ifdef USE_PAM
auth_pam_password(pw, password) == 1)
-#else /* USE_PAM */
+#elif defined(HAVE_OSF_SIA)
+ sia_validate_user(NULL, saved_argc, saved_argv,
+ get_canonical_hostname(), pw->pw_name, NULL, 0,
+ NULL, password) == SIASUCCESS)
+#else /* !USE_PAM && !HAVE_OSF_SIA */
auth_password(pw, password) == 1)
#endif /* USE_PAM */
authenticated = 1;