summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDamien Miller <djm@mindrot.org>2000-05-20 15:02:59 +1000
committerDamien Miller <djm@mindrot.org>2000-05-20 15:02:59 +1000
commitdfc83f42eba83d6dd127ce36fb33a490163c32de (patch)
tree8da6dce300467bc31e4fea7c4bda0c3181d24bbb
parentad1bc5f986ac31ea3f429d2c49d7f34bd78e32fc (diff)
- SunOS 4.x support from Todd C. Miller <Todd.Miller@courtesan.com>
-rw-r--r--ChangeLog1
-rw-r--r--acconfig.h3
-rw-r--r--auth-passwd.c20
-rw-r--r--bsd-login.c8
-rw-r--r--configure.in4
-rw-r--r--contrib/redhat/openssh.spec2
-rw-r--r--contrib/suse/openssh.spec2
7 files changed, 37 insertions, 3 deletions
diff --git a/ChangeLog b/ChangeLog
index 9f7f21c1..9ca51be2 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,6 +1,7 @@
20000520
- Xauth fix from Markus Friedl <markus.friedl@informatik.uni-erlangen.de>
- Don't touch utmp if USE_UTMPX defined
+ - SunOS 4.x support from Todd C. Miller <Todd.Miller@courtesan.com>
20000518
- Include Andre Lucas' fixprogs script. Forgot to "cvs add" it yesterday
diff --git a/acconfig.h b/acconfig.h
index b3e11fe9..308919f9 100644
--- a/acconfig.h
+++ b/acconfig.h
@@ -102,6 +102,9 @@
/* Define if you want have trusted HPUX */
#undef HAVE_HPUX_TRUSTED_SYSTEM_PW
+/* Define if you have getpwanam(3) [SunOS 4.x] */
+#undef HAVE_GETPWANAM
+
/* Defined if in_systm.h needs to be included with netinet/ip.h (HPUX - <sigh/>) */
#undef NEED_IN_SYSTM_H
diff --git a/auth-passwd.c b/auth-passwd.c
index e64e6568..b27c5bae 100644
--- a/auth-passwd.c
+++ b/auth-passwd.c
@@ -11,7 +11,7 @@
#ifndef USE_PAM
-RCSID("$Id: auth-passwd.c,v 1.19 2000/04/29 14:47:29 damien Exp $");
+RCSID("$Id: auth-passwd.c,v 1.20 2000/05/20 05:03:00 damien Exp $");
#include "packet.h"
#include "ssh.h"
@@ -28,6 +28,11 @@ RCSID("$Id: auth-passwd.c,v 1.19 2000/04/29 14:47:29 damien Exp $");
#ifdef HAVE_SHADOW_H
# include <shadow.h>
#endif
+#ifdef HAVE_GETPWANAM
+# include <sys/label.h>
+# include <sys/audit.h>
+# include <pwdadj.h>
+#endif
#if defined(HAVE_MD5_PASSWORDS) && !defined(HAVE_MD5_CRYPT)
# include "md5crypt.h"
#endif /* defined(HAVE_MD5_PASSWORDS) && !defined(HAVE_MD5_CRYPT) */
@@ -46,6 +51,9 @@ auth_password(struct passwd * pw, const char *password)
#ifdef HAVE_SHADOW_H
struct spwd *spw;
#endif
+#ifdef HAVE_GETPWANAM
+ struct passwd_adjunct *spw;
+#endif
#ifdef WITH_AIXAUTHENTICATE
char *authmsg;
char *loginmsg;
@@ -99,6 +107,16 @@ auth_password(struct passwd * pw, const char *password)
pw_password = spw->sp_pwdp;
}
#endif /* defined(HAVE_SHADOW_H) && !defined(DISABLE_SHADOW) */
+#if defined(HAVE_GETPWANAM) && !defined(DISABLE_SHADOW)
+ if (issecure() && (spw = getpwanam(pw->pw_name)) != NULL)
+ {
+ /* Check for users with no password. */
+ if (strcmp(password, "") == 0 && strcmp(spw->pwa_passwd, "") == 0)
+ return 1;
+
+ pw_password = spw->pwa_passwd;
+ }
+#endif /* defined(HAVE_GETPWANAM) && !defined(DISABLE_SHADOW) */
if (pw_password[0] != '\0')
salt = pw_password;
diff --git a/bsd-login.c b/bsd-login.c
index de49214c..ecd5e05a 100644
--- a/bsd-login.c
+++ b/bsd-login.c
@@ -60,6 +60,7 @@ static char *rcsid = "$OpenBSD: login.c,v 1.5 1998/07/13 02:11:12 millert Exp $"
#include <stdio.h>
#include <string.h>
+#ifdef USER_PROCESS
/*
* find first matching slot in utmp, or "-1" for none
*
@@ -95,6 +96,13 @@ struct utmp * utp;
#endif
return(-1);
}
+#else
+int find_tty_slot( utp )
+struct utmp * utp;
+{
+ return(ttyslot());
+}
+#endif
#if defined(HAVE_UTMPX_H) && defined(USE_UTMPX)
void
diff --git a/configure.in b/configure.in
index 43749046..60036c7b 100644
--- a/configure.in
+++ b/configure.in
@@ -110,6 +110,10 @@ case "$host" in
need_dash_r=1
AC_DEFINE(USE_UTMPX)
;;
+*-*-sunos4*)
+ CFLAGS="$CFLAGS -DSUNOS4"
+ AC_CHECK_FUNCS(getpwanam)
+ ;;
*-*-sysv*)
CFLAGS="$CFLAGS -I/usr/local/include"
LDFLAGS="$LDFLAGS -L/usr/local/lib"
diff --git a/contrib/redhat/openssh.spec b/contrib/redhat/openssh.spec
index 415719f1..bd628db4 100644
--- a/contrib/redhat/openssh.spec
+++ b/contrib/redhat/openssh.spec
@@ -1,5 +1,5 @@
# Version of OpenSSH
-%define oversion 2.1.0p1
+%define oversion 2.1.0p2
# Version of ssh-askpass
%define aversion 1.0
diff --git a/contrib/suse/openssh.spec b/contrib/suse/openssh.spec
index 69ab4bda..4c745ac8 100644
--- a/contrib/suse/openssh.spec
+++ b/contrib/suse/openssh.spec
@@ -1,6 +1,6 @@
Summary: OpenSSH, a free Secure Shell (SSH) implementation
Name: openssh
-Version: 2.1.0p1
+Version: 2.1.0p2
URL: http://www.openssh.com/
Release: 1
Source0: openssh-%{version}.tar.gz