diff options
author | Damien Miller <djm@mindrot.org> | 2000-06-28 15:22:41 +1000 |
---|---|---|
committer | Damien Miller <djm@mindrot.org> | 2000-06-28 15:22:41 +1000 |
commit | b8c656e744a0a9110e5eb0ea5a6587efb181b20a (patch) | |
tree | 090ecdf170d3a8e3b184a1607a1807fac26d663a /auth1.c | |
parent | 262ff170fbd9d2071a43e97656a6bd705dda7e4c (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.c | 19 |
1 files changed, 18 insertions, 1 deletions
@@ -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 */ |
22 | extern ServerOptions options; | 27 | extern ServerOptions options; |
23 | extern char *forced_command; | 28 | extern 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 */ |