]> andersk Git - openssh.git/blobdiff - auth1.c
- (djm) Replace ut_name with ut_user. Patch from Jim Watt
[openssh.git] / auth1.c
diff --git a/auth1.c b/auth1.c
index 3e7efcb2a64b1a58b6638a30727537a0b5a46d12..d8f2652e36d0db01c039379c013bdb61666db324 100644 (file)
--- a/auth1.c
+++ b/auth1.c
@@ -18,9 +18,18 @@ 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;
+#ifdef HAVE_OSF_SIA
+extern int saved_argc;
+extern char **saved_argv;
+#endif /* HAVE_OSF_SIA */
 
 /*
  * convert ssh auth msg type into description
@@ -299,7 +308,14 @@ 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 */
+                       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 */
@@ -488,7 +504,11 @@ do_authentication()
 #endif /* KRB4 */
 #ifdef USE_PAM
            auth_pam_password(pw, "")) {
-#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, 
+           "") == SIASUCCESS)) {
+#else /* !HAVE_OSF_SIA && !USE_PAM */
            auth_password(pw, "")) {
 #endif /* USE_PAM */
                /* Authentication with empty password succeeded. */
This page took 0.204598 seconds and 4 git commands to generate.