summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ChangeLog4
-rw-r--r--acconfig.h6
-rw-r--r--auth-passwd.c34
-rw-r--r--configure.ac36
-rw-r--r--sshd.c11
5 files changed, 55 insertions, 36 deletions
diff --git a/ChangeLog b/ChangeLog
index c216c287b..20d4ef279 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,7 @@
120020425 120020425
2 - (stevesk) [defines.h] remove USE_TIMEVAL; unused 2 - (stevesk) [defines.h] remove USE_TIMEVAL; unused
3 - (stevesk) [acconfig.h auth-passwd.c configure.ac sshd.c] HP-UX 10.26
4 support. bug #184. most from dcole@keysoftsys.com.
3 5
420020424 620020424
5 - (djm) OpenBSD CVS Sync 7 - (djm) OpenBSD CVS Sync
@@ -506,4 +508,4 @@
506 - (stevesk) entropy.c: typo in debug message 508 - (stevesk) entropy.c: typo in debug message
507 - (djm) ssh-keygen -i needs seeded RNG; report from markus@ 509 - (djm) ssh-keygen -i needs seeded RNG; report from markus@
508 510
509$Id: ChangeLog,v 1.2084 2002/04/25 17:56:07 stevesk Exp $ 511$Id: ChangeLog,v 1.2085 2002/04/25 18:17:05 stevesk Exp $
diff --git a/acconfig.h b/acconfig.h
index c110c5e48..087ce4302 100644
--- a/acconfig.h
+++ b/acconfig.h
@@ -1,4 +1,4 @@
1/* $Id: acconfig.h,v 1.134 2002/04/23 20:45:56 stevesk Exp $ */ 1/* $Id: acconfig.h,v 1.135 2002/04/25 18:17:04 stevesk Exp $ */
2 2
3#ifndef _CONFIG_H 3#ifndef _CONFIG_H
4#define _CONFIG_H 4#define _CONFIG_H
@@ -15,8 +15,8 @@
15/* SCO workaround */ 15/* SCO workaround */
16#undef BROKEN_SYS_TERMIO_H 16#undef BROKEN_SYS_TERMIO_H
17 17
18/* Define if you have SCO protected password database */ 18/* Define if you have SecureWare-based protected password database */
19#undef HAVE_SCO_PROTECTED_PW 19#undef HAVE_SECUREWARE
20 20
21/* If your header files don't define LOGIN_PROGRAM, then use this (detected) */ 21/* If your header files don't define LOGIN_PROGRAM, then use this (detected) */
22/* from environment and PATH */ 22/* from environment and PATH */
diff --git a/auth-passwd.c b/auth-passwd.c
index 7f3073839..58c113649 100644
--- a/auth-passwd.c
+++ b/auth-passwd.c
@@ -55,11 +55,11 @@ RCSID("$OpenBSD: auth-passwd.c,v 1.24 2002/03/04 12:43:06 markus Exp $");
55# include <hpsecurity.h> 55# include <hpsecurity.h>
56# include <prot.h> 56# include <prot.h>
57# endif 57# endif
58# ifdef HAVE_SCO_PROTECTED_PW 58# ifdef HAVE_SECUREWARE
59# include <sys/security.h> 59# include <sys/security.h>
60# include <sys/audit.h> 60# include <sys/audit.h>
61# include <prot.h> 61# include <prot.h>
62# endif /* HAVE_SCO_PROTECTED_PW */ 62# endif /* HAVE_SECUREWARE */
63# if defined(HAVE_SHADOW_H) && !defined(DISABLE_SHADOW) 63# if defined(HAVE_SHADOW_H) && !defined(DISABLE_SHADOW)
64# include <shadow.h> 64# include <shadow.h>
65# endif 65# endif
@@ -102,12 +102,9 @@ auth_password(Authctxt *authctxt, const char *password)
102 char *encrypted_password; 102 char *encrypted_password;
103 char *pw_password; 103 char *pw_password;
104 char *salt; 104 char *salt;
105#ifdef __hpux 105#if defined(__hpux) || defined(HAVE_SECUREWARE)
106 struct pr_passwd *spw; 106 struct pr_passwd *spw;
107#endif 107#endif /* __hpux || HAVE_SECUREWARE */
108#ifdef HAVE_SCO_PROTECTED_PW
109 struct pr_passwd *spw;
110#endif /* HAVE_SCO_PROTECTED_PW */
111#if defined(HAVE_SHADOW_H) && !defined(DISABLE_SHADOW) 108#if defined(HAVE_SHADOW_H) && !defined(DISABLE_SHADOW)
112 struct spwd *spw; 109 struct spwd *spw;
113#endif 110#endif
@@ -183,21 +180,20 @@ auth_password(Authctxt *authctxt, const char *password)
183 pw_password = spw->sp_pwdp; 180 pw_password = spw->sp_pwdp;
184#endif /* defined(HAVE_SHADOW_H) && !defined(DISABLE_SHADOW) */ 181#endif /* defined(HAVE_SHADOW_H) && !defined(DISABLE_SHADOW) */
185 182
186#ifdef HAVE_SCO_PROTECTED_PW
187 spw = getprpwnam(pw->pw_name);
188 if (spw != NULL)
189 pw_password = spw->ufld.fd_encrypt;
190#endif /* HAVE_SCO_PROTECTED_PW */
191
192#if defined(HAVE_GETPWANAM) && !defined(DISABLE_SHADOW) 183#if defined(HAVE_GETPWANAM) && !defined(DISABLE_SHADOW)
193 if (issecure() && (spw = getpwanam(pw->pw_name)) != NULL) 184 if (issecure() && (spw = getpwanam(pw->pw_name)) != NULL)
194 pw_password = spw->pwa_passwd; 185 pw_password = spw->pwa_passwd;
195#endif /* defined(HAVE_GETPWANAM) && !defined(DISABLE_SHADOW) */ 186#endif /* defined(HAVE_GETPWANAM) && !defined(DISABLE_SHADOW) */
196 187
197#if defined(__hpux) 188#ifdef HAVE_SECUREWARE
189 if ((spw = getprpwnam(pw->pw_name)) != NULL)
190 pw_password = spw->ufld.fd_encrypt;
191#endif /* HAVE_SECUREWARE */
192
193#if defined(__hpux) && !defined(HAVE_SECUREWARE)
198 if (iscomsec() && (spw = getprpwnam(pw->pw_name)) != NULL) 194 if (iscomsec() && (spw = getprpwnam(pw->pw_name)) != NULL)
199 pw_password = spw->ufld.fd_encrypt; 195 pw_password = spw->ufld.fd_encrypt;
200#endif /* defined(__hpux) */ 196#endif /* defined(__hpux) && !defined(HAVE_SECUREWARE) */
201 197
202 /* Check for users with no password. */ 198 /* Check for users with no password. */
203 if ((password[0] == '\0') && (pw_password[0] == '\0')) 199 if ((password[0] == '\0') && (pw_password[0] == '\0'))
@@ -214,18 +210,18 @@ auth_password(Authctxt *authctxt, const char *password)
214 else 210 else
215 encrypted_password = crypt(password, salt); 211 encrypted_password = crypt(password, salt);
216#else /* HAVE_MD5_PASSWORDS */ 212#else /* HAVE_MD5_PASSWORDS */
217# ifdef __hpux 213# if defined(__hpux) && !defined(HAVE_SECUREWARE)
218 if (iscomsec()) 214 if (iscomsec())
219 encrypted_password = bigcrypt(password, salt); 215 encrypted_password = bigcrypt(password, salt);
220 else 216 else
221 encrypted_password = crypt(password, salt); 217 encrypted_password = crypt(password, salt);
222# else 218# else
223# ifdef HAVE_SCO_PROTECTED_PW 219# ifdef HAVE_SECUREWARE
224 encrypted_password = bigcrypt(password, salt); 220 encrypted_password = bigcrypt(password, salt);
225# else 221# else
226 encrypted_password = crypt(password, salt); 222 encrypted_password = crypt(password, salt);
227# endif /* HAVE_SCO_PROTECTED_PW */ 223# endif /* HAVE_SECUREWARE */
228# endif /* __hpux */ 224# endif /* __hpux && !defined(HAVE_SECUREWARE) */
229#endif /* HAVE_MD5_PASSWORDS */ 225#endif /* HAVE_MD5_PASSWORDS */
230 226
231 /* Authentication is accepted if the encrypted passwords are identical. */ 227 /* Authentication is accepted if the encrypted passwords are identical. */
diff --git a/configure.ac b/configure.ac
index 91a0a72f3..a092aaadb 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1,4 +1,4 @@
1# $Id: configure.ac,v 1.52 2002/04/23 20:45:56 stevesk Exp $ 1# $Id: configure.ac,v 1.53 2002/04/25 18:17:05 stevesk Exp $
2 2
3AC_INIT 3AC_INIT
4AC_CONFIG_SRCDIR([ssh.c]) 4AC_CONFIG_SRCDIR([ssh.c])
@@ -91,6 +91,22 @@ case "$host" in
91*-*-darwin*) 91*-*-darwin*)
92 AC_DEFINE(BROKEN_GETADDRINFO) 92 AC_DEFINE(BROKEN_GETADDRINFO)
93 ;; 93 ;;
94*-*-hpux10.26)
95 if test -z "$GCC"; then
96 CFLAGS="$CFLAGS -Ae"
97 fi
98 CPPFLAGS="$CPPFLAGS -D_HPUX_SOURCE -D_XOPEN_SOURCE -D_XOPEN_SOURCE_EXTENDED=1"
99 IPADDR_IN_DISPLAY=yes
100 AC_DEFINE(HAVE_SECUREWARE)
101 AC_DEFINE(USE_PIPES)
102 AC_DEFINE(LOGIN_NO_ENDOPT)
103 AC_DEFINE(LOGIN_NEEDS_UTMPX)
104 AC_DEFINE(DISABLE_SHADOW)
105 AC_DEFINE(DISABLE_UTMP)
106 AC_DEFINE(SPT_TYPE,SPT_PSTAT)
107 LIBS="$LIBS -lxnet -lsec -lsecpw"
108 disable_ptmx_check=yes
109 ;;
94*-*-hpux10*) 110*-*-hpux10*)
95 if test -z "$GCC"; then 111 if test -z "$GCC"; then
96 CFLAGS="$CFLAGS -Ae" 112 CFLAGS="$CFLAGS -Ae"
@@ -235,7 +251,7 @@ mips-sony-bsd|mips-sony-newsos4)
235 no_dev_ptmx=1 251 no_dev_ptmx=1
236 AC_DEFINE(BROKEN_SYS_TERMIO_H) 252 AC_DEFINE(BROKEN_SYS_TERMIO_H)
237 AC_DEFINE(USE_PIPES) 253 AC_DEFINE(USE_PIPES)
238 AC_DEFINE(HAVE_SCO_PROTECTED_PW) 254 AC_DEFINE(HAVE_SECUREWARE)
239 AC_DEFINE(DISABLE_SHADOW) 255 AC_DEFINE(DISABLE_SHADOW)
240 AC_DEFINE(BROKEN_SAVED_UIDS) 256 AC_DEFINE(BROKEN_SAVED_UIDS)
241 AC_CHECK_FUNCS(getluid setluid) 257 AC_CHECK_FUNCS(getluid setluid)
@@ -249,7 +265,7 @@ mips-sony-bsd|mips-sony-newsos4)
249 no_dev_ptmx=1 265 no_dev_ptmx=1
250 rsh_path="/usr/bin/rcmd" 266 rsh_path="/usr/bin/rcmd"
251 AC_DEFINE(USE_PIPES) 267 AC_DEFINE(USE_PIPES)
252 AC_DEFINE(HAVE_SCO_PROTECTED_PW) 268 AC_DEFINE(HAVE_SECUREWARE)
253 AC_DEFINE(DISABLE_SHADOW) 269 AC_DEFINE(DISABLE_SHADOW)
254 AC_CHECK_FUNCS(getluid setluid) 270 AC_CHECK_FUNCS(getluid setluid)
255 MANTYPE=man 271 MANTYPE=man
@@ -1926,12 +1942,14 @@ if test ! -z "$MAIL" ; then
1926fi 1942fi
1927 1943
1928if test -z "$no_dev_ptmx" ; then 1944if test -z "$no_dev_ptmx" ; then
1929 AC_CHECK_FILE("/dev/ptmx", 1945 if test "x$disable_ptmx_check" != "xyes" ; then
1930 [ 1946 AC_CHECK_FILE("/dev/ptmx",
1931 AC_DEFINE_UNQUOTED(HAVE_DEV_PTMX) 1947 [
1932 have_dev_ptmx=1 1948 AC_DEFINE_UNQUOTED(HAVE_DEV_PTMX)
1933 ] 1949 have_dev_ptmx=1
1934 ) 1950 ]
1951 )
1952 fi
1935fi 1953fi
1936AC_CHECK_FILE("/dev/ptc", 1954AC_CHECK_FILE("/dev/ptc",
1937 [ 1955 [
diff --git a/sshd.c b/sshd.c
index 8b1ebb462..f3e4d835e 100644
--- a/sshd.c
+++ b/sshd.c
@@ -48,6 +48,10 @@ RCSID("$OpenBSD: sshd.c,v 1.240 2002/04/23 22:16:29 djm Exp $");
48#include <openssl/bn.h> 48#include <openssl/bn.h>
49#include <openssl/md5.h> 49#include <openssl/md5.h>
50#include <openssl/rand.h> 50#include <openssl/rand.h>
51#ifdef HAVE_SECUREWARE
52#include <sys/security.h>
53#include <prot.h>
54#endif
51 55
52#include "ssh.h" 56#include "ssh.h"
53#include "ssh1.h" 57#include "ssh1.h"
@@ -786,6 +790,9 @@ main(int ac, char **av)
786 Key *key; 790 Key *key;
787 int ret, key_used = 0; 791 int ret, key_used = 0;
788 792
793#ifdef HAVE_SECUREWARE
794 (void)set_auth_parameters(ac, av);
795#endif
789 __progname = get_progname(av[0]); 796 __progname = get_progname(av[0]);
790 init_rng(); 797 init_rng();
791 798
@@ -998,10 +1005,6 @@ main(int ac, char **av)
998 if (test_flag) 1005 if (test_flag)
999 exit(0); 1006 exit(0);
1000 1007
1001#ifdef HAVE_SCO_PROTECTED_PW
1002 (void) set_auth_parameters(ac, av);
1003#endif
1004
1005 /* Initialize the log (it is reinitialized below in case we forked). */ 1008 /* Initialize the log (it is reinitialized below in case we forked). */
1006 if (debug_flag && !inetd_flag) 1009 if (debug_flag && !inetd_flag)
1007 log_stderr = 1; 1010 log_stderr = 1;