Import of pkgsrc-2016Q3

This commit is contained in:
2016-11-18 22:39:22 +01:00
committed by sambuc
parent 9d819b6d54
commit 1242aa1e36
35952 changed files with 949747 additions and 377081 deletions
+23 -21
View File
@@ -1,6 +1,6 @@
# $NetBSD: Makefile,v 1.237 2015/09/03 21:05:24 sevan Exp $
# $NetBSD: Makefile,v 1.249 2016/09/18 17:30:10 taca Exp $
DISTNAME= openssh-7.1p1
DISTNAME= openssh-7.3p1
PKGNAME= ${DISTNAME:S/p1/.1/}
CATEGORIES= security
MASTER_SITES= ${MASTER_SITE_OPENBSD:=OpenSSH/portable/}
@@ -14,7 +14,7 @@ CONFLICTS+= ssh-[0-9]* ssh6-[0-9]*
CONFLICTS+= ssh2-[0-9]* ssh2-nox11-[0-9]*
CONFLICTS+= openssh+gssapi-[0-9]*
CONFLICTS+= lsh>2.0
BROKEN_FOR_PLATFORM+= OpenBSD-*-*
BROKEN_ON_PLATFORM+= OpenBSD-*-*
USE_GCC_RUNTIME= yes
USE_TOOLS+= autoconf perl
@@ -33,26 +33,23 @@ INSTALL_TARGET= install-nokeys
.include "options.mk"
.if ${OPSYS} == "Darwin"
# fixes: dyld: Symbol not found: _allow_severity
CONFIGURE_ARGS+= --disable-strip
.endif
.if ${OPSYS} == "Interix"
CONFIGURE_ARGS.Darwin+= --disable-strip
# OpenSSH on Interix has some important caveats
.if ${OPSYS} == "Interix"
MESSAGE_SRC= ${.CURDIR}/MESSAGE.Interix
BUILDLINK_PASSTHRU_DIRS+= /usr/local/lib/bind
CONFIGURE_ENV+= ac_cv_func_openpty=no
CONFIGURE_ENV+= ac_cv_type_struct_timespec=yes
CPPFLAGS+= -DIOV_MAX=16 # default is INT_MAX, way too large
.if exists(/usr/local/include/bind/resolv.h)
. if exists(/usr/local/include/bind/resolv.h)
CPPFLAGS+= -I/usr/local/include/bind
BUILDLINK_PASSTHRU_DIRS+= /usr/local/include/bind
.elif exists(/usr/local/bind/include/resolv.h)
. elif exists(/usr/local/bind/include/resolv.h)
CPPFLAGS+= -I/usr/local/bind/include
BUILDLINK_PASSTHRU_DIRS+= /usr/local/bind/include
.endif
. endif
LDFLAGS+= -L/usr/local/lib/bind
LIBS+= -lbind -ldb -lcrypt
@@ -72,20 +69,23 @@ PKG_SYSCONFSUBDIR= ssh
GNU_CONFIGURE= yes
CONFIGURE_ARGS+= --with-mantype=man
CONFIGURE_ARGS+= --sysconfdir=${PKG_SYSCONFDIR:Q}
CONFIGURE_ARGS+= --with-pid-dir=${SSH_PID_DIR:Q}
CONFIGURE_ARGS+= --with-ssl-dir=${SSLBASE:Q}
CONFIGURE_ARGS+= --sysconfdir=${PKG_SYSCONFDIR}
CONFIGURE_ARGS+= --with-pid-dir=${SSH_PID_DIR}
CONFIGURE_ARGS+= --with-tcp-wrappers=${BUILDLINK_PREFIX.tcp_wrappers}
.if ${OPSYS} != "Interix"
CONFIGURE_ARGS+= --with-privsep-path=${OPENSSH_CHROOT:Q}
CONFIGURE_ARGS+= --with-privsep-user=${OPENSSH_USER:Q}
CONFIGURE_ARGS+= --with-privsep-user=${OPENSSH_USER}
.endif
# pkgsrc already enforces a "secure" version of zlib via dependencies,
# so skip this bogus version check.
CONFIGURE_ARGS+= --without-zlib-version-check
.if ${_PKGSRC_MKPIE} != "no"
CONFIGURE_ARGS+= --with-pie
.endif
# the openssh configure script finds and uses ${LD} if defined and
# defaults to ${CC} if not. we override LD here, since running the
# linker directly results in undefined symbols for obvious reasons.
@@ -110,14 +110,17 @@ CONFIGURE_ARGS+= --disable-libutil
# prior version don't have it. So, disable use of strnvis(3) now.
#
CONFIGURE_ENV+= ac_cv_func_strnvis=no
#
# workaround for ./configure problem, pkg/50936
#
CONFIGURE_ENV+= ac_cv_func_reallocarray=no
.endif
.if (${OPSYS} == "SunOS") && (${OS_VERSION} == "5.8" || ${OS_VERSION} == "5.9")
CONFIGURE_ARGS+= --disable-utmp --disable-wtmp
.endif
.if ${OPSYS} == "Linux"
CONFIGURE_ARGS+= --enable-md5-password
.endif
CONFIGURE_ARGS.Linux+= --enable-md5-password
# The ssh-askpass program is in ${X11BASE}/bin or ${PREFIX}/bin depending
# on if it's part of the X11 distribution, or if it's installed from pkgsrc
@@ -169,7 +172,7 @@ RCD_SCRIPTS= sshd
RCD_SCRIPT_SRC.sshd= ${WRKDIR}/sshd.sh
SMF_METHODS= sshd
FILES_SUBST+= SSH_PID_DIR=${SSH_PID_DIR:Q}
FILES_SUBST+= SSH_PID_DIR=${SSH_PID_DIR}
SUBST_CLASSES+= patch
SUBST_STAGE.patch= pre-configure
@@ -178,7 +181,6 @@ SUBST_SED.patch= -e '/channel_input_port_forward_request/s/0/ROOTUID/'
SUBST_VARS.patch= PKG_SYSCONFDIR
.include "../../devel/zlib/buildlink3.mk"
.include "../../security/openssl/buildlink3.mk"
.include "../../security/tcp_wrappers/buildlink3.mk"
#
@@ -196,7 +198,7 @@ post-configure:
${SED} -e '/HAVE_ECDSA_START/,/HAVE_ECDSA_STOP/d' \
${FILESDIR}/sshd.sh > ${WRKDIR}/sshd.sh; \
fi
${SED} -e 's,@VARBASE@,${VARBASE:Q},g' \
${SED} -e 's,@VARBASE@,${VARBASE},g' \
< ${FILESDIR}/org.openssh.sshd.sb.in \
> ${WRKDIR}/org.openssh.sshd.sb
+1 -3
View File
@@ -1,7 +1,6 @@
@comment $NetBSD: PLIST,v 1.17 2015/08/14 08:57:00 jperkin Exp $
@comment $NetBSD: PLIST,v 1.18 2016/03/15 20:54:07 bsiegert Exp $
bin/scp
bin/sftp
bin/slogin
bin/ssh
bin/ssh-add
bin/ssh-agent
@@ -13,7 +12,6 @@ libexec/ssh-pkcs11-helper
${PLIST.prng}libexec/ssh-rand-helper
man/man1/scp.1
man/man1/sftp.1
man/man1/slogin.1
man/man1/ssh-add.1
man/man1/ssh-agent.1
man/man1/ssh-keygen.1
+31 -33
View File
@@ -1,34 +1,32 @@
$NetBSD: distinfo,v 1.97 2015/08/22 05:17:22 taca Exp $
$NetBSD: distinfo,v 1.102 2016/09/18 17:30:10 taca Exp $
SHA1 (openssh-7.1p1-hpn-20150822.diff.bz2) = 444a2fbd80d57ff93b53ade84ec162e2a2f3aa67
RMD160 (openssh-7.1p1-hpn-20150822.diff.bz2) = 87fb6887d9ccb4b305ff3c25fd5f67847d9996d1
Size (openssh-7.1p1-hpn-20150822.diff.bz2) = 12173 bytes
SHA1 (openssh-7.1p1.tar.gz) = ed22af19f962262c493fcc6ed8c8826b2761d9b6
RMD160 (openssh-7.1p1.tar.gz) = 2c97ea10099fa8658156c0351d60d715655b9b07
Size (openssh-7.1p1.tar.gz) = 1493170 bytes
SHA1 (patch-Makefile.in) = 2bf52a85ecdebac3aa299b25ecb561218a3316a2
SHA1 (patch-auth-passwd.c) = 32da596dd9b255ffdd8168e6ea6f62596304b116
SHA1 (patch-auth-rhosts.c) = 5752c384f1fd81ed6ef21707fa2b9743a3891987
SHA1 (patch-auth.c) = 80f1c5ad8ea01a3c9dedce4eef1b625640958450
SHA1 (patch-auth1.c) = 0bb4bc35e2ca2cd03c5596dadcd2ffb4329091a7
SHA1 (patch-auth2.c) = 8a939381f72968d74a7df508a072dfb10f400284
SHA1 (patch-channels.c) = 9ad160fd1c2c7fabbea3d49dacb36036d13adfaa
SHA1 (patch-clientloop.c) = 11d44815ec39030ae20cb75727acff8c8e91144e
SHA1 (patch-config.h.in) = 5df3b952565c054f39110b66012005087bba7219
SHA1 (patch-configure.ac) = 8df3e2793a9bbd9179c69286f5cfea763bac3eea
SHA1 (patch-defines.h) = ecb225b4319347d0bcc6a271c81b7042f4c18b02
SHA1 (patch-includes.h) = f3d502dc30e680889ed1c7cf4fa6ad8282e6cd4d
SHA1 (patch-loginrec.c) = b06a236e9faf871e9eb102c52dd0f583bf096373
SHA1 (patch-openbsd-compat_bsd-openpty.c) = 9ccde56bfcfe1791b367f933e51b25137acce960
SHA1 (patch-openbsd-compat_openbsd-compat.h) = da33ee063f0a45c3a5f165ee5ae96c3168890ef9
SHA1 (patch-openbsd-compat_port-tun.c) = 5a8c8a7d2381a4b9530593754afe0ae0dbe2c8f5
SHA1 (patch-platform.c) = 92d563030a6c7f8b1924b988e9a2565edfd8c3d6
SHA1 (patch-sandbox-darwin.c) = a9255b1e8d52759506b61394de11050ea7ea25bb
SHA1 (patch-scp.c) = 0f11569d52ff813f42dd41fe315beab2af650dd0
SHA1 (patch-session.c) = 4e07cc45bc020d720f32788d7344d0213891969e
SHA1 (patch-sftp-common.c) = 72146d410f78b5e4e5efae51ca05b22039d64545
SHA1 (patch-ssh.c) = 25645adeaa67e04a98b75d04d1f016704aa84bca
SHA1 (patch-sshd.8) = 50154729a94aeaef17213d92979967b12d9c4e15
SHA1 (patch-sshd.c) = d381db6d05067d0f28be8268847df97a0c8e9ba4
SHA1 (patch-sshpty.c) = f87451e49e39fe137c8876fae52110dc2569958a
SHA1 (patch-uidswap.c) = 875be63bb6d1a7dd8c3d1c008c85aa4bf37dfdc2
SHA1 (openssh-7.3p1.tar.gz) = bfade84283fcba885e2084343ab19a08c7d123a5
RMD160 (openssh-7.3p1.tar.gz) = 823fc1e16c5d27a2361ed0b22f5ee24be11d2c13
SHA512 (openssh-7.3p1.tar.gz) = 7ba2d6140f38bd359ebf32ef17626e0ae1c00c3a38c01877b7c6b0317d030f10a8f82a0a51fc3b6273619de9ed73e24b8cf107b1e968f927053a3bedf97ff801
Size (openssh-7.3p1.tar.gz) = 1522617 bytes
SHA1 (patch-Makefile.in) = 98960119bda68a663214c8880484552f1207bcfc
SHA1 (patch-auth-passwd.c) = 5205ca4d15dbcd3f4c574f0a2fb7713ae69af5f7
SHA1 (patch-auth-rhosts.c) = a5e6131e63b83a7e8a06cd80f22def449d6bc2c4
SHA1 (patch-auth.c) = cd13f8b31b45d668c5e09eca098b17ec8a7c1039
SHA1 (patch-auth1.c) = cdac14ffa4008e62926526e66316b0a553435374
SHA1 (patch-auth2.c) = efc1eb6d28cb6ec2bd87723943f3e36c612d93aa
SHA1 (patch-channels.c) = edcce67664bbbc30a8d10ed2fe58dcece944726c
SHA1 (patch-clientloop.c) = 9b2db181d964b7720e1dc12724a9b9033f28d0e7
SHA1 (patch-config.h.in) = 7406f10b568d2b8237ee575922ce712658d90d59
SHA1 (patch-configure.ac) = d7ba54f34e03fd204eb1a9804fcae7fd16e285e2
SHA1 (patch-defines.h) = bd8687a9a2857f3b8d15ae94095f27f9344003c4
SHA1 (patch-includes.h) = c4a7622af6fbcd098d18d257724dca6aaeea4fda
SHA1 (patch-loginrec.c) = 28082deb14258fe63cbecad8ac96afc016de439c
SHA1 (patch-openbsd-compat_bsd-openpty.c) = eaac72830e36e307c19a7b679e6018ece9aebaac
SHA1 (patch-openbsd-compat_openbsd-compat.h) = bedbede16ab2fe918419c994ba15a20167b411b4
SHA1 (patch-openbsd-compat_port-tun.c) = 690dfb1f945d186dd3de5bea70ed8fab86e590ee
SHA1 (patch-platform.c) = f8f211dbc5e596c0f82eb86324d18a84c6151ec5
SHA1 (patch-sandbox-darwin.c) = c9a1fe2e4dbf98e929d983b4206a244e0e354b75
SHA1 (patch-scp.c) = 9c2317b0f796641903a826db355ba06595a26ea1
SHA1 (patch-session.c) = 850cef27299cf8af6a19987d5e070bf501cd57fb
SHA1 (patch-sftp-common.c) = 6819aa040c8f1caa30a704cf6f0588e498df8778
SHA1 (patch-ssh.c) = 6877d8205d999906c14240d4d112b084609927ca
SHA1 (patch-sshd.8) = 5bf48cd27cef8e8810b9dc7115f5180102a345d1
SHA1 (patch-sshd.c) = cd23ce269bfb48b0caa901e62fc01d35ef0618ac
SHA1 (patch-sshpty.c) = cb691d4fbde808927f2fbcc12b87ad983cf21938
SHA1 (patch-uidswap.c) = 68c4f5ffab7f4c5c9c00b7443a74b2da52809b7e
+1 -2
View File
@@ -1,6 +1,6 @@
<?xml version='1.0'?>
<!DOCTYPE service_bundle SYSTEM '/usr/share/lib/xml/dtd/service_bundle.dtd.1'>
<service_bundle type='manifest' name='@SMF_NAME@'>
<service_bundle type='manifest' name='export'>
<service name='@SMF_PREFIX@/@SMF_NAME@' type='service' version='1'>
<create_default_instance enabled='false'/>
<single_instance/>
@@ -34,7 +34,6 @@
<property_group name='startd' type='framework'>
<propval name='ignore_error' type='astring' value='core,signal'/>
</property_group>
<stability value='Unstable'/>
<template>
<common_name>
<loctext xml:lang='C'>OpenSSH server</loctext>
+2 -10
View File
@@ -1,6 +1,6 @@
#!@RCD_SCRIPTS_SHELL@
#
# $NetBSD: sshd.sh,v 1.15 2015/01/17 01:11:06 gdt Exp $
# $NetBSD: sshd.sh,v 1.16 2015/11/11 11:40:06 sevan Exp $
#
# PROVIDE: sshd
# REQUIRE: DAEMON LOGIN
@@ -22,13 +22,6 @@ sshd_keygen()
{
(
umask 022
if [ -f @PKG_SYSCONFDIR@/ssh_host_key ]; then
@ECHO@ "You already have an RSA host key in @PKG_SYSCONFDIR@/ssh_host_key"
@ECHO@ "Skipping protocol version 1 RSA Key Generation"
else
${keygen_command} -t rsa1 -b 1024 -f @PKG_SYSCONFDIR@/ssh_host_key -N ''
fi
if [ -f @PKG_SYSCONFDIR@/ssh_host_dsa_key ]; then
@ECHO@ "You already have a DSA host key in @PKG_SYSCONFDIR@/ssh_host_dsa_key"
@ECHO@ "Skipping protocol version 2 DSA Key Generation"
@@ -63,8 +56,7 @@ sshd_keygen()
sshd_precmd()
{
if [ ! -f @PKG_SYSCONFDIR@/ssh_host_key -o \
! -f @PKG_SYSCONFDIR@/ssh_host_dsa_key -o \
if [ ! -f @PKG_SYSCONFDIR@/ssh_host_dsa_key -o \
! -f @PKG_SYSCONFDIR@/ssh_host_rsa_key -o \
! -f @PKG_SYSCONFDIR@/ssh_host_ecdsa_key -o \
! -f @PKG_SYSCONFDIR@/ssh_host_ed25519_key ]; then
+13 -5
View File
@@ -1,15 +1,23 @@
# $NetBSD: options.mk,v 1.31 2015/08/22 05:17:22 taca Exp $
# $NetBSD: options.mk,v 1.33 2016/07/10 10:41:38 rillig Exp $
.include "../../mk/bsd.prefs.mk"
PKG_OPTIONS_VAR= PKG_OPTIONS.openssh
PKG_SUPPORTED_OPTIONS= kerberos hpn-patch pam
PKG_SUPPORTED_OPTIONS= hpn-patch kerberos openssl pam
PKG_SUGGESTED_OPTIONS= openssl
.include "../../mk/bsd.options.mk"
.if !empty(PKG_OPTIONS:Mopenssl)
.include "../../security/openssl/buildlink3.mk"
CONFIGURE_ARGS+= --with-ssl-dir=${SSLBASE:Q}
.else
CONFIGURE_ARGS+= --without-openssl
.endif
.if !empty(PKG_OPTIONS:Mkerberos)
. include "../../mk/krb5.buildlink3.mk"
CONFIGURE_ARGS+= --with-kerberos5=${KRB5BASE:Q}
CONFIGURE_ARGS+= --with-kerberos5=${KRB5BASE}
. if ${KRB5_TYPE} == "mit-krb5"
CONFIGURE_ENV+= ac_cv_search_k_hasafs=no
. endif
@@ -28,7 +36,7 @@ PLIST_VARS+= pam
CONFIGURE_ARGS+= --with-pam
MESSAGE_SRC+= ${.CURDIR}/MESSAGE.pam
MESSAGE_SUBST+= EGDIR=${EGDIR}
.if ${OPSYS} == "Linux"
. if ${OPSYS} == "Linux"
PLIST.pam= yes
.endif
. endif
.endif
+2 -2
View File
@@ -1,8 +1,8 @@
$NetBSD: patch-Makefile.in,v 1.4 2015/07/09 16:14:23 taca Exp $
$NetBSD: patch-Makefile.in,v 1.5 2016/01/18 12:53:26 jperkin Exp $
Removed install-sysconf as we handle that phase through post-install
--- Makefile.in.orig 2015-07-01 02:35:31.000000000 +0000
--- Makefile.in.orig 2015-08-21 04:49:03.000000000 +0000
+++ Makefile.in
@@ -2,5 +2,5 @@
+5 -5
View File
@@ -1,11 +1,11 @@
$NetBSD: patch-auth-passwd.c,v 1.2 2015/07/09 16:14:23 taca Exp $
$NetBSD: patch-auth-passwd.c,v 1.4 2016/09/18 17:30:11 taca Exp $
Replace uid 0 with ROOTUID macro
--- auth-passwd.c.orig 2015-07-01 02:35:31.000000000 +0000
--- auth-passwd.c.orig 2016-07-27 22:54:27.000000000 +0000
+++ auth-passwd.c
@@ -88,7 +88,7 @@ auth_password(Authctxt *authctxt, const
#endif
@@ -93,7 +93,7 @@ auth_password(Authctxt *authctxt, const
return 0;
#ifndef HAVE_CYGWIN
- if (pw->pw_uid == 0 && options.permit_root_login != PERMIT_YES)
@@ -13,7 +13,7 @@ Replace uid 0 with ROOTUID macro
ok = 0;
#endif
if (*password == '\0' && options.permit_empty_passwd == 0)
@@ -123,7 +123,12 @@ auth_password(Authctxt *authctxt, const
@@ -128,7 +128,12 @@ auth_password(Authctxt *authctxt, const
authctxt->force_pwchange = 1;
}
#endif
+2 -2
View File
@@ -1,8 +1,8 @@
$NetBSD: patch-auth-rhosts.c,v 1.2 2015/07/09 16:14:23 taca Exp $
$NetBSD: patch-auth-rhosts.c,v 1.3 2016/01/18 12:53:26 jperkin Exp $
Replace uid 0 with ROOTUID macro
--- auth-rhosts.c.orig 2015-07-01 02:35:31.000000000 +0000
--- auth-rhosts.c.orig 2015-08-21 04:49:03.000000000 +0000
+++ auth-rhosts.c
@@ -242,7 +242,7 @@ auth_rhosts2_raw(struct passwd *pw, cons
* If not logging in as superuser, try /etc/hosts.equiv and
+4 -4
View File
@@ -1,13 +1,13 @@
$NetBSD: patch-auth.c,v 1.3 2015/07/09 16:14:23 taca Exp $
$NetBSD: patch-auth.c,v 1.4 2016/01/18 12:53:26 jperkin Exp $
* Replace uid 0 with ROOTUID macro.
* Use login_getpwclass() instead of login_getclass() so that the root
vs. default login class distinction is made correctly, from FrrrBSD's
ports.
--- auth.c.orig 2015-07-01 02:35:31.000000000 +0000
--- auth.c.orig 2015-08-21 04:49:03.000000000 +0000
+++ auth.c
@@ -422,7 +422,7 @@ check_key_in_hostfiles(struct passwd *pw
@@ -424,7 +424,7 @@ check_key_in_hostfiles(struct passwd *pw
user_hostfile = tilde_expand_filename(userfile, pw->pw_uid);
if (options.strict_modes &&
(stat(user_hostfile, &st) == 0) &&
@@ -16,7 +16,7 @@ $NetBSD: patch-auth.c,v 1.3 2015/07/09 16:14:23 taca Exp $
(st.st_mode & 022) != 0)) {
logit("Authentication refused for %.100s: "
"bad owner or modes for %.200s",
@@ -651,7 +651,7 @@ getpwnamallow(const char *user)
@@ -653,7 +653,7 @@ getpwnamallow(const char *user)
if (!allowed_user(pw))
return (NULL);
#ifdef HAVE_LOGIN_CAP
+2 -2
View File
@@ -1,8 +1,8 @@
$NetBSD: patch-auth1.c,v 1.3 2015/07/09 16:14:23 taca Exp $
$NetBSD: patch-auth1.c,v 1.4 2016/01/18 12:53:26 jperkin Exp $
Replace uid 0 with ROOTUID macro
--- auth1.c.orig 2015-07-01 02:35:31.000000000 +0000
--- auth1.c.orig 2015-08-21 04:49:03.000000000 +0000
+++ auth1.c
@@ -322,7 +322,7 @@ do_authloop(Authctxt *authctxt)
+2 -2
View File
@@ -1,8 +1,8 @@
$NetBSD: patch-auth2.c,v 1.5 2015/08/14 08:57:00 jperkin Exp $
$NetBSD: patch-auth2.c,v 1.6 2016/01/18 12:53:26 jperkin Exp $
Replace uid 0 with ROOTUID macro
--- auth2.c.orig 2015-07-01 02:35:31.000000000 +0000
--- auth2.c.orig 2015-08-21 04:49:03.000000000 +0000
+++ auth2.c
@@ -302,7 +302,7 @@ userauth_finish(Authctxt *authctxt, int
fatal("INTERNAL ERROR: authenticated and postponed");
+2 -2
View File
@@ -1,10 +1,10 @@
$NetBSD: patch-channels.c,v 1.2 2015/07/09 16:14:23 taca Exp $
$NetBSD: patch-channels.c,v 1.3 2016/01/18 12:53:26 jperkin Exp $
Fix X11 forwarding under Mac OS X Yosemite. Patch taken from MacPorts.
https://trac.macports.org/browser/trunk/dports/net/openssh/files/launchd.patch?rev=121205
--- channels.c.orig 2015-07-01 02:35:31.000000000 +0000
--- channels.c.orig 2015-08-21 04:49:03.000000000 +0000
+++ channels.c
@@ -4037,15 +4037,35 @@ x11_connect_display(void)
* connection to the real X server.
+8 -8
View File
@@ -1,12 +1,12 @@
$NetBSD: patch-clientloop.c,v 1.2 2015/07/09 16:14:23 taca Exp $
$NetBSD: patch-clientloop.c,v 1.4 2016/03/15 20:54:07 bsiegert Exp $
Fix X11 forwarding under Mac OS X Yosemite. Patch taken from MacPorts.
https://trac.macports.org/browser/trunk/dports/net/openssh/files/launchd.patch?rev=121205
--- clientloop.c.orig 2015-07-01 02:35:31.000000000 +0000
--- clientloop.c.orig 2016-03-09 18:04:48.000000000 +0000
+++ clientloop.c
@@ -314,6 +314,10 @@ client_x11_get_proto(const char *display
@@ -313,6 +313,10 @@ client_x11_get_proto(const char *display
struct stat st;
u_int now, x11_timeout_real;
@@ -14,13 +14,13 @@ https://trac.macports.org/browser/trunk/dports/net/openssh/files/launchd.patch?r
+ int is_path_to_socket = 0;
+#endif /* __APPLE__ */
+
xauthdir = xauthfile = NULL;
*_proto = proto;
*_data = data;
proto[0] = data[0] = xauthfile[0] = xauthdir[0] = '\0';
@@ -329,6 +333,33 @@ client_x11_get_proto(const char *display
debug("x11_get_proto: DISPLAY not set");
return;
}
}
if (xauth_path != NULL) {
+#if __APPLE__
+ {
+ /*
@@ -51,7 +51,7 @@ https://trac.macports.org/browser/trunk/dports/net/openssh/files/launchd.patch?r
/*
* Handle FamilyLocal case where $DISPLAY does
* not match an authorization entry. For this we
@@ -420,6 +451,9 @@ client_x11_get_proto(const char *display
@@ -438,6 +469,9 @@ client_x11_get_proto(const char *display
if (!got_data) {
u_int32_t rnd = 0;
+2 -2
View File
@@ -1,9 +1,9 @@
$NetBSD: patch-config.h.in,v 1.4 2015/07/09 16:14:23 taca Exp $
$NetBSD: patch-config.h.in,v 1.5 2016/01/18 12:53:26 jperkin Exp $
* Added Interix and define new path to if_tun.h.
* Revive tcp_wrappers support.
--- config.h.in.orig 2015-07-01 02:41:59.000000000 +0000
--- config.h.in.orig 2015-08-21 05:09:20.000000000 +0000
+++ config.h.in
@@ -640,6 +640,9 @@
/* define if you have int64_t data type */
+5 -5
View File
@@ -1,9 +1,9 @@
$NetBSD: patch-configure.ac,v 1.4 2015/07/09 16:14:23 taca Exp $
$NetBSD: patch-configure.ac,v 1.5 2016/01/18 12:53:26 jperkin Exp $
* Various fixes regarding portability
* Revive tcp_wrappers support.
--- configure.ac.orig 2015-07-01 02:35:31.000000000 +0000
--- configure.ac.orig 2015-08-21 04:49:03.000000000 +0000
+++ configure.ac
@@ -316,6 +316,9 @@ AC_ARG_WITH([rpath],
]
@@ -102,7 +102,7 @@ $NetBSD: patch-configure.ac,v 1.4 2015/07/09 16:14:23 taca Exp $
# Check whether user wants to use ldns
LDNS_MSG="no"
AC_ARG_WITH(ldns,
@@ -4791,9 +4860,17 @@ AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
@@ -4816,9 +4885,17 @@ AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
])
if test -z "$conf_wtmpx_location"; then
if test x"$system_wtmpx_path" = x"no" ; then
@@ -122,7 +122,7 @@ $NetBSD: patch-configure.ac,v 1.4 2015/07/09 16:14:23 taca Exp $
AC_DEFINE_UNQUOTED([CONF_WTMPX_FILE], ["$conf_wtmpx_location"],
[Define if you want to specify the path to your wtmpx file])
fi
@@ -4880,7 +4957,7 @@ echo "OpenSSH has been configured with t
@@ -4905,7 +4982,7 @@ echo "OpenSSH has been configured with t
echo " User binaries: $B"
echo " System binaries: $C"
echo " Configuration files: $D"
@@ -131,7 +131,7 @@ $NetBSD: patch-configure.ac,v 1.4 2015/07/09 16:14:23 taca Exp $
echo " Manual pages: $F"
echo " PID file: $G"
echo " Privilege separation chroot path: $H"
@@ -4904,6 +4981,7 @@ echo " KerberosV support
@@ -4929,6 +5006,7 @@ echo " KerberosV support
echo " SELinux support: $SELINUX_MSG"
echo " Smartcard support: $SCARD_MSG"
echo " S/KEY support: $SKEY_MSG"
+2 -2
View File
@@ -1,8 +1,8 @@
$NetBSD: patch-defines.h,v 1.3 2015/07/09 16:14:23 taca Exp $
$NetBSD: patch-defines.h,v 1.4 2016/01/18 12:53:26 jperkin Exp $
Define ROOTUID, UTMPX_FILE and WTMPX_FILE
--- defines.h.orig 2015-07-01 02:35:31.000000000 +0000
--- defines.h.orig 2015-08-21 04:49:03.000000000 +0000
+++ defines.h
@@ -30,6 +30,15 @@
+2 -2
View File
@@ -1,8 +1,8 @@
$NetBSD: patch-includes.h,v 1.3 2015/07/09 16:14:23 taca Exp $
$NetBSD: patch-includes.h,v 1.4 2016/01/18 12:53:26 jperkin Exp $
Interix support
--- includes.h.orig 2015-07-01 02:35:31.000000000 +0000
--- includes.h.orig 2015-08-21 04:49:03.000000000 +0000
+++ includes.h
@@ -127,6 +127,10 @@
#ifdef HAVE_READPASSPHRASE_H
+2 -2
View File
@@ -1,8 +1,8 @@
$NetBSD: patch-loginrec.c,v 1.4 2015/08/14 08:57:00 jperkin Exp $
$NetBSD: patch-loginrec.c,v 1.5 2016/01/18 12:53:26 jperkin Exp $
Interix support and related fixes. Fix build on FreeBSD.
--- loginrec.c.orig 2015-07-01 02:35:31.000000000 +0000
--- loginrec.c.orig 2015-08-21 04:49:03.000000000 +0000
+++ loginrec.c
@@ -432,8 +432,8 @@ login_set_addr(struct logininfo *li, con
int
@@ -1,8 +1,8 @@
$NetBSD: patch-openbsd-compat_bsd-openpty.c,v 1.2 2015/08/14 08:57:00 jperkin Exp $
$NetBSD: patch-openbsd-compat_bsd-openpty.c,v 1.3 2016/01/18 12:53:26 jperkin Exp $
Interix support
--- openbsd-compat/bsd-openpty.c.orig 2015-07-01 02:35:31.000000000 +0000
--- openbsd-compat/bsd-openpty.c.orig 2015-08-21 04:49:03.000000000 +0000
+++ openbsd-compat/bsd-openpty.c
@@ -121,15 +121,17 @@ openpty(int *amaster, int *aslave, char
return (-1);
@@ -1,10 +1,10 @@
$NetBSD: patch-openbsd-compat_openbsd-compat.h,v 1.3 2015/07/09 16:14:23 taca Exp $
$NetBSD: patch-openbsd-compat_openbsd-compat.h,v 1.4 2016/01/18 12:53:26 jperkin Exp $
strtoll() declaration
--- openbsd-compat/openbsd-compat.h.orig 2015-07-01 02:35:31.000000000 +0000
--- openbsd-compat/openbsd-compat.h.orig 2015-08-21 04:49:03.000000000 +0000
+++ openbsd-compat/openbsd-compat.h
@@ -91,6 +91,10 @@ size_t strlcat(char *dst, const char *sr
@@ -99,6 +99,10 @@ size_t strlcat(char *dst, const char *sr
int setenv(register const char *name, register const char *value, int rewrite);
#endif
@@ -1,8 +1,8 @@
$NetBSD: patch-openbsd-compat_port-tun.c,v 1.2 2015/07/09 16:14:23 taca Exp $
$NetBSD: patch-openbsd-compat_port-tun.c,v 1.3 2016/01/18 12:53:26 jperkin Exp $
if_tun.h can be found in net/tun
--- openbsd-compat/port-tun.c.orig 2015-07-01 02:35:31.000000000 +0000
--- openbsd-compat/port-tun.c.orig 2015-08-21 04:49:03.000000000 +0000
+++ openbsd-compat/port-tun.c
@@ -111,6 +111,10 @@ sys_tun_open(int tun, int mode)
#include <sys/socket.h>
+2 -2
View File
@@ -1,8 +1,8 @@
$NetBSD: patch-platform.c,v 1.4 2015/07/09 16:14:23 taca Exp $
$NetBSD: patch-platform.c,v 1.5 2016/01/18 12:53:26 jperkin Exp $
Interix support
--- platform.c.orig 2015-07-01 02:35:31.000000000 +0000
--- platform.c.orig 2015-08-21 04:49:03.000000000 +0000
+++ platform.c
@@ -90,7 +90,9 @@ platform_privileged_uidswap(void)
/* uid 0 is not special on Cygwin so always try */
@@ -1,8 +1,8 @@
$NetBSD: patch-sandbox-darwin.c,v 1.1 2015/08/14 08:57:00 jperkin Exp $
$NetBSD: patch-sandbox-darwin.c,v 1.2 2016/01/18 12:53:26 jperkin Exp $
Support sandbox on newer OSX, from MacPorts.
--- sandbox-darwin.c.orig 2015-07-01 02:35:31.000000000 +0000
--- sandbox-darwin.c.orig 2015-08-21 04:49:03.000000000 +0000
+++ sandbox-darwin.c
@@ -62,8 +62,16 @@ ssh_sandbox_child(struct ssh_sandbox *bo
struct rlimit rl_zero;
+2 -2
View File
@@ -1,8 +1,8 @@
$NetBSD: patch-scp.c,v 1.3 2015/07/09 16:14:23 taca Exp $
$NetBSD: patch-scp.c,v 1.4 2016/01/18 12:53:26 jperkin Exp $
Interix support
--- scp.c.orig 2015-07-01 02:35:31.000000000 +0000
--- scp.c.orig 2015-08-21 04:49:03.000000000 +0000
+++ scp.c
@@ -478,7 +478,11 @@ main(int argc, char **argv)
argc -= optind;
+8 -8
View File
@@ -1,10 +1,10 @@
$NetBSD: patch-session.c,v 1.4 2015/07/09 16:14:23 taca Exp $
$NetBSD: patch-session.c,v 1.7 2016/09/18 17:30:11 taca Exp $
Interix support
* Interix support.
--- session.c.orig 2015-07-01 02:35:31.000000000 +0000
--- session.c.orig 2016-07-27 22:54:27.000000000 +0000
+++ session.c
@@ -1093,7 +1093,7 @@ read_etc_default_login(char ***env, u_in
@@ -1120,7 +1120,7 @@ read_etc_default_login(char ***env, u_in
if (tmpenv == NULL)
return;
@@ -13,7 +13,7 @@ Interix support
var = child_get_env(tmpenv, "SUPATH");
else
var = child_get_env(tmpenv, "PATH");
@@ -1202,7 +1202,7 @@ do_setup_env(Session *s, const char *she
@@ -1230,7 +1230,7 @@ do_setup_env(Session *s, const char *she
# endif /* HAVE_ETC_DEFAULT_LOGIN */
if (path == NULL || *path == '\0') {
child_set_env(&env, &envsize, "PATH",
@@ -22,7 +22,7 @@ Interix support
SUPERUSER_PATH : _PATH_STDPATH);
}
# endif /* HAVE_CYGWIN */
@@ -1316,6 +1316,18 @@ do_setup_env(Session *s, const char *she
@@ -1346,6 +1346,18 @@ do_setup_env(Session *s, const char *she
strcmp(pw->pw_dir, "/") ? pw->pw_dir : "");
read_environment_file(&env, &envsize, buf);
}
@@ -41,7 +41,7 @@ Interix support
if (debug_flag) {
/* dump the environment */
fprintf(stderr, "Environment:\n");
@@ -1510,11 +1522,13 @@ do_setusercontext(struct passwd *pw)
@@ -1537,11 +1549,13 @@ do_setusercontext(struct passwd *pw)
perror("setgid");
exit(1);
}
@@ -55,7 +55,7 @@ Interix support
endgrent();
#endif
@@ -2356,7 +2370,7 @@ session_pty_cleanup2(Session *s)
@@ -2388,7 +2402,7 @@ session_pty_cleanup2(Session *s)
record_logout(s->pid, s->tty, s->pw->pw_name);
/* Release the pseudo-tty. */
+2 -2
View File
@@ -1,8 +1,8 @@
$NetBSD: patch-sftp-common.c,v 1.3 2015/08/14 08:57:00 jperkin Exp $
$NetBSD: patch-sftp-common.c,v 1.4 2016/01/18 12:53:26 jperkin Exp $
Include <unistd.h> for strmode(3).
--- sftp-common.c.orig 2015-07-01 02:35:31.000000000 +0000
--- sftp-common.c.orig 2015-08-21 04:49:03.000000000 +0000
+++ sftp-common.c
@@ -37,6 +37,9 @@
#include <string.h>
+6 -6
View File
@@ -1,15 +1,15 @@
$NetBSD: patch-ssh.c,v 1.4 2015/07/09 16:14:23 taca Exp $
$NetBSD: patch-ssh.c,v 1.6 2016/03/15 20:54:07 bsiegert Exp $
Interix support
--- ssh.c.orig 2015-07-01 02:35:31.000000000 +0000
--- ssh.c.orig 2016-03-09 18:04:48.000000000 +0000
+++ ssh.c
@@ -1083,7 +1083,7 @@ main(int ac, char **av)
"disabling");
options.update_hostkeys = 0;
@@ -1097,7 +1097,7 @@ main(int ac, char **av)
}
if (options.connection_attempts <= 0)
fatal("Invalid number of ConnectionAttempts");
-#ifndef HAVE_CYGWIN
+#if defined(HAVE_CYGWIN) || defined(HAVE_INTERIX)
+#if !defined(HAVE_CYGWIN) && !defined(HAVE_INTERIX)
if (original_effective_uid != 0)
options.use_privileged_port = 0;
#endif
+4 -4
View File
@@ -1,10 +1,10 @@
$NetBSD: patch-sshd.8,v 1.1 2015/07/09 16:14:23 taca Exp $
$NetBSD: patch-sshd.8,v 1.2 2016/01/18 12:53:26 jperkin Exp $
* Revive tcp_wrappers support.
--- sshd.8.orig 2015-07-01 02:35:31.000000000 +0000
--- sshd.8.orig 2015-08-21 04:49:03.000000000 +0000
+++ sshd.8
@@ -853,6 +853,12 @@ the user's home directory becomes access
@@ -850,6 +850,12 @@ the user's home directory becomes access
This file should be writable only by the user, and need not be
readable by anyone else.
.Pp
@@ -17,7 +17,7 @@ $NetBSD: patch-sshd.8,v 1.1 2015/07/09 16:14:23 taca Exp $
.It Pa /etc/hosts.equiv
This file is for host-based authentication (see
.Xr ssh 1 ) .
@@ -956,6 +962,7 @@ The content of this file is not sensitiv
@@ -953,6 +959,7 @@ The content of this file is not sensitiv
.Xr ssh-keygen 1 ,
.Xr ssh-keyscan 1 ,
.Xr chroot 2 ,
+27 -20
View File
@@ -1,9 +1,9 @@
$NetBSD: patch-sshd.c,v 1.5 2015/08/14 08:57:00 jperkin Exp $
$NetBSD: patch-sshd.c,v 1.7 2016/03/15 20:54:07 bsiegert Exp $
* Interix support
* Revive tcp_wrappers support.
--- sshd.c.orig 2015-07-01 02:35:31.000000000 +0000
--- sshd.c.orig 2016-03-09 18:04:48.000000000 +0000
+++ sshd.c
@@ -125,6 +125,13 @@
#include "version.h"
@@ -31,34 +31,41 @@ $NetBSD: patch-sshd.c,v 1.5 2015/08/14 08:57:00 jperkin Exp $
struct monitor *pmonitor = NULL;
int privsep_is_preauth = 1;
@@ -632,7 +643,7 @@ privsep_preauth_child(void)
demote_sensitive_data();
/* Demote the child */
- if (getuid() == 0 || geteuid() == 0) {
+ if (getuid() == ROOTUID || geteuid() == ROOTUID) {
/* Change our root directory */
if (chroot(_PATH_PRIVSEP_CHROOT_DIR) == -1)
fatal("chroot(\"%s\"): %s", _PATH_PRIVSEP_CHROOT_DIR,
@@ -643,10 +654,15 @@ privsep_preauth_child(void)
/* XXX not ready, too heavy after chroot */
do_setusercontext(privsep_pw);
#else
/* Drop our privileges */
debug3("privsep user:group %u:%u", (u_int)privsep_pw->pw_uid,
(u_int)privsep_pw->pw_gid);
+#ifdef HAVE_INTERIX
+ if (setuser(privsep_pw->pw_name, NULL, SU_COMPLETE))
+ fatal("setuser: %.100s", strerror(errno));
+#else
gidset[0] = privsep_pw->pw_gid;
if (setgroups(1, gidset) < 0)
fatal("setgroups: %.100s", strerror(errno));
permanently_set_uid(privsep_pw);
gidset[0] = privsep_pw->pw_gid;
if (setgroups(1, gidset) < 0)
fatal("setgroups: %.100s", strerror(errno));
permanently_set_uid(privsep_pw);
+#endif /* HAVE_INTERIX */
#endif
}
}
@@ -714,11 +730,18 @@ privsep_preauth(Authctxt *authctxt)
@@ -713,10 +729,17 @@ privsep_preauth(Authctxt *authctxt)
/* Arrange for logging to be sent to the monitor */
set_log_handler(mm_log_handler, pmonitor);
/* Demote the child */
- if (getuid() == 0 || geteuid() == 0)
+#ifdef __APPLE_SANDBOX_NAMED_EXTERNAL__
+ /* We need to do this before we chroot() so we can read sshd.sb */
+ if (box != NULL)
+ ssh_sandbox_child(box);
+#endif
+ if (getuid() == ROOTUID || geteuid() == ROOTUID)
privsep_preauth_child();
privsep_preauth_child();
setproctitle("%s", "[net]");
+#ifndef __APPLE_SANDBOX_NAMED_EXTERNAL__
if (box != NULL)
@@ -67,7 +74,7 @@ $NetBSD: patch-sshd.c,v 1.5 2015/08/14 08:57:00 jperkin Exp $
return 0;
}
@@ -732,7 +755,7 @@ privsep_postauth(Authctxt *authctxt)
@@ -730,7 +753,7 @@ privsep_postauth(Authctxt *authctxt)
#ifdef DISABLE_FD_PASSING
if (1) {
#else
@@ -76,7 +83,7 @@ $NetBSD: patch-sshd.c,v 1.5 2015/08/14 08:57:00 jperkin Exp $
#endif
/* File descriptor passing is broken or root login */
use_privsep = 0;
@@ -1485,8 +1508,10 @@ main(int ac, char **av)
@@ -1497,8 +1520,10 @@ main(int ac, char **av)
av = saved_argv;
#endif
@@ -88,7 +95,7 @@ $NetBSD: patch-sshd.c,v 1.5 2015/08/14 08:57:00 jperkin Exp $
/* Ensure that fds 0, 1 and 2 are open or directed to /dev/null */
sanitise_stdfd();
@@ -1915,7 +1940,7 @@ main(int ac, char **av)
@@ -1925,7 +1950,7 @@ main(int ac, char **av)
(st.st_uid != getuid () ||
(st.st_mode & (S_IWGRP|S_IWOTH)) != 0))
#else
@@ -97,7 +104,7 @@ $NetBSD: patch-sshd.c,v 1.5 2015/08/14 08:57:00 jperkin Exp $
#endif
fatal("%s must be owned by root and not group or "
"world-writable.", _PATH_PRIVSEP_CHROOT_DIR);
@@ -1938,8 +1963,10 @@ main(int ac, char **av)
@@ -1948,8 +1973,10 @@ main(int ac, char **av)
* to create a file, and we can't control the code in every
* module which might be used).
*/
@@ -108,7 +115,7 @@ $NetBSD: patch-sshd.c,v 1.5 2015/08/14 08:57:00 jperkin Exp $
if (rexec_flag) {
rexec_argv = xcalloc(rexec_argc + 2, sizeof(char *));
@@ -2135,6 +2162,25 @@ main(int ac, char **av)
@@ -2145,6 +2172,25 @@ main(int ac, char **av)
audit_connection_from(remote_ip, remote_port);
#endif
+2 -2
View File
@@ -1,8 +1,8 @@
$NetBSD: patch-sshpty.c,v 1.2 2015/07/09 16:14:23 taca Exp $
$NetBSD: patch-sshpty.c,v 1.3 2016/01/18 12:53:26 jperkin Exp $
Replace uid 0 with ROOTUID macro
--- sshpty.c.orig 2015-07-01 02:35:31.000000000 +0000
--- sshpty.c.orig 2015-08-21 04:49:03.000000000 +0000
+++ sshpty.c
@@ -86,7 +86,7 @@ void
pty_release(const char *tty)
+2 -2
View File
@@ -1,8 +1,8 @@
$NetBSD: patch-uidswap.c,v 1.4 2015/08/14 08:57:00 jperkin Exp $
$NetBSD: patch-uidswap.c,v 1.5 2016/01/18 12:53:26 jperkin Exp $
Interix support
--- uidswap.c.orig 2015-07-01 02:35:31.000000000 +0000
--- uidswap.c.orig 2015-08-21 04:49:03.000000000 +0000
+++ uidswap.c
@@ -67,13 +67,13 @@ temporarily_use_uid(struct passwd *pw)
(u_int)pw->pw_uid, (u_int)pw->pw_gid,