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 a3d4ab60e..f20953a86 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 $");
56#include "uidswap.h" 56#include "uidswap.h"
57#include "auth-options.h" 57#include "auth-options.h"
58 58
59#ifdef HAVE_OSF_SIA
60# include <sia.h>
61# include <siad.h>
62#endif
63
59/* import */ 64/* import */
60extern ServerOptions options; 65extern ServerOptions options;
61extern unsigned char *session_id2; 66extern unsigned char *session_id2;
@@ -244,10 +249,20 @@ input_userauth_request(int type, int plen)
244int 249int
245ssh2_auth_none(struct passwd *pw) 250ssh2_auth_none(struct passwd *pw)
246{ 251{
252#ifdef HAVE_OSF_SIA
253 extern int saved_argc;
254 extern char **saved_argv;
255#endif
256
247 packet_done(); 257 packet_done();
258
248#ifdef USE_PAM 259#ifdef USE_PAM
249 return auth_pam_password(pw, ""); 260 return auth_pam_password(pw, "");
250#else /* USE_PAM */ 261#elif defined(HAVE_OSF_SIA)
262 return(sia_validate_user(NULL, saved_argc, saved_argv,
263 get_canonical_hostname(), pw->pw_name, NULL, 0, NULL,
264 "") == SIASUCCESS);
265#else /* !HAVE_OSF_SIA && !USE_PAM */
251 return auth_password(pw, ""); 266 return auth_password(pw, "");
252#endif /* USE_PAM */ 267#endif /* USE_PAM */
253} 268}
@@ -258,6 +273,10 @@ ssh2_auth_password(struct passwd *pw)
258 int authenticated = 0; 273 int authenticated = 0;
259 int change; 274 int change;
260 unsigned int len; 275 unsigned int len;
276#ifdef HAVE_OSF_SIA
277 extern int saved_argc;
278 extern char **saved_argv;
279#endif
261 change = packet_get_char(); 280 change = packet_get_char();
262 if (change) 281 if (change)
263 log("password change not supported"); 282 log("password change not supported");
@@ -266,7 +285,11 @@ ssh2_auth_password(struct passwd *pw)
266 if (options.password_authentication && 285 if (options.password_authentication &&
267#ifdef USE_PAM 286#ifdef USE_PAM
268 auth_pam_password(pw, password) == 1) 287 auth_pam_password(pw, password) == 1)
269#else /* USE_PAM */ 288#elif defined(HAVE_OSF_SIA)
289 sia_validate_user(NULL, saved_argc, saved_argv,
290 get_canonical_hostname(), pw->pw_name, NULL, 0,
291 NULL, password) == SIASUCCESS)
292#else /* !USE_PAM && !HAVE_OSF_SIA */
270 auth_password(pw, password) == 1) 293 auth_password(pw, password) == 1)
271#endif /* USE_PAM */ 294#endif /* USE_PAM */
272 authenticated = 1; 295 authenticated = 1;