summaryrefslogtreecommitdiff
path: root/security/hpn-ssh
diff options
context:
space:
mode:
Diffstat (limited to 'security/hpn-ssh')
-rw-r--r--security/hpn-ssh/Makefile96
-rw-r--r--security/hpn-ssh/distinfo4
-rw-r--r--security/hpn-ssh/files/batch.patch49
-rw-r--r--security/hpn-ssh/files/patch-auth.c20
-rw-r--r--security/hpn-ssh/files/patch-auth1.c56
-rw-r--r--security/hpn-ssh/files/patch-auth2.c60
-rw-r--r--security/hpn-ssh/files/patch-clientloop.c11
-rw-r--r--security/hpn-ssh/files/patch-defines.h11
-rw-r--r--security/hpn-ssh/files/patch-misc.c13
-rw-r--r--security/hpn-ssh/files/patch-readpassphrase.c25
-rw-r--r--security/hpn-ssh/files/patch-readpassphrase.h23
-rw-r--r--security/hpn-ssh/files/patch-session.c284
-rw-r--r--security/hpn-ssh/files/patch-sshconnect.c16
-rw-r--r--security/hpn-ssh/files/servconf.c.patch17
-rw-r--r--security/hpn-ssh/pkg-comment1
-rw-r--r--security/hpn-ssh/pkg-descr15
-rw-r--r--security/hpn-ssh/pkg-message10
-rw-r--r--security/hpn-ssh/pkg-plist12
18 files changed, 0 insertions, 723 deletions
diff --git a/security/hpn-ssh/Makefile b/security/hpn-ssh/Makefile
deleted file mode 100644
index ca1133761e69..000000000000
--- a/security/hpn-ssh/Makefile
+++ /dev/null
@@ -1,96 +0,0 @@
-# New ports collection makefile for: openssh
-# Date created: 18 Mar 1999
-# Whom: dwcjr@inethouston.net
-#
-# $FreeBSD$
-#
-
-PORTNAME= openssh
-PORTVERSION= 3.1p1
-PORTREVISION= 4
-CATEGORIES= security ipv6
-MASTER_SITES= ftp://ftp.openbsd.org/pub/OpenBSD/OpenSSH/portable/ \
- ftp://ftp.op.net/pub/OpenBSD/OpenSSH/portable/ \
- ftp://carroll.cac.psu.edu/pub/OpenBSD/OpenSSH/portable/
-PKGNAMESUFFIX= -portable
-
-PATCH_SITES= ${MASTER_SITES}
-PATCHFILES= openssh-3.1p1-adv.token.patch
-
-MAINTAINER= dinoex@FreeBSD.org
-
-MAN1= sftp.1 ssh-add.1 ssh-agent.1 ssh-keygen.1 ssh-keyscan.1 scp.1 ssh.1
-MLINKS= ssh.1 slogin.1
-MAN8= sftp-server.8 sshd.8
-
-CRYPTOLIBS= -L${OPENSSLLIB} -lcrypto
-USE_OPENSSL= yes
-GNU_CONFIGURE= yes
-CONFIGURE_ARGS?= --prefix=${PREFIX} --with-md5-passwords
-CLEAN= etc/ssh_config etc/sshd_config etc/moduli \
- etc/ssh_host_key etc/ssh_host_key.pub \
- etc/ssh_host_dsa_key etc/ssh_host_dsa_key.pub \
- etc/ssh_host_rsa_key etc/ssh_host_rsa_key.pub
-
-.if exists(/usr/include/security/pam_modules.h)
-CONFIGURE_ARGS+= --with-pam
-.endif
-
-.if exists(/usr/include/tcpd.h)
-CONFIGURE_ARGS+= --with-tcp-wrappers
-.endif
-
-.if defined(OPENSSH_OVERWRITE_BASE)
-PKGNAMESUFFIX= -overwrite-base
-PREFIX= /usr
-MANPREFIX= ${PREFIX}/share
-CONFIGURE_ARGS+= --mandir=${MANPREFIX}/man \
- --sysconfdir=/etc/ssh --localstatedir=/var
-.endif
-
-.if defined(BATCH)
-EXTRA_PATCHES+= ${FILESDIR}/batch.patch
-.endif
-
-.if defined(KRB5_HOME) && exists(${KRB5_HOME})
-GSSAPI_SITE= http://www.sxw.org.uk/computing/patches/
-MASTER_SITES+= ${GSSAPI_SITE}
-DISTFILES= ${EXTRACT_ONLY} ${PORTNAME}-${PORTVERSION}-gssapi-20020321.diff
-EXTRACT_ONLY= ${PORTNAME}-${PORTVERSION}${EXTRACT_SUFX}
-PATCH_SITES+= ${GSSAPI_SITE}
-PATCHFILES+= ${PORTNAME}-mit-krb5-20020319.diff
-EXTRA_PATCHES+= ${FILESDIR}/servconf.c.patch
-BUILD_DEPENDS= autoconf:${PORTSDIR}/devel/autoconf
-# USE_AUTOCONF_VER= 252 # broken
-CONFIGURE_ARGS+= --with-kerberos5=${KRB5_HOME}
-AUTOCONF= autoconf
-AUTOHEADER= autoheader
-
-post-patch:
- @${ECHO_MSG} Applying extra patch for GSS-API key-exchange...
- @${PATCH} ${PATCH_DIST_ARGS:S/-p0/-p1/} \
- < ${DISTDIR}/${PORTNAME}-${PORTVERSION}-gssapi-20020321.diff
-
-pre-configure:
- @${ECHO_MSG} !!!! Warning this option uses autoconf/autoheader !!!
- (cd ${CONFIGURE_WRKSRC} && ${SETENV} ${AUTOCONF_ENV} ${AUTOCONF} \
- ${AUTOCONF_ARGS})
- (cd ${CONFIGURE_WRKSRC} && ${SETENV} ${AUTOCONF_ENV} ${AUTOHEADER})
-.endif
-
-post-install:
- @${CAT} ${PKGMESSAGE}
-
-.include <bsd.port.pre.mk>
-
-.if ${OSVERSION} < 430000 || exists(${LOCALBASE}/lib/libcrypto.so.3)
-OPENSSLBASE= ${LOCALBASE}
-OPENSSLDIR= ${OPENSSLBASE}/openssl
-LIB_DEPENDS+= crypto.3:${PORTSDIR}/security/openssl
-OPENSSLLIB= ${OPENSSLBASE}/lib
-OPENSSLINC= ${OPENSSLBASE}/include
-MAKE_ENV+= OPENSSLLIB=${OPENSSLLIB} OPENSSLINC=${OPENSSLINC} \
- OPENSSLBASE=${OPENSSLBASE} OPENSSLDIR=${OPENSSLDIR}
-.endif
-
-.include <bsd.port.post.mk>
diff --git a/security/hpn-ssh/distinfo b/security/hpn-ssh/distinfo
deleted file mode 100644
index a875a7b85e22..000000000000
--- a/security/hpn-ssh/distinfo
+++ /dev/null
@@ -1,4 +0,0 @@
-MD5 (openssh-3.1p1.tar.gz) = c6a52d4126ed27eb57c31729ec6b2362
-MD5 (openssh-3.1p1-gssapi-20020321.diff) = d571cea9810630650139013a1af4b1d9
-MD5 (openssh-3.1p1-adv.token.patch) = 8c34327404f504f8d5bf1a2063f4e7b7
-MD5 (openssh-mit-krb5-20020319.diff) = 151af40132624a615c96027491f09f25
diff --git a/security/hpn-ssh/files/batch.patch b/security/hpn-ssh/files/batch.patch
deleted file mode 100644
index eb91ab511340..000000000000
--- a/security/hpn-ssh/files/batch.patch
+++ /dev/null
@@ -1,49 +0,0 @@
---- Makefile.in.orig Tue Feb 26 20:24:22 2002
-+++ Makefile.in Fri Mar 8 22:02:48 2002
-@@ -183,7 +183,7 @@
- autoreconf
- (cd scard && $(MAKE) -f Makefile.in distprep)
-
--install: $(CONFIGFILES) $(MANPAGES) $(TARGETS) install-files host-key
-+install: $(CONFIGFILES) $(MANPAGES) $(TARGETS) install-files
- install-nokeys: $(CONFIGFILES) $(MANPAGES) $(TARGETS) install-files
-
- scard-install:
-@@ -222,37 +222,6 @@
- ln -s ssh$(EXEEXT) $(DESTDIR)$(bindir)/slogin
- -rm -f $(DESTDIR)$(mandir)/$(mansubdir)1/slogin.1
- ln -s ssh.1 $(DESTDIR)$(mandir)/$(mansubdir)1/slogin.1
-- if [ ! -d $(DESTDIR)$(sysconfdir) ]; then \
-- $(srcdir)/mkinstalldirs $(DESTDIR)$(sysconfdir); \
-- fi
-- if [ ! -f $(DESTDIR)$(sysconfdir)/ssh_config ]; then \
-- $(INSTALL) -m 644 ssh_config.out $(DESTDIR)$(sysconfdir)/ssh_config; \
-- else \
-- echo "$(DESTDIR)$(sysconfdir)/ssh_config already exists, install will not overwrite"; \
-- fi
-- if [ ! -f $(DESTDIR)$(sysconfdir)/sshd_config ]; then \
-- $(INSTALL) -m 644 sshd_config.out $(DESTDIR)$(sysconfdir)/sshd_config; \
-- else \
-- echo "$(DESTDIR)$(sysconfdir)/sshd_config already exists, install will not overwrite"; \
-- fi
-- if [ -f ssh_prng_cmds -a ! -z "$(INSTALL_SSH_PRNG_CMDS)" ]; then \
-- $(PERL) $(srcdir)/fixprogs ssh_prng_cmds $(ENT); \
-- if [ ! -f $(DESTDIR)$(sysconfdir)/ssh_prng_cmds ] ; then \
-- $(INSTALL) -m 644 ssh_prng_cmds.out $(DESTDIR)$(sysconfdir)/ssh_prng_cmds; \
-- else \
-- echo "$(DESTDIR)$(sysconfdir)/ssh_prng_cmds already exists, install will not overwrite"; \
-- fi ; \
-- fi
-- if [ ! -f $(DESTDIR)$(sysconfdir)/moduli ]; then \
-- if [ -f $(DESTDIR)$(sysconfdir)/primes ]; then \
-- echo "moving $(DESTDIR)$(sysconfdir)/primes to $(DESTDIR)$(sysconfdir)/moduli"; \
-- mv "$(DESTDIR)$(sysconfdir)/primes" "$(DESTDIR)$(sysconfdir)/moduli"; \
-- else \
-- $(INSTALL) -m 644 moduli.out $(DESTDIR)$(sysconfdir)/moduli; \
-- fi ; \
-- else \
-- echo "$(DESTDIR)$(sysconfdir)/moduli already exists, install will not overwrite"; \
-- fi
-
- host-key: ssh-keygen$(EXEEXT)
- if [ -z "$(DESTDIR)" ] ; then \
diff --git a/security/hpn-ssh/files/patch-auth.c b/security/hpn-ssh/files/patch-auth.c
deleted file mode 100644
index 20cef648ab71..000000000000
--- a/security/hpn-ssh/files/patch-auth.c
+++ /dev/null
@@ -1,20 +0,0 @@
---- auth.c.orig Tue Mar 5 02:42:43 2002
-+++ auth.c Sun Mar 17 20:53:15 2002
-@@ -193,6 +193,17 @@
- }
- #endif /* WITH_AIXAUTHENTICATE */
-
-+#ifdef __FreeBSD__
-+ /* Fail if the account's expiration time has passed. */
-+ if (pw->pw_expire != 0) {
-+ struct timeval tv;
-+
-+ (void)gettimeofday(&tv, NULL);
-+ if (tv.tv_sec >= pw->pw_expire)
-+ return 0;
-+ }
-+#endif /* __FreeBSD__ */
-+
- /* We found no reason not to let this user try to log on... */
- return 1;
- }
diff --git a/security/hpn-ssh/files/patch-auth1.c b/security/hpn-ssh/files/patch-auth1.c
deleted file mode 100644
index 43e0d0d4a29b..000000000000
--- a/security/hpn-ssh/files/patch-auth1.c
+++ /dev/null
@@ -1,56 +0,0 @@
---- auth1.c.orig Thu Feb 14 10:39:50 2002
-+++ auth1.c Sun Mar 17 20:53:15 2002
-@@ -75,6 +75,18 @@
- u_int ulen;
- int type = 0;
- struct passwd *pw = authctxt->pw;
-+#ifdef HAVE_LOGIN_CAP
-+ login_cap_t *lc;
-+#endif
-+#ifdef USE_PAM
-+ struct inverted_pam_cookie *pam_cookie;
-+#endif /* USE_PAM */
-+#if defined(HAVE_LOGIN_CAP) || defined(LOGIN_ACCESS)
-+ const char *from_host, *from_ip;
-+
-+ from_host = get_canonical_hostname(options.verify_reverse_mapping);
-+ from_ip = get_remote_ipaddr();
-+#endif /* HAVE_LOGIN_CAP || LOGIN_ACCESS */
-
- debug("Attempting authentication for %s%.100s.",
- authctxt->valid ? "" : "illegal user ", authctxt->user);
-@@ -297,6 +309,34 @@
- log("Unknown message during authentication: type %d", type);
- break;
- }
-+
-+#ifdef HAVE_LOGIN_CAP
-+ if (pw != NULL) {
-+ lc = login_getpwclass(pw);
-+ if (lc == NULL)
-+ lc = login_getclassbyname(NULL, pw);
-+ if (!auth_hostok(lc, from_host, from_ip)) {
-+ log("Denied connection for %.200s from %.200s [%.200s].",
-+ pw->pw_name, from_host, from_ip);
-+ packet_disconnect("Sorry, you are not allowed to connect.");
-+ }
-+ if (!auth_timeok(lc, time(NULL))) {
-+ log("LOGIN %.200s REFUSED (TIME) FROM %.200s",
-+ pw->pw_name, from_host);
-+ packet_disconnect("Logins not available right now.");
-+ }
-+ login_close(lc);
-+ lc = NULL;
-+ }
-+#endif /* HAVE_LOGIN_CAP */
-+#ifdef LOGIN_ACCESS
-+ if (pw != NULL && !login_access(pw->pw_name, from_host)) {
-+ log("Denied connection for %.200s from %.200s [%.200s].",
-+ pw->pw_name, from_host, from_ip);
-+ packet_disconnect("Sorry, you are not allowed to connect.");
-+ }
-+#endif /* LOGIN_ACCESS */
-+
- #ifdef BSD_AUTH
- if (authctxt->as) {
- auth_close(authctxt->as);
diff --git a/security/hpn-ssh/files/patch-auth2.c b/security/hpn-ssh/files/patch-auth2.c
deleted file mode 100644
index 46fa0f40f6e8..000000000000
--- a/security/hpn-ssh/files/patch-auth2.c
+++ /dev/null
@@ -1,60 +0,0 @@
---- auth2.c.orig Tue Feb 26 19:09:43 2002
-+++ auth2.c Sun Mar 17 20:53:15 2002
-@@ -168,6 +168,15 @@
- Authmethod *m = NULL;
- char *user, *service, *method, *style = NULL;
- int authenticated = 0;
-+#ifdef HAVE_LOGIN_CAP
-+ login_cap_t *lc;
-+#endif /* HAVE_LOGIN_CAP */
-+#if defined(HAVE_LOGIN_CAP) || defined(LOGIN_ACCESS)
-+ const char *from_host, *from_ip;
-+
-+ from_host = get_canonical_hostname(options.verify_reverse_mapping);
-+ from_ip = get_remote_ipaddr();
-+#endif /* HAVE_LOGIN_CAP || LOGIN_ACCESS */
-
- if (authctxt == NULL)
- fatal("input_userauth_request: no authctxt");
-@@ -208,6 +217,41 @@
- "(%s,%s) -> (%s,%s)",
- authctxt->user, authctxt->service, user, service);
- }
-+
-+#ifdef HAVE_LOGIN_CAP
-+ if (authctxt->pw != NULL) {
-+ lc = login_getpwclass(authctxt->pw);
-+ if (lc == NULL)
-+ lc = login_getclassbyname(NULL, authctxt->pw);
-+ if (!auth_hostok(lc, from_host, from_ip)) {
-+ log("Denied connection for %.200s from %.200s [%.200s].",
-+ authctxt->pw->pw_name, from_host, from_ip);
-+ packet_disconnect("Sorry, you are not allowed to connect.");
-+ }
-+ if (!auth_timeok(lc, time(NULL))) {
-+ log("LOGIN %.200s REFUSED (TIME) FROM %.200s",
-+ authctxt->pw->pw_name, from_host);
-+ packet_disconnect("Logins not available right now.");
-+ }
-+ login_close(lc);
-+ lc = NULL;
-+ }
-+#endif /* HAVE_LOGIN_CAP */
-+#ifdef LOGIN_ACCESS
-+ if (authctxt->pw != NULL &&
-+ !login_access(authctxt->pw->pw_name, from_host)) {
-+ log("Denied connection for %.200s from %.200s [%.200s].",
-+ authctxt->pw->pw_name, from_host, from_ip);
-+ packet_disconnect("Sorry, you are not allowed to connect.");
-+ }
-+#endif /* LOGIN_ACCESS */
-+#ifdef BSD_AUTH
-+ if (authctxt->as) {
-+ auth_close(authctxt->as);
-+ authctxt->as = NULL;
-+ }
-+#endif
-+
- /* reset state */
- auth2_challenge_stop(authctxt);
- authctxt->postponed = 0;
diff --git a/security/hpn-ssh/files/patch-clientloop.c b/security/hpn-ssh/files/patch-clientloop.c
deleted file mode 100644
index 67fc4dcb4f6b..000000000000
--- a/security/hpn-ssh/files/patch-clientloop.c
+++ /dev/null
@@ -1,11 +0,0 @@
---- clientloop.c.orig Fri Apr 20 09:17:51 2001
-+++ clientloop.c Sat May 26 15:18:51 2001
-@@ -1131,7 +1131,7 @@
-
- if (strcmp(ctype, "forwarded-tcpip") == 0) {
- c = client_request_forwarded_tcpip(ctype, rchan);
-- } else if (strcmp(ctype, "x11") == 0) {
-+ } else if (strcmp(ctype, "x11") == 0 && options.forward_x11) {
- c = client_request_x11(ctype, rchan);
- } else if (strcmp(ctype, "auth-agent@openssh.com") == 0) {
- c = client_request_agent(ctype, rchan);
diff --git a/security/hpn-ssh/files/patch-defines.h b/security/hpn-ssh/files/patch-defines.h
deleted file mode 100644
index fff0463b7409..000000000000
--- a/security/hpn-ssh/files/patch-defines.h
+++ /dev/null
@@ -1,11 +0,0 @@
---- defines.h.orig Tue Feb 26 17:40:49 2002
-+++ defines.h Fri Mar 8 18:51:27 2002
-@@ -146,7 +146,7 @@
- including rpc/rpc.h breaks Solaris 6
- */
- #ifndef INADDR_LOOPBACK
--#define INADDR_LOOPBACK ((ulong)0x7f000001)
-+#define INADDR_LOOPBACK ((u_long)0x7f000001)
- #endif
-
- /* Types */
diff --git a/security/hpn-ssh/files/patch-misc.c b/security/hpn-ssh/files/patch-misc.c
deleted file mode 100644
index 0f8ef065fec0..000000000000
--- a/security/hpn-ssh/files/patch-misc.c
+++ /dev/null
@@ -1,13 +0,0 @@
---- misc.c.orig Thu Apr 12 22:09:37 2001
-+++ misc.c Sat May 26 15:39:25 2001
-@@ -111,6 +111,10 @@
- copy->pw_class = xstrdup(pw->pw_class);
- copy->pw_dir = xstrdup(pw->pw_dir);
- copy->pw_shell = xstrdup(pw->pw_shell);
-+#ifdef __FreeBSD__
-+ copy->pw_expire = pw->pw_expire;
-+ copy->pw_change = pw->pw_change;
-+#endif /* __FreeBSD__ */
- return copy;
- }
-
diff --git a/security/hpn-ssh/files/patch-readpassphrase.c b/security/hpn-ssh/files/patch-readpassphrase.c
deleted file mode 100644
index 28bae4877919..000000000000
--- a/security/hpn-ssh/files/patch-readpassphrase.c
+++ /dev/null
@@ -1,25 +0,0 @@
---- openbsd-compat/readpassphrase.c.orig Sat Mar 30 06:08:34 2002
-+++ openbsd-compat/readpassphrase.c Sat Mar 30 06:09:33 2002
-@@ -165,6 +165,13 @@
- errno = save_errno;
- return(nr == -1 ? NULL : buf);
- }
-+
-+static void handler(int s)
-+{
-+
-+ signo = s;
-+}
-+
- #endif /* HAVE_READPASSPHRASE */
-
- #if 0
-@@ -177,8 +184,3 @@
- }
- #endif
-
--static void handler(int s)
--{
--
-- signo = s;
--}
diff --git a/security/hpn-ssh/files/patch-readpassphrase.h b/security/hpn-ssh/files/patch-readpassphrase.h
deleted file mode 100644
index d2820ec0549d..000000000000
--- a/security/hpn-ssh/files/patch-readpassphrase.h
+++ /dev/null
@@ -1,23 +0,0 @@
---- openbsd-compat/readpassphrase.h.orig Sun Jan 27 19:18:10 2002
-+++ openbsd-compat/readpassphrase.h Sun Jan 27 19:18:54 2002
-@@ -28,6 +28,6 @@
- */
-
--#ifndef _READPASSPHRASE_H_
--#define _READPASSPHRASE_H_
-+#ifndef READPASSPHRASE_H_
-+#define READPASSPHRASE_H_
-
- #include "includes.h"
-@@ -43,6 +43,7 @@
-
- char *readpassphrase(const char *, char *, size_t, int);
--
-+#else /* HAVE_READPASSPHRASE */
-+#include <readpassphrase.h>
- #endif /* HAVE_READPASSPHRASE */
-
--#endif /* !_READPASSPHRASE_H_ */
-+#endif /* !READPASSPHRASE_H_ */
-
-
diff --git a/security/hpn-ssh/files/patch-session.c b/security/hpn-ssh/files/patch-session.c
deleted file mode 100644
index 85d451a5576d..000000000000
--- a/security/hpn-ssh/files/patch-session.c
+++ /dev/null
@@ -1,284 +0,0 @@
---- session.c.orig Mon Feb 25 16:48:03 2002
-+++ session.c Mon Mar 25 06:19:09 2002
-@@ -63,6 +63,13 @@
- #define is_winnt (GetVersion() < 0x80000000)
- #endif
-
-+#ifdef __FreeBSD__
-+#include <libutil.h>
-+#include <syslog.h>
-+#include <time.h>
-+#define _PATH_CHPASS "/usr/bin/passwd"
-+#endif /* __FreeBSD__ */
-+
- /* types */
-
- #define TTYSZ 64
-@@ -423,6 +430,13 @@
- log_init(__progname, options.log_level, options.log_facility, log_stderr);
-
- /*
-+ * Using login and executing a specific "command" are mutually
-+ * exclusive, so turn off use_login if there's a command.
-+ */
-+ if (command != NULL)
-+ options.use_login = 0;
-+
-+ /*
- * Create a new session and process group since the 4.4BSD
- * setlogin() affects the entire process group.
- */
-@@ -537,6 +551,14 @@
-
- /* Child. Reinitialize the log because the pid has changed. */
- log_init(__progname, options.log_level, options.log_facility, log_stderr);
-+
-+ /*
-+ * Using login and executing a specific "command" are mutually
-+ * exclusive, so turn off use_login if there's a command.
-+ */
-+ if (command != NULL)
-+ options.use_login = 0;
-+
- /* Close the master side of the pseudo tty. */
- close(ptyfd);
-
-@@ -659,12 +681,24 @@
- do_login(Session *s, const char *command)
- {
- char *time_string;
-+ char *newcommand;
- char hostname[MAXHOSTNAMELEN];
- socklen_t fromlen;
- struct sockaddr_storage from;
- time_t last_login_time;
- struct passwd * pw = s->pw;
- pid_t pid = getpid();
-+#ifdef HAVE_LOGIN_CAP
-+ FILE *f;
-+ char buf[256];
-+ char *fname;
-+ const char *shorttty;
-+#endif /* HAVE_LOGIN_CAP */
-+#ifdef __FreeBSD__
-+#define DEFAULT_WARN (2L * 7L * 86400L) /* Two weeks */
-+ struct timeval tv;
-+ time_t warntime = DEFAULT_WARN;
-+#endif /* __FreeBSD__ */
-
- /*
- * Get IP address of client. If the connection is not a socket, let
-@@ -703,6 +737,72 @@
- }
- #endif
-
-+#ifdef __FreeBSD__
-+ if (pw->pw_change || pw->pw_expire)
-+ (void)gettimeofday(&tv, NULL);
-+#ifdef HAVE_LOGIN_CAP
-+ warntime = login_getcaptime(lc, "warnpassword",
-+ DEFAULT_WARN, DEFAULT_WARN);
-+#endif /* HAVE_LOGIN_CAP */
-+ /*
-+ * If the password change time is set and has passed, give the
-+ * user a password expiry notice and chance to change it.
-+ */
-+ if (pw->pw_change != 0) {
-+ if (tv.tv_sec >= pw->pw_change) {
-+ (void)printf(
-+ "Sorry -- your password has expired.\n");
-+ log("%s Password expired - forcing change",
-+ pw->pw_name);
-+ if (newcommand != NULL)
-+ xfree(newcommand);
-+ newcommand = xstrdup(_PATH_CHPASS);
-+ } else if (pw->pw_change - tv.tv_sec < warntime &&
-+ !check_quietlogin(s, command))
-+ (void)printf(
-+ "Warning: your password expires on %s",
-+ ctime(&pw->pw_change));
-+ }
-+
-+#ifndef USE_PAM
-+ if (pw->pw_expire) {
-+ if (tv.tv_sec >= pw->pw_expire) {
-+ (void)printf(
-+ "Sorry -- your account has expired.\n");
-+ log(
-+ "LOGIN %.200s REFUSED (EXPIRED) FROM %.200s ON TTY %.200s",
-+ pw->pw_name, get_remote_name_or_ip(utmp_len,
-+ options.verify_reverse_mapping), s->tty);
-+ exit(254);
-+ } else if (pw->pw_expire - tv.tv_sec < warntime &&
-+ !check_quietlogin(s, command))
-+ (void)printf(
-+ "Warning: your account expires on %s",
-+ ctime(&pw->pw_expire));
-+ }
-+#endif /* !USE_PAM */
-+#endif /* __FreeBSD__ */
-+
-+#ifdef HAVE_LOGIN_CAP
-+ /* check if we have a pathname in the ttyname */
-+ shorttty = rindex( s->tty, '/' );
-+ if (shorttty != NULL ) {
-+ /* use only the short filename to check */
-+ shorttty ++;
-+ } else {
-+ /* nothing found, use the whole name found */
-+ shorttty = s->tty;
-+ }
-+ if (!auth_ttyok(lc, shorttty)) {
-+ (void)printf("Permission denied.\n");
-+ log(
-+ "LOGIN %.200s REFUSED (TTY) FROM %.200s ON TTY %.200s",
-+ pw->pw_name, get_remote_name_or_ip(utmp_len,
-+ options.verify_reverse_mapping), s->tty);
-+ exit(254);
-+ }
-+#endif /* HAVE_LOGIN_CAP */
-+
- if (check_quietlogin(s, command))
- return;
-
-@@ -715,7 +815,17 @@
- printf("%s\n", aixloginmsg);
- #endif /* WITH_AIXAUTHENTICATE */
-
-- if (options.print_lastlog && last_login_time != 0) {
-+ /*
-+ * If the user has logged in before, display the time of last
-+ * login. However, don't display anything extra if a command
-+ * has been specified (so that ssh can be used to execute
-+ * commands on a remote machine without users knowing they
-+ * are going to another machine). Login(1) will do this for
-+ * us as well, so check if login(1) is used
-+ */
-+ if (command == NULL && options.print_lastlog &&
-+ last_login_time != 0 &&
-+ !options.use_login) {
- time_string = ctime(&last_login_time);
- if (strchr(time_string, '\n'))
- *strchr(time_string, '\n') = 0;
-@@ -725,7 +835,30 @@
- printf("Last login: %s from %s\r\n", time_string, hostname);
- }
-
-- do_motd();
-+#ifdef HAVE_LOGIN_CAP
-+ if (command == NULL &&
-+ !options.use_login) {
-+ fname = login_getcapstr(lc, "copyright", NULL, NULL);
-+ if (fname != NULL && (f = fopen(fname, "r")) != NULL) {
-+ while (fgets(buf, sizeof(buf), f) != NULL)
-+ fputs(buf, stdout);
-+ fclose(f);
-+ } else
-+ (void)printf("%s\n\t%s %s\n",
-+ "Copyright (c) 1980, 1983, 1986, 1988, 1990, 1991, 1993, 1994",
-+ "The Regents of the University of California. ",
-+ "All rights reserved.");
-+ }
-+#endif /* HAVE_LOGIN_CAP */
-+
-+ /*
-+ * Print /etc/motd unless a command was specified or printing
-+ * it was disabled in server options or login(1) will be
-+ * used. Note that some machines appear to print it in
-+ * /etc/profile or similar.
-+ */
-+ if (command == NULL && !options.use_login)
-+ do_motd();
- }
-
- /*
-@@ -741,9 +874,9 @@
- #ifdef HAVE_LOGIN_CAP
- f = fopen(login_getcapstr(lc, "welcome", "/etc/motd",
- "/etc/motd"), "r");
--#else
-+#else /* !HAVE_LOGIN_CAP */
- f = fopen("/etc/motd", "r");
--#endif
-+#endif /* HAVE_LOGIN_CAP */
- if (f) {
- while (fgets(buf, sizeof(buf), f))
- fputs(buf, stdout);
-@@ -770,10 +903,10 @@
- #ifdef HAVE_LOGIN_CAP
- if (login_getcapbool(lc, "hushlogin", 0) || stat(buf, &st) >= 0)
- return 1;
--#else
-+#else /* HAVE_LOGIN_CAP */
- if (stat(buf, &st) >= 0)
- return 1;
--#endif
-+#endif /* HAVE_LOGIN_CAP */
- return 0;
- }
-
-@@ -902,6 +1035,10 @@
- #endif
-
- if (!options.use_login) {
-+#ifdef HAVE_LOGIN_CAP
-+ char *var;
-+#endif /* HAVE_LOGIN_CAP */
-+
- /* Set basic environment. */
- child_set_env(&env, &envsize, "USER", pw->pw_name);
- child_set_env(&env, &envsize, "LOGNAME", pw->pw_name);
-@@ -909,6 +1046,12 @@
- #ifdef HAVE_LOGIN_CAP
- (void) setusercontext(lc, pw, pw->pw_uid, LOGIN_SETPATH);
- child_set_env(&env, &envsize, "PATH", getenv("PATH"));
-+ var= login_getcapstr(lc, "lang", NULL, NULL);
-+ if ( var ) child_set_env(&env, &envsize, "LANG", var);
-+ var= login_getcapstr(lc, "charset", NULL, NULL);
-+ if ( var ) child_set_env(&env, &envsize, "MM_CHARSET", var);
-+ var= login_getcapstr(lc, "timezone", NULL, NULL);
-+ if ( var ) child_set_env(&env, &envsize, "TZ", var);
- #else /* HAVE_LOGIN_CAP */
- # ifndef HAVE_CYGWIN
- /*
-@@ -1241,7 +1384,7 @@
- * initgroups, because at least on Solaris 2.3 it leaves file
- * descriptors open.
- */
-- for (i = 3; i < 64; i++)
-+ for (i = 3; i < getdtablesize(); i++)
- close(i);
-
- /*
-@@ -1271,6 +1414,31 @@
- exit(1);
- #endif
- }
-+
-+#ifdef __FreeBSD__
-+ if (!options.use_login) {
-+ /*
-+ * If the password change time is set and has passed, give the
-+ * user a password expiry notice and chance to change it.
-+ */
-+ if (pw->pw_change != 0) {
-+ struct timeval tv;
-+
-+ (void)gettimeofday(&tv, NULL);
-+ if (tv.tv_sec >= pw->pw_change) {
-+ (void)printf(
-+ "Sorry -- your password has expired.\n");
-+ syslog(LOG_INFO,
-+ "%s Password expired - forcing change",
-+ pw->pw_name);
-+ if (system("/usr/bin/passwd") != 0) {
-+ perror("/usr/bin/passwd");
-+ exit(1);
-+ }
-+ }
-+ }
-+ }
-+#endif /* __FreeBSD__ */
-
- if (!options.use_login)
- do_rc_files(s, shell);
diff --git a/security/hpn-ssh/files/patch-sshconnect.c b/security/hpn-ssh/files/patch-sshconnect.c
deleted file mode 100644
index 72f75354bd24..000000000000
--- a/security/hpn-ssh/files/patch-sshconnect.c
+++ /dev/null
@@ -1,16 +0,0 @@
---- sshconnect.c.orig Wed Aug 8 00:29:09 2001
-+++ sshconnect.c Wed Oct 3 14:28:15 2001
-@@ -577,11 +577,13 @@
- sin_addr.s_addr) >> 24) == IN_LOOPBACKNET;
- salen = sizeof(struct sockaddr_in);
- break;
-+#ifdef HAVE_STRUCT_SOCKADDR_IN6
- case AF_INET6:
- local = IN6_IS_ADDR_LOOPBACK(
- &(((struct sockaddr_in6 *)hostaddr)->sin6_addr));
- salen = sizeof(struct sockaddr_in6);
- break;
-+#endif
- default:
- local = 0;
- salen = sizeof(struct sockaddr_storage);
diff --git a/security/hpn-ssh/files/servconf.c.patch b/security/hpn-ssh/files/servconf.c.patch
deleted file mode 100644
index dde0a6947e60..000000000000
--- a/security/hpn-ssh/files/servconf.c.patch
+++ /dev/null
@@ -1,17 +0,0 @@
---- servconf.c.orig Sat Mar 23 11:02:41 2002
-+++ servconf.c Sat Mar 23 11:07:39 2002
-@@ -17,12 +17,12 @@
- #endif
- #if defined(KRB5)
- #ifdef HEIMDAL
--#include <krb.h>
-+#include <krb5.h>
- #else
- /* Bodge - but then, so is using the kerberos IV KEYFILE to get a Kerberos V
- * keytab */
--#define KEYFILE "/etc/krb5.keytab"
- #endif
-+#define KEYFILE "/etc/krb5.keytab"
- #endif
- #ifdef AFS
- #include <kafs.h>
diff --git a/security/hpn-ssh/pkg-comment b/security/hpn-ssh/pkg-comment
deleted file mode 100644
index d96c7bfa9b13..000000000000
--- a/security/hpn-ssh/pkg-comment
+++ /dev/null
@@ -1 +0,0 @@
-The portable version of OpenBSD's OpenSSH
diff --git a/security/hpn-ssh/pkg-descr b/security/hpn-ssh/pkg-descr
deleted file mode 100644
index 99ac07bfd209..000000000000
--- a/security/hpn-ssh/pkg-descr
+++ /dev/null
@@ -1,15 +0,0 @@
-OpenBSD's OpenSSH portable version
-
-Normal OpenSSH development produces a very small, secure, and easy to maintain
-version for the OpenBSD project. The OpenSSH Portability Team takes that pure
-version and adds portability code so that OpenSSH can run on many other
-operating systems (Unfortunately, in particular since OpenSSH does
-authentication, it runs into a *lot* of differences between Unix operating
-systems).
-
-The portable OpenSSH follows development of the official version, but releases
-are not synchronized. Portable releases are marked with a 'p' (e.g. 3.1p1).
-The official OpenBSD source will never use the 'p' suffix, but will instead
-increment the version number when they hit 'stable spots' in their development.
-
-WWW: http://www.openssh.com/portable.html
diff --git a/security/hpn-ssh/pkg-message b/security/hpn-ssh/pkg-message
deleted file mode 100644
index 47f0f600972d..000000000000
--- a/security/hpn-ssh/pkg-message
+++ /dev/null
@@ -1,10 +0,0 @@
-To enable this port, please add sshd_program=/usr/local/sbin/sshd and make
-sure
-sshd_enable is set to YES in your /etc/rc.conf
-
-You may also want to put NO_OPENSSH= true in your /etc/make.conf
-and make sure your path is setup to /usr/local/bin before /usr/bin so that
-you
-are running the port version of openssh and not the version that comes with
-FreeBSD
-
diff --git a/security/hpn-ssh/pkg-plist b/security/hpn-ssh/pkg-plist
deleted file mode 100644
index b2b6276a5695..000000000000
--- a/security/hpn-ssh/pkg-plist
+++ /dev/null
@@ -1,12 +0,0 @@
-@comment slogin must be deleted first
-bin/slogin
-bin/ssh
-bin/scp
-bin/ssh-add
-bin/ssh-agent
-bin/ssh-keygen
-bin/ssh-keyscan
-bin/sftp
-sbin/sshd
-share/Ssh.bin
-libexec/sftp-server