pkgsrc-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[pkgsrc/trunk]: pkgsrc/security/openssh Add handling of utmpx/wtmpx on NetBSD...
details: https://anonhg.NetBSD.org/pkgsrc/rev/d48b6cb011a5
branches: trunk
changeset: 474300:d48b6cb011a5
user: markd <markd%pkgsrc.org@localhost>
date: Tue Apr 27 12:30:23 2004 +0000
description:
Add handling of utmpx/wtmpx on NetBSD-current.
Bump PKGREVISION.
diffstat:
security/openssh/Makefile | 8 ++++-
security/openssh/distinfo | 8 +++--
security/openssh/patches/patch-aa | 52 ++++++++++++++++++++++++++++++++++++--
security/openssh/patches/patch-ab | 46 ++++++++++++++++++++++++++++++++--
security/openssh/patches/patch-ac | 29 +++++++++++++++++++++
security/openssh/patches/patch-ad | 22 ++++++++++++++++
6 files changed, 154 insertions(+), 11 deletions(-)
diffs (228 lines):
diff -r a3f8e235747c -r d48b6cb011a5 security/openssh/Makefile
--- a/security/openssh/Makefile Tue Apr 27 12:26:31 2004 +0000
+++ b/security/openssh/Makefile Tue Apr 27 12:30:23 2004 +0000
@@ -1,8 +1,8 @@
-# $NetBSD: Makefile,v 1.128 2004/04/27 12:26:31 markd Exp $
+# $NetBSD: Makefile,v 1.129 2004/04/27 12:30:23 markd Exp $
DISTNAME= openssh-3.8p1
PKGNAME= openssh-3.8.1
-PKGREVISION= 1
+PKGREVISION= 2
SVR4_PKGNAME= ossh
CATEGORIES= security
MASTER_SITES= ftp://ftp.openssh.com/pub/OpenBSD/OpenSSH/portable/ \
@@ -99,6 +99,10 @@
LDFLAGS+= -lkrb -lcom_err -lroken -ldes -lcrypto
.endif
+.if ${OPSYS} == "NetBSD" && exists(/usr/include/utmpx.h)
+# if we have utmpx et al do not try to use login()
+CONFIGURE_ARGS+= --disable-libutil
+.endif
.if ${OPSYS} == "SunOS" && (${OS_VERSION} == "5.8" || ${OS_VERSION} == "5.9")
CONFIGURE_ARGS+= --disable-utmp --disable-wtmp
.endif
diff -r a3f8e235747c -r d48b6cb011a5 security/openssh/distinfo
--- a/security/openssh/distinfo Tue Apr 27 12:26:31 2004 +0000
+++ b/security/openssh/distinfo Tue Apr 27 12:30:23 2004 +0000
@@ -1,7 +1,9 @@
-$NetBSD: distinfo,v 1.30 2004/03/12 19:24:47 wiz Exp $
+$NetBSD: distinfo,v 1.31 2004/04/27 12:30:23 markd Exp $
SHA1 (openssh-3.8p1.tar.gz) = b30c4ec4945f4e8b1691470495c15caf522fbc16
Size (openssh-3.8p1.tar.gz) = 826588 bytes
-SHA1 (patch-aa) = bd1a2cb9baa415a3c0ec52646d22378985fe7967
-SHA1 (patch-ab) = 858157467277e224cfd8ecd94a8faaabf63851b1
+SHA1 (patch-aa) = 7cc830cfe60afa021c1ac69e27e566c259994f61
+SHA1 (patch-ab) = 9893f9aa4cbd022328358f0d93ba1cd27ee5e320
+SHA1 (patch-ac) = ae77aa9a6bdbb69231d24ed6b01e6cefa13b38ee
+SHA1 (patch-ad) = 644e2fe1f2967fe97c51a7cc61cad557bc42ed6a
SHA1 (patch-ah) = 8f1fa190e4fb115bb5311b4ccd839a649e1b09e5
diff -r a3f8e235747c -r d48b6cb011a5 security/openssh/patches/patch-aa
--- a/security/openssh/patches/patch-aa Tue Apr 27 12:26:31 2004 +0000
+++ b/security/openssh/patches/patch-aa Tue Apr 27 12:30:23 2004 +0000
@@ -1,6 +1,6 @@
-$NetBSD: patch-aa,v 1.32 2004/03/12 19:24:47 wiz Exp $
+$NetBSD: patch-aa,v 1.33 2004/04/27 12:30:23 markd Exp $
---- configure.orig Tue Feb 24 07:22:59 2004
+--- configure.orig 2004-02-24 19:22:59.000000000 +1300
+++ configure
@@ -4803,6 +4803,9 @@ EOF
;;
@@ -23,7 +23,53 @@
#include <tcpd.h>
int deny_severity = 0, allow_severity = 0;
-@@ -17983,7 +17990,7 @@ echo "OpenSSH has been configured with t
+@@ -17009,12 +17016,20 @@ fi
+ rm -f conftest.$ac_objext conftest.$ac_ext
+ if test -z "$conf_utmpx_location"; then
+ if test x"$system_utmpx_path" = x"no" ; then
+- cat >>confdefs.h <<\EOF
++ for f in /var/run/utmpx; do
++ if test -f $f ; then
++ conf_utmpx_location=$f
++ fi
++ done
++ if test -z "$conf_utmpx_location"; then
++ cat >>confdefs.h <<\EOF
+ #define DISABLE_UTMPX 1
+ EOF
+
++ fi
+ fi
+-else
++fi
++if test -n "$conf_utmpx_location"; then
+ cat >>confdefs.h <<EOF
+ #define CONF_UTMPX_FILE "$conf_utmpx_location"
+ EOF
+@@ -17069,12 +17084,20 @@ fi
+ rm -f conftest.$ac_objext conftest.$ac_ext
+ if test -z "$conf_wtmpx_location"; then
+ if test x"$system_wtmpx_path" = x"no" ; then
+- cat >>confdefs.h <<\EOF
++ for f in /var/log/wtmpx; do
++ if test -f $f ; then
++ conf_wtmpx_location=$f
++ fi
++ done
++ if test -z "$conf_wtmpx_location"; then
++ cat >>confdefs.h <<\EOF
+ #define DISABLE_WTMPX 1
+ EOF
+
++ fi
+ fi
+-else
++fi
++if test -n "$conf_wtmpx_location"; then
+ cat >>confdefs.h <<EOF
+ #define CONF_WTMPX_FILE "$conf_wtmpx_location"
+ EOF
+@@ -17983,7 +18006,7 @@ echo "OpenSSH has been configured with t
echo " User binaries: $B"
echo " System binaries: $C"
echo " Configuration files: $D"
diff -r a3f8e235747c -r d48b6cb011a5 security/openssh/patches/patch-ab
--- a/security/openssh/patches/patch-ab Tue Apr 27 12:26:31 2004 +0000
+++ b/security/openssh/patches/patch-ab Tue Apr 27 12:30:23 2004 +0000
@@ -1,6 +1,6 @@
-$NetBSD: patch-ab,v 1.15 2004/03/12 19:24:47 wiz Exp $
+$NetBSD: patch-ab,v 1.16 2004/04/27 12:30:23 markd Exp $
---- configure.ac.orig Tue Feb 24 06:47:04 2004
+--- configure.ac.orig 2004-02-24 18:47:04.000000000 +1300
+++ configure.ac
@@ -438,6 +438,9 @@ mips-sony-bsd|mips-sony-newsos4)
;;
@@ -23,7 +23,47 @@
#include <tcpd.h>
int deny_severity = 0, allow_severity = 0;
],
-@@ -2793,7 +2800,7 @@ echo "OpenSSH has been configured with t
+@@ -2725,9 +2732,17 @@ AC_TRY_COMPILE([
+ )
+ if test -z "$conf_utmpx_location"; then
+ if test x"$system_utmpx_path" = x"no" ; then
+- AC_DEFINE(DISABLE_UTMPX)
++ for f in /var/run/utmpx; do
++ if test -f $f ; then
++ conf_utmpx_location=$f
++ fi
++ done
++ if test -z "$conf_utmpx_location"; then
++ AC_DEFINE(DISABLE_UTMPX)
++ fi
+ fi
+-else
++fi
++if test -n "$conf_utmpx_location"; then
+ AC_DEFINE_UNQUOTED(CONF_UTMPX_FILE, "$conf_utmpx_location")
+ fi
+
+@@ -2750,9 +2765,17 @@ AC_TRY_COMPILE([
+ )
+ if test -z "$conf_wtmpx_location"; then
+ if test x"$system_wtmpx_path" = x"no" ; then
+- AC_DEFINE(DISABLE_WTMPX)
++ for f in /var/log/wtmpx; do
++ if test -f $f ; then
++ conf_wtmpx_location=$f
++ fi
++ done
++ if test -z "$conf_wtmpx_location"; then
++ AC_DEFINE(DISABLE_WTMPX)
++ fi
+ fi
+-else
++fi
++if test -n "$conf_wtmpx_location"; then
+ AC_DEFINE_UNQUOTED(CONF_WTMPX_FILE, "$conf_wtmpx_location")
+ fi
+
+@@ -2793,7 +2816,7 @@ echo "OpenSSH has been configured with t
echo " User binaries: $B"
echo " System binaries: $C"
echo " Configuration files: $D"
diff -r a3f8e235747c -r d48b6cb011a5 security/openssh/patches/patch-ac
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/security/openssh/patches/patch-ac Tue Apr 27 12:30:23 2004 +0000
@@ -0,0 +1,29 @@
+$NetBSD: patch-ac,v 1.9 2004/04/27 12:30:23 markd Exp $
+
+--- defines.h.orig 2004-02-10 15:01:14.000000000 +1300
++++ defines.h
+@@ -574,6 +574,24 @@ struct winsize {
+ # endif
+ # endif
+ #endif
++#ifndef UTMPX_FILE
++# ifdef _PATH_UTMPX
++# define UTMPX_FILE _PATH_UTMPX
++# else
++# ifdef CONF_UTMPX_FILE
++# define UTMPX_FILE CONF_UTMPX_FILE
++# endif
++# endif
++#endif
++#ifndef WTMPX_FILE
++# ifdef _PATH_WTMPX
++# define WTMPX_FILE _PATH_WTMPX
++# else
++# ifdef CONF_WTMPX_FILE
++# define WTMPX_FILE CONF_WTMPX_FILE
++# endif
++# endif
++#endif
+ /* pick up the user's location for lastlog if given */
+ #ifndef LASTLOG_FILE
+ # ifdef _PATH_LASTLOG
diff -r a3f8e235747c -r d48b6cb011a5 security/openssh/patches/patch-ad
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/security/openssh/patches/patch-ad Tue Apr 27 12:30:23 2004 +0000
@@ -0,0 +1,22 @@
+$NetBSD: patch-ad,v 1.6 2004/04/27 12:30:23 markd Exp $
+
+--- loginrec.c.orig 2004-02-10 18:49:35.000000000 +1300
++++ loginrec.c
+@@ -720,8 +720,6 @@ construct_utmpx(struct logininfo *li, st
+ line_stripname(utx->ut_line, li->line, sizeof(utx->ut_line));
+ set_utmpx_time(li, utx);
+ utx->ut_pid = li->pid;
+- /* strncpy(): Don't necessarily want null termination */
+- strncpy(utx->ut_name, li->username, MIN_SIZEOF(utx->ut_name, li->username));
+
+ if (li->type == LTYPE_LOGOUT)
+ return;
+@@ -731,6 +729,8 @@ construct_utmpx(struct logininfo *li, st
+ * for logouts.
+ */
+
++ /* strncpy(): Don't necessarily want null termination */
++ strncpy(utx->ut_name, li->username, MIN_SIZEOF(utx->ut_name, li->username));
+ # ifdef HAVE_HOST_IN_UTMPX
+ strncpy(utx->ut_host, li->hostname, MIN_SIZEOF(utx->ut_host, li->hostname));
+ # endif
Home |
Main Index |
Thread Index |
Old Index