summaryrefslogtreecommitdiff
path: root/security
diff options
context:
space:
mode:
authorimil <imil>2013-05-01 19:58:25 +0000
committerimil <imil>2013-05-01 19:58:25 +0000
commit1d191b764254ebd3fc9c09ddbc1be83c4a722d54 (patch)
tree19905f8f6582c0a52a16d798def3db0370ae6d3e /security
parentc8ab25439f1ae9a8a65d68fdafb643a2310479f7 (diff)
downloadpkgsrc-1d191b764254ebd3fc9c09ddbc1be83c4a722d54.tar.gz
Changes since OpenSSH 6.1
========================= This release introduces a number of new features: Features: * ssh(1)/sshd(8): Added support for AES-GCM authenticated encryption in SSH protocol 2. The new cipher is available as aes128-gcm@openssh.com and aes256-gcm@openssh.com. It uses an identical packet format to the AES-GCM mode specified in RFC 5647, but uses simpler and different selection rules during key exchange. * ssh(1)/sshd(8): Added support for encrypt-then-mac (EtM) MAC modes for SSH protocol 2. These modes alter the packet format and compute the MAC over the packet length and encrypted packet rather than over the plaintext data. These modes are considered more secure and are used by default when available. * ssh(1)/sshd(8): Added support for the UMAC-128 MAC as "umac-128@openssh.com" and "umac-128-etm@openssh.com". The latter being an encrypt-then-mac mode. * sshd(8): Added support for multiple required authentication in SSH protocol 2 via an AuthenticationMethods option. This option lists one or more comma-separated lists of authentication method names. Successful completion of all the methods in any list is required for authentication to complete. This allows, for example, requiring a user having to authenticate via public key or GSSAPI before they are offered password authentication. * sshd(8)/ssh-keygen(1): Added support for Key Revocation Lists (KRLs), a compact binary format to represent lists of revoked keys and certificates that take as little as one bit per certificate when revoking by serial number. KRLs may be generated using ssh-keygen(1) and are loaded into sshd(8) via the existing RevokedKeys sshd_config option. * ssh(1): IdentitiesOnly now applies to keys obtained from a PKCS11Provider. This allows control of which keys are offered from tokens using IdentityFile. * sshd(8): sshd_config(5)'s AllowTcpForwarding now accepts "local" and "remote" in addition to its previous "yes"/"no" keywords to allow the server to specify whether just local or remote TCP forwarding is enabled. * sshd(8): Added a sshd_config(5) option AuthorizedKeysCommand to support fetching authorized_keys from a command in addition to (or instead of) from the filesystem. The command is run under an account specified by an AuthorizedKeysCommandUser sshd_config(5) option. * sftp-server(8): Now supports a -d option to allow the starting directory to be something other than the user's home directory. * ssh-keygen(1): Now allows fingerprinting of keys hosted in PKCS#11 tokens using "ssh-keygen -lD pkcs11_provider". * ssh(1): When SSH protocol 2 only is selected (the default), ssh(1) now immediately sends its SSH protocol banner to the server without waiting to receive the server's banner, saving time when connecting. * ssh(1): Added ~v and ~V escape sequences to raise and lower the logging level respectively. * ssh(1): Made the escape command help (~?) context sensitive so that only commands that will work in the current session are shown. * ssh-keygen(1): When deleting host lines from known_hosts using "ssh-keygen -R host", ssh-keygen(1) now prints details of which lines were removed. Bugfixes: * ssh(1): Force a clean shutdown of ControlMaster client sessions when the ~. escape sequence is used. This means that ~. should now work in mux clients even if the server is no longer responding. * ssh(1): Correctly detect errors during local TCP forward setup in multiplexed clients. bz#2055 * ssh-add(1): Made deleting explicit keys "ssh-add -d" symmetric with adding keys with respect to certificates. It now tries to delete the corresponding certificate and respects the -k option to allow deleting of the key only. * sftp(1): Fix a number of parsing and command-editing bugs, including bz#1956 * ssh(1): When muxmaster is run with -N, ensured that it shuts down gracefully when a client sends it "-O stop" rather than hanging around. bz#1985 * ssh-keygen(1): When screening moduli candidates, append to the file rather than overwriting to allow resumption. bz#1957 * ssh(1): Record "Received disconnect" messages at ERROR rather than INFO priority. bz#2057. * ssh(1): Loudly warn if explicitly-provided private key is unreadable. bz#1981 Portable OpenSSH: * sshd(8): The Linux seccomp-filter sandbox is now supported on ARM platforms where the kernel supports it. * sshd(8): The seccomp-filter sandbox will not be enabled if the system headers support it at compile time, regardless of whether it can be enabled then. If the run-time system does not support seccomp-filter, sshd will fall back to the rlimit pseudo-sandbox. * ssh(1): Don't link in the Kerberos libraries. They aren't necessary on the client, just on sshd(8). bz#2072 * Fix GSSAPI linking on Solaris, which uses a differently-named GSSAPI library. bz#2073 * Fix compilation on systems with openssl-1.0.0-fips. * Fix a number of errors in the RPM spec files. Changes since OpenSSH 6.0 ========================= This is primarily a bugfix release. Features: * sshd(8): This release turns on pre-auth sandboxing sshd by default for new installs, by setting UsePrivilegeSeparation=sandbox in sshd_config. * ssh-keygen(1): Add options to specify starting line number and number of lines to process when screening moduli candidates, allowing processing of different parts of a candidate moduli file in parallel * sshd(8): The Match directive now supports matching on the local (listen) address and port upon which the incoming connection was received via LocalAddress and LocalPort clauses. * sshd(8): Extend sshd_config Match directive to allow setting AcceptEnv and {Allow,Deny}{Users,Groups} * Add support for RFC6594 SSHFP DNS records for ECDSA key types. bz#1978 * ssh-keygen(1): Allow conversion of RSA1 keys to public PEM and PKCS8 * sshd(8): Allow the sshd_config PermitOpen directive to accept "none" as an argument to refuse all port-forwarding requests. * sshd(8): Support "none" as an argument for AuthorizedPrincipalsFile * ssh-keyscan(1): Look for ECDSA keys by default. bz#1971 * sshd(8): Add "VersionAddendum" to sshd_config to allow server operators to append some arbitrary text to the server SSH protocol banner. Bugfixes: * ssh(1)/sshd(8): Don't spin in accept() in situations of file descriptor exhaustion. Instead back off for a while. * ssh(1)/sshd(8): Remove hmac-sha2-256-96 and hmac-sha2-512-96 MACs as they were removed from the specification. bz#2023, * sshd(8): Handle long comments in config files better. bz#2025 * ssh(1): Delay setting tty_flag so RequestTTY options are correctly picked up. bz#1995 * sshd(8): Fix handling of /etc/nologin incorrectly being applied to root on platforms that use login_cap. Portable OpenSSH: * sshd(8): Allow sshd pre-auth sandboxing to fall-back to the rlimit sandbox from the Linux SECCOMP filter sandbox when the latter is not available in the kernel. * ssh(1): Fix NULL dereference when built with LDNS and using DNSSEC to retrieve a CNAME SSHFP record. * Fix cross-compilation problems related to pkg-config. bz#1996 Changes since OpenSSH 5.9 ========================= This is primarily a bugfix release. Features: * ssh-keygen(1): Add optional checkpoints for moduli screening * ssh-add(1): new -k option to load plain keys (skipping certificates) * sshd(8): Add wildcard support to PermitOpen, allowing things like "PermitOpen localhost:*". bz #1857 * ssh(1): support for cancelling local and remote port forwards via the multiplex socket. Use ssh -O cancel -L xx:xx:xx -R yy:yy:yy user@host" to request the cancellation of the specified forwardings * support cancellation of local/dynamic forwardings from ~C commandline Bugfixes: * ssh(1): ensure that $DISPLAY contains only valid characters before using it to extract xauth data so that it can't be used to play local shell metacharacter games. * ssh(1): unbreak remote portforwarding with dynamic allocated listen ports * scp(1): uppress adding '--' to remote commandlines when the first argument does not start with '-'. saves breakage on some difficult-to-upgrade embedded/router platforms * ssh(1)/sshd(8): fix typo in IPQoS parsing: there is no "AF14" class, but there is an "AF21" class * ssh(1)/sshd(8): do not permit SSH2_MSG_SERVICE_REQUEST/ACCEPT during rekeying * ssh(1): skip attempting to create ~/.ssh when -F is passed * sshd(8): unbreak stdio forwarding when ControlPersist is in use; bz#1943 * sshd(1): send tty break to pty master instead of (probably already closed) slave side; bz#1859 * sftp(1): silence error spam for "ls */foo" in directory with files; bz#1683 * Fixed a number of memory and file descriptor leaks Portable OpenSSH: * Add a new privilege separation sandbox implementation for Linux's new seccomp sandbox, automatically enabled on platforms that support it. (Note: privilege separation sandboxing is still experimental) * Fix compilation problems on FreeBSD, where libutil contained openpty() but not login(). * ssh-keygen(1): don't fail in -A on platforms that don't support ECC * Add optional support for LDNS, a BSD licensed DNS resolver library which supports DNSSEC * Relax OpenSSL version check to allow running OpenSSH binaries on systems with OpenSSL libraries with a newer "fix" or "patch" level than the binaries were originally compiled on (previous check only allowed movement within "patch" releases). bz#1991 * Fix builds using contributed Redhat spec file. bz#1992 Changes since OpenSSH 5.8 ========================= Features: * Introduce sandboxing of the pre-auth privsep child using an optional sshd_config(5) "UsePrivilegeSeparation=sandbox" mode that enables mandatory restrictions on the syscalls the privsep child can perform. This intention is to prevent a compromised privsep child from being used to attack other hosts (by opening sockets and proxying) or probing local kernel attack surface. Three concrete sandbox implementation are provided (selected at configure time): systrace, seatbelt and rlimit. The systrace sandbox uses systrace(4) in unsupervised "fast-path" mode, where a list of permitted syscalls is supplied. Any syscall not on the list results in SIGKILL being sent to the privsep child. Note that this requires a kernel with the new SYSTR_POLICY_KILL option (only OpenBSD has this mode at present). The seatbelt sandbox uses OS X/Darwin sandbox(7) facilities with a strict (kSBXProfilePureComputation) policy that disables access to filesystem and network resources. The rlimit sandbox is a fallback choice for platforms that don't support a better one; it uses setrlimit() to reset the hard-limit of file descriptors and processes to zero, which should prevent the privsep child from forking or opening new network connections. Sandboxing of the privilege separated child process is currently experimental but should become the default in a future release. Native sandboxes for other platforms are welcome (e.g. Capsicum, Linux pid/net namespaces, etc.) * Add new SHA256-based HMAC transport integrity modes from http://www.ietf.org/id/draft-dbider-sha2-mac-for-ssh-02.txt These modes are hmac-sha2-256, hmac-sha2-256-96, hmac-sha2-512, and hmac-sha2-512-96, and are available by default in ssh(1) and sshd(8) * The pre-authentication sshd(8) privilege separation slave process now logs via a socket shared with the master process, avoiding the need to maintain /dev/log inside the chroot. * ssh(1) now warns when a server refuses X11 forwarding * sshd_config(5)'s AuthorizedKeysFile now accepts multiple paths, separated by whitespace. The undocumented AuthorizedKeysFile2 option is deprecated (though the default for AuthorizedKeysFile includes .ssh/authorized_keys2) * sshd_config(5): similarly deprecate UserKnownHostsFile2 and GlobalKnownHostsFile2 by making UserKnownHostsFile and GlobalKnownHostsFile accept multiple options and default to include known_hosts2 * Retain key comments when loading v.2 keys. These will be visible in "ssh-add -l" and other places. bz#439 * ssh(1) and sshd(8): set IPv6 traffic class from IPQoS (as well as IPv4 ToS/DSCP). bz#1855 * ssh_config(5)'s ControlPath option now expands %L to the host portion of the destination host name. * ssh_config(5) "Host" options now support negated Host matching, e.g. Host *.example.org !c.example.org User mekmitasdigoat Will match "a.example.org", "b.example.org", but not "c.example.org" * ssh_config(5): a new RequestTTY option provides control over when a TTY is requested for a connection, similar to the existing -t/-tt/-T ssh(1) commandline options. * sshd(8): allow GSSAPI authentication to detect when a server-side failure causes authentication failure and don't count such failures against MaxAuthTries; bz#1244 * ssh-keygen(1): Add -A option. For each of the key types (rsa1, rsa, dsa and ecdsa) for which host keys do not exist, generate the host keys with the default key file path, an empty passphrase, default bits for the key type, and default comment. This is useful for system initialisation scripts. * ssh(1): Allow graceful shutdown of multiplexing: request that a mux server removes its listener socket and refuse future multiplexing requests but don't kill existing connections. This may be requested using "ssh -O stop ..." * ssh-add(1) now accepts keys piped from standard input. E.g. "ssh-add - < /path/to/key" * ssh-keysign(8) now signs hostbased authentication challenges correctly using ECDSA keys; bz#1858 * sftp(1): document that sftp accepts square brackets to delimit addresses (useful for IPv6); bz#1847a * ssh(1): when using session multiplexing, the master process will change its process title to reflect the control path in use and when a ControlPersist-ed master is waiting to close; bz#1883 and bz#1911 * Other minor bugs fixed: 1849 1861 1862 1869 1875 1878 1879 1892 1900 1905 1913 Portable OpenSSH Bugfixes: * Fix a compilation error in the SELinux support code. bz#1851 * This release removes support for ssh-rand-helper. OpenSSH now obtains its random numbers directly from OpenSSL or from a PRNGd/EGD instance specified at configure time. * sshd(8) now resets the SELinux process execution context before executing passwd for password changes; bz#1891 * Since gcc >= 4.x ignores all -Wno-options options, test only the corresponding -W-option when trying to determine whether it is accepted; bz#1901 * Add ECDSA key generation to the Cygwin ssh-{host,user}-config scripts. * Updated .spec and init files for Linux; bz#1920 * Improved SELinux error messages in context change failures and suppress error messages when attempting to change from the "unconfined_t" type; bz#1924 bz#1919 * Fix build errors on platforms without dlopen(); bz#1929
Diffstat (limited to 'security')
-rw-r--r--security/openssh/Makefile22
-rw-r--r--security/openssh/distinfo63
-rw-r--r--security/openssh/options.mk24
-rw-r--r--security/openssh/patches/patch-Makefile.in24
-rw-r--r--security/openssh/patches/patch-ah22
-rw-r--r--security/openssh/patches/patch-ak31
-rw-r--r--security/openssh/patches/patch-atomicio.c5
-rw-r--r--security/openssh/patches/patch-auth-passwd.c (renamed from security/openssh/patches/patch-af)6
-rw-r--r--security/openssh/patches/patch-auth-rhosts.c (renamed from security/openssh/patches/patch-aj)6
-rw-r--r--security/openssh/patches/patch-auth.c15
-rw-r--r--security/openssh/patches/patch-auth1.c (renamed from security/openssh/patches/patch-al)10
-rw-r--r--security/openssh/patches/patch-auth2.c (renamed from security/openssh/patches/patch-am)8
-rw-r--r--security/openssh/patches/patch-config.h.in (renamed from security/openssh/patches/patch-ag)10
-rw-r--r--security/openssh/patches/patch-configure (renamed from security/openssh/patches/patch-aa)32
-rw-r--r--security/openssh/patches/patch-configure.ac (renamed from security/openssh/patches/patch-ab)28
-rw-r--r--security/openssh/patches/patch-defines.h (renamed from security/openssh/patches/patch-ac)8
-rw-r--r--security/openssh/patches/patch-includes.h (renamed from security/openssh/patches/patch-ae)8
-rw-r--r--security/openssh/patches/patch-loginrec.c (renamed from security/openssh/patches/patch-ad)18
-rw-r--r--security/openssh/patches/patch-openbsd-compat_bsd-openpty.c (renamed from security/openssh/patches/patch-au)6
-rw-r--r--security/openssh/patches/patch-openbsd-compat_openbsd-compat.h (renamed from security/openssh/patches/patch-ai)6
-rw-r--r--security/openssh/patches/patch-openbsd-compat_port-tun.c (renamed from security/openssh/patches/patch-aw)4
-rw-r--r--security/openssh/patches/patch-platform.c6
-rw-r--r--security/openssh/patches/patch-scp.c (renamed from security/openssh/patches/patch-an)10
-rw-r--r--security/openssh/patches/patch-session.c (renamed from security/openssh/patches/patch-ao)18
-rw-r--r--security/openssh/patches/patch-ssh.c (renamed from security/openssh/patches/patch-ap)8
-rw-r--r--security/openssh/patches/patch-sshd.c (renamed from security/openssh/patches/patch-av)26
-rw-r--r--security/openssh/patches/patch-sshpty.c (renamed from security/openssh/patches/patch-aq)6
-rw-r--r--security/openssh/patches/patch-uidswap.c (renamed from security/openssh/patches/patch-ar)14
28 files changed, 213 insertions, 231 deletions
diff --git a/security/openssh/Makefile b/security/openssh/Makefile
index c7ce546b7cb..19c4ab47c12 100644
--- a/security/openssh/Makefile
+++ b/security/openssh/Makefile
@@ -1,8 +1,7 @@
-# $NetBSD: Makefile,v 1.210 2013/02/06 23:23:40 jperkin Exp $
+# $NetBSD: Makefile,v 1.211 2013/05/01 19:58:25 imil Exp $
-DISTNAME= openssh-5.8p2
-PKGNAME= openssh-5.8.2
-PKGREVISION= 8
+DISTNAME= openssh-6.2p1
+PKGNAME= openssh-6.2.1
SVR4_PKGNAME= ossh
CATEGORIES= security
MASTER_SITES= ftp://ftp.openssh.com/pub/OpenBSD/OpenSSH/portable/ \
@@ -175,14 +174,6 @@ SUBST_MESSAGE.patch= More patch a file.
.include "../../security/openssl/buildlink3.mk"
.include "../../security/tcp_wrappers/buildlink3.mk"
-.if !empty(PKG_OPTIONS:Mldap)
-DOCDIR= ${PREFIX}/share/doc/openssh
-INSTALLATION_DIRS+= ${DOCDIR}
-
-pre-configure:
- cd ${WRKSRC} && autoconf
-.endif
-
#
# type of key "ecdsa" isn't always supported depends on OpenSSL.
#
@@ -205,12 +196,5 @@ post-install:
${INSTALL_DATA} ${WRKSRC}/contrib/sshd.pam.generic \
${DESTDIR}${EGDIR}/sshd.pam
.endif
-.if !empty(PKG_OPTIONS:Mldap)
- ${INSTALL_DATA} ${WRKSRC}/README.lpk \
- ${DESTDIR}${DOCDIR}
- cd ${WRKSRC}; for file in ${LPK_CONFS}; do \
- ${INSTALL_DATA} $${file} ${DESTDIR}${EGDIR}/$${file}; \
- done
-.endif
.include "../../mk/bsd.pkg.mk"
diff --git a/security/openssh/distinfo b/security/openssh/distinfo
index b67d334fa1a..8038986ef6e 100644
--- a/security/openssh/distinfo
+++ b/security/openssh/distinfo
@@ -1,34 +1,31 @@
-$NetBSD: distinfo,v 1.83 2012/07/20 14:17:23 fhajny Exp $
+$NetBSD: distinfo,v 1.84 2013/05/01 19:58:25 imil Exp $
-SHA1 (openssh-5.8p1-hpn13v11.diff.gz) = ea61ab71605ee867eebc1a92875a3ea5369e2d28
-RMD160 (openssh-5.8p1-hpn13v11.diff.gz) = 45fbb8e2db2f829f2749cd745ed6a0542adb1c45
-Size (openssh-5.8p1-hpn13v11.diff.gz) = 22993 bytes
-SHA1 (openssh-5.8p2.tar.gz) = 64798328d310e4f06c9f01228107520adbc8b3e5
-RMD160 (openssh-5.8p2.tar.gz) = f70cdb10983c389b1d6e52da522b9ff8256f1aff
-Size (openssh-5.8p2.tar.gz) = 1115475 bytes
-SHA1 (openssh-lpk-5.8p2-0.3.14.patch.gz) = 9eab90211363e6ea74e250d072cf14b69516bc0e
-RMD160 (openssh-lpk-5.8p2-0.3.14.patch.gz) = ca008e5c8c1f43be334f6e4e598d79d0153e94e5
-Size (openssh-lpk-5.8p2-0.3.14.patch.gz) = 18656 bytes
-SHA1 (patch-aa) = 59a39e53367983145e11150018a7f6f185df7bd5
-SHA1 (patch-ab) = 45ae7e91a00fc6d3fdb6cd6b91950d7aae58a55f
-SHA1 (patch-ac) = 7cd1129633649327f4f44cecc10b617c5cd34ec3
-SHA1 (patch-ad) = ce7c34a1810ad4f44be935c5479c53109a306d1d
-SHA1 (patch-ae) = 4ec1007b03d4bf28ddd1dcfdf2ec7c5295a69df5
-SHA1 (patch-af) = ca3224af0b648803404776a8c12ed678db4f8ff6
-SHA1 (patch-ag) = 0cdcc0f235119fb0603bb112492dd5ba66e6ad04
-SHA1 (patch-ah) = 0dad388fe5204ee6ca5d90ba1e684e18df38ccf1
-SHA1 (patch-ai) = becad6262e5daeef2a6db14097a8971c40088403
-SHA1 (patch-aj) = 5c89b4a7da59f05c50c16083aa6dd6e465cd0305
-SHA1 (patch-ak) = 00b594fec3c366ed134b7ced5c3bc3fcf7b56357
-SHA1 (patch-al) = ffd15b2ef3cb6b57419c0f6f1f4f795e497382d7
-SHA1 (patch-am) = 416471d27aedd44dc56007da46805d90f3d9957f
-SHA1 (patch-an) = 6a645978a04137fc104e863496a4d3a2ea1c6286
-SHA1 (patch-ao) = effe1720917a645452f1a7afd92588709355fb48
-SHA1 (patch-ap) = 48c92b26f64c682ed45cae3f8d20ec91815543ea
-SHA1 (patch-aq) = 1a7d8a4c5e70a0c6211247ba583534ed8ce317d0
-SHA1 (patch-ar) = a1099e0175a2b14f3b19db04261891179b1e3299
-SHA1 (patch-atomicio.c) = ff4cfc78c9f37d53e3b3be94d92beaf176adfdfc
-SHA1 (patch-au) = 6cfdfc531e2267017a15e66ea48c7ecfa2a3926f
-SHA1 (patch-av) = dd34ac767d08b989775add25c5c015a2f19fce5c
-SHA1 (patch-aw) = 22d873bfe56464ce8a978082ebce73d441f81e5d
-SHA1 (patch-platform.c) = fcbea87b04d07ef45af5380f9baa024fada9974f
+SHA1 (openssh-6.2p1-hpn13v14.diff) = 71bbd99961b8b7665a481cf0a4bc9604e55d75b3
+RMD160 (openssh-6.2p1-hpn13v14.diff) = b859fbdf4395534621cc5ffae0cce39621582927
+Size (openssh-6.2p1-hpn13v14.diff) = 61437 bytes
+SHA1 (openssh-6.2p1.tar.gz) = 8824708c617cc781b2bb29fa20bd905fd3d2a43d
+RMD160 (openssh-6.2p1.tar.gz) = 3651a43c8d466646e760cb1cbc9097dbba5151ca
+Size (openssh-6.2p1.tar.gz) = 1182181 bytes
+SHA1 (patch-Makefile.in) = 514edd12500e89059d3bda7f5ac8c651001fd7c6
+SHA1 (patch-atomicio.c) = 6bb3c3ca1491693918ce1ac7481e0852c90e0b4e
+SHA1 (patch-auth-passwd.c) = de9f5487fe1f5848cc702e549bce949fd75d70cd
+SHA1 (patch-auth-rhosts.c) = ab8dd3e375accc5bed3e15b158a85a1b1f9a2e3e
+SHA1 (patch-auth.c) = ee757e5c80a14398c4835a1c1502cdaa03ca8655
+SHA1 (patch-auth1.c) = 97693bbd970cf036892099493f0f64e59a252a35
+SHA1 (patch-auth2.c) = bb638fda90e80cd2f74702e01dc3320da01e4e80
+SHA1 (patch-config.h.in) = 805a5ba9be430a7123dc958d43c401d6f57d0bf5
+SHA1 (patch-configure) = d8977e444ffd2217229726161ebf0b5868d9f650
+SHA1 (patch-configure.ac) = b981b8b2e28edc4fa461c9c487f3f7e82412b826
+SHA1 (patch-defines.h) = e2aebe7dcf0927d8afcca7a96c4001a6e0130cc2
+SHA1 (patch-includes.h) = f7fad7b3599d677a5991b140c66e3a67bedbe13b
+SHA1 (patch-loginrec.c) = 0305a5b552c88ac99d8f894d3cda9686e0b0ccdd
+SHA1 (patch-openbsd-compat_bsd-openpty.c) = a1318cf691f0ad844a8761a77e3bb32a9e20c695
+SHA1 (patch-openbsd-compat_openbsd-compat.h) = 17690feb6962bd27fef96bd6fb1acfa60e9af9dc
+SHA1 (patch-openbsd-compat_port-tun.c) = 8288e2b9336ea1fcc1129d8a2ab5e55816b2ccbf
+SHA1 (patch-platform.c) = fcb85cca516d992ec50dfb259b9cc8ddbb032b5c
+SHA1 (patch-scp.c) = 0460cee3ad2626c71ce0a6e484fb4ed9ae559d1f
+SHA1 (patch-session.c) = aba585358f22db8b37b6673526af96765c65dc49
+SHA1 (patch-ssh.c) = eecce1698455567f9e48b498fe937d235890c315
+SHA1 (patch-sshd.c) = faf9ff468a0938e20f7cf18192c47dec46763e8c
+SHA1 (patch-sshpty.c) = 9f08f899919d05567998087a060b90800c2c7b11
+SHA1 (patch-uidswap.c) = 4c7c4e1621dc54a180bcba9a81d58f114a819eb0
diff --git a/security/openssh/options.mk b/security/openssh/options.mk
index b9d0eba7264..db53c0018e4 100644
--- a/security/openssh/options.mk
+++ b/security/openssh/options.mk
@@ -1,9 +1,9 @@
-# $NetBSD: options.mk,v 1.24 2013/01/11 12:41:16 jperkin Exp $
+# $NetBSD: options.mk,v 1.25 2013/05/01 19:58:25 imil Exp $
.include "../../mk/bsd.prefs.mk"
PKG_OPTIONS_VAR= PKG_OPTIONS.openssh
-PKG_SUPPORTED_OPTIONS= kerberos hpn-patch ldap pam
+PKG_SUPPORTED_OPTIONS= kerberos hpn-patch pam
.include "../../mk/bsd.options.mk"
@@ -16,8 +16,8 @@ CONFIGURE_ENV+= ac_cv_search_k_hasafs=no
.endif
.if !empty(PKG_OPTIONS:Mhpn-patch)
-PATCHFILES= openssh-5.8p1-hpn13v11.diff.gz
-PATCH_SITES= http://www.shatow.net/freebsd/
+PATCHFILES= openssh-6.2p1-hpn13v14.diff
+PATCH_SITES= ftp://ftp.NetBSD.org/pub/NetBSD/misc/imil/openssh/
PATCH_DIST_STRIP= -p1
.endif
@@ -28,19 +28,3 @@ PLIST_SRC+= ${.CURDIR}/PLIST.pam
MESSAGE_SRC+= ${.CURDIR}/MESSAGE.pam
MESSAGE_SUBST+= EGDIR=${EGDIR}
.endif
-
-.if !empty(PKG_OPTIONS:Mldap)
-.include "../../databases/openldap-client/buildlink3.mk"
-USE_TOOLS+= autoconf
-CONFIGURE_ARGS+= --with-ldap
-LPK_CONFS+= lpk-user-example.txt \
- openssh-lpk_openldap.schema \
- openssh-lpk_sun.schema
-PLIST_SRC+= ${.CURDIR}/PLIST.ldap
-
-LPK_VERS= 0.3.14
-OPENSSH_VERS= ${DISTNAME:S/openssh-//}
-PATCHFILES= openssh-lpk-${OPENSSH_VERS}-${LPK_VERS}.patch.gz
-PATCH_SITES= http://gentoo.mirrors.tera-byte.com/distfiles/
-PATCH_DIST_STRIP= -p1
-.endif
diff --git a/security/openssh/patches/patch-Makefile.in b/security/openssh/patches/patch-Makefile.in
new file mode 100644
index 00000000000..30e688f486c
--- /dev/null
+++ b/security/openssh/patches/patch-Makefile.in
@@ -0,0 +1,24 @@
+$NetBSD: patch-Makefile.in,v 1.1 2013/05/01 19:58:26 imil Exp $
+
+Removed install-sysconf as we handle that phase through post-install
+
+--- Makefile.in.orig 2013-03-07 15:37:13.000000000 +0000
++++ Makefile.in
+@@ -22,7 +22,7 @@ top_srcdir=@top_srcdir@
+ DESTDIR=
+ VPATH=@srcdir@
+ SSH_PROGRAM=@bindir@/ssh
+-ASKPASS_PROGRAM=$(libexecdir)/ssh-askpass
++#ASKPASS_PROGRAM=$(libexecdir)/ssh-askpass
+ SFTP_SERVER=$(libexecdir)/sftp-server
+ SSH_KEYSIGN=$(libexecdir)/ssh-keysign
+ SSH_PKCS11_HELPER=$(libexecdir)/ssh-pkcs11-helper
+@@ -242,7 +242,7 @@ distprep: catman-do
+ -rm -rf autom4te.cache
+
+ install: $(CONFIGFILES) $(MANPAGES) $(TARGETS) install-files install-sysconf host-key check-config
+-install-nokeys: $(CONFIGFILES) $(MANPAGES) $(TARGETS) install-files install-sysconf
++install-nokeys: $(CONFIGFILES) $(MANPAGES) $(TARGETS) install-files
+ install-nosysconf: $(CONFIGFILES) $(MANPAGES) $(TARGETS) install-files
+
+ check-config:
diff --git a/security/openssh/patches/patch-ah b/security/openssh/patches/patch-ah
deleted file mode 100644
index 7f4d82f936e..00000000000
--- a/security/openssh/patches/patch-ah
+++ /dev/null
@@ -1,22 +0,0 @@
-$NetBSD: patch-ah,v 1.29 2011/02/16 17:45:08 taca Exp $
-
---- Makefile.in.orig 2011-02-16 01:25:58.000000000 +0000
-+++ Makefile.in
-@@ -22,7 +22,7 @@ top_srcdir=@top_srcdir@
- DESTDIR=
- VPATH=@srcdir@
- SSH_PROGRAM=@bindir@/ssh
--ASKPASS_PROGRAM=$(libexecdir)/ssh-askpass
-+#ASKPASS_PROGRAM=$(libexecdir)/ssh-askpass
- SFTP_SERVER=$(libexecdir)/sftp-server
- SSH_KEYSIGN=$(libexecdir)/ssh-keysign
- SSH_PKCS11_HELPER=$(libexecdir)/ssh-pkcs11-helper
-@@ -243,7 +243,7 @@ distprep: catman-do
- -rm -rf autom4te.cache
-
- install: $(CONFIGFILES) ssh_prng_cmds.out $(MANPAGES) $(TARGETS) install-files install-sysconf host-key check-config
--install-nokeys: $(CONFIGFILES) ssh_prng_cmds.out $(MANPAGES) $(TARGETS) install-files install-sysconf
-+install-nokeys: $(CONFIGFILES) ssh_prng_cmds.out $(MANPAGES) $(TARGETS) install-files
- install-nosysconf: $(CONFIGFILES) ssh_prng_cmds.out $(MANPAGES) $(TARGETS) install-files
-
- check-config:
diff --git a/security/openssh/patches/patch-ak b/security/openssh/patches/patch-ak
deleted file mode 100644
index ebd69358492..00000000000
--- a/security/openssh/patches/patch-ak
+++ /dev/null
@@ -1,31 +0,0 @@
-$NetBSD: patch-ak,v 1.11 2011/02/16 17:45:08 taca Exp $
-
---- auth.c.orig 2010-12-01 01:21:51.000000000 +0000
-+++ auth.c
-@@ -391,7 +391,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) &&
-- ((st.st_uid != 0 && st.st_uid != pw->pw_uid) ||
-+ ((st.st_uid != ROOTUID && st.st_uid != pw->pw_uid) ||
- (st.st_mode & 022) != 0)) {
- logit("Authentication refused for %.100s: "
- "bad owner or modes for %.200s",
-@@ -453,7 +453,7 @@ secure_filename(FILE *f, const char *fil
-
- /* check the open file to avoid races */
- if (fstat(fileno(f), &st) < 0 ||
-- (st.st_uid != 0 && st.st_uid != uid) ||
-+ (st.st_uid != ROOTUID && st.st_uid != uid) ||
- (st.st_mode & 022) != 0) {
- snprintf(err, errlen, "bad ownership or modes for file %s",
- buf);
-@@ -470,7 +470,7 @@ secure_filename(FILE *f, const char *fil
-
- debug3("secure_filename: checking '%s'", buf);
- if (stat(buf, &st) < 0 ||
-- (st.st_uid != 0 && st.st_uid != uid) ||
-+ (st.st_uid != ROOTUID && st.st_uid != uid) ||
- (st.st_mode & 022) != 0) {
- snprintf(err, errlen,
- "bad ownership or modes for directory %s", buf);
diff --git a/security/openssh/patches/patch-atomicio.c b/security/openssh/patches/patch-atomicio.c
index 41465e370f1..da22b431915 100644
--- a/security/openssh/patches/patch-atomicio.c
+++ b/security/openssh/patches/patch-atomicio.c
@@ -1,7 +1,6 @@
-$NetBSD: patch-atomicio.c,v 1.1 2011/08/10 15:21:02 taca Exp $
+$NetBSD: patch-atomicio.c,v 1.2 2013/05/01 19:58:26 imil Exp $
-Avoid SSP side effect:
-http://mail-index.netbsd.org/source-changes/2011/08/01/msg025290.html
+Check for vwrite instead of read to avoid read being renamed by SSP issues
--- atomicio.c.orig 2010-09-24 12:15:11.000000000 +0000
+++ atomicio.c
diff --git a/security/openssh/patches/patch-af b/security/openssh/patches/patch-auth-passwd.c
index 8eb186e3542..653d7020d0a 100644
--- a/security/openssh/patches/patch-af
+++ b/security/openssh/patches/patch-auth-passwd.c
@@ -1,6 +1,8 @@
-$NetBSD: patch-af,v 1.10 2006/10/31 03:31:20 taca Exp $
+$NetBSD: patch-auth-passwd.c,v 1.1 2013/05/01 19:58:26 imil Exp $
---- auth-passwd.c.orig 2006-08-05 11:39:39.000000000 +0900
+Replace uid 0 with ROOTUID macro
+
+--- auth-passwd.c.orig 2012-04-25 23:51:28.000000000 +0000
+++ auth-passwd.c
@@ -87,7 +87,7 @@ auth_password(Authctxt *authctxt, const
#endif
diff --git a/security/openssh/patches/patch-aj b/security/openssh/patches/patch-auth-rhosts.c
index d9d31a4e589..31c71c2a93c 100644
--- a/security/openssh/patches/patch-aj
+++ b/security/openssh/patches/patch-auth-rhosts.c
@@ -1,6 +1,8 @@
-$NetBSD: patch-aj,v 1.8 2009/05/21 03:22:29 taca Exp $
+$NetBSD: patch-auth-rhosts.c,v 1.1 2013/05/01 19:58:26 imil Exp $
---- auth-rhosts.c.orig 2008-06-14 08:01:25.000000000 +0900
+Replace uid 0 with ROOTUID macro
+
+--- auth-rhosts.c.orig 2010-03-07 12:05:17.000000000 +0000
+++ auth-rhosts.c
@@ -230,7 +230,7 @@ auth_rhosts2_raw(struct passwd *pw, cons
return 0;
diff --git a/security/openssh/patches/patch-auth.c b/security/openssh/patches/patch-auth.c
new file mode 100644
index 00000000000..011008fd310
--- /dev/null
+++ b/security/openssh/patches/patch-auth.c
@@ -0,0 +1,15 @@
+$NetBSD: patch-auth.c,v 1.1 2013/05/01 19:58:26 imil Exp $
+
+Replace uid 0 with ROOTUID macro
+
+--- auth.c.orig 2013-03-12 00:31:05.000000000 +0000
++++ auth.c
+@@ -385,7 +385,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) &&
+- ((st.st_uid != 0 && st.st_uid != pw->pw_uid) ||
++ ((st.st_uid != ROOTUID && st.st_uid != pw->pw_uid) ||
+ (st.st_mode & 022) != 0)) {
+ logit("Authentication refused for %.100s: "
+ "bad owner or modes for %.200s",
diff --git a/security/openssh/patches/patch-al b/security/openssh/patches/patch-auth1.c
index f4432c8b4ed..1fe8e3b7a0e 100644
--- a/security/openssh/patches/patch-al
+++ b/security/openssh/patches/patch-auth1.c
@@ -1,8 +1,10 @@
-$NetBSD: patch-al,v 1.9 2010/02/18 08:04:35 martti Exp $
+$NetBSD: patch-auth1.c,v 1.1 2013/05/01 19:58:26 imil Exp $
---- auth1.c.orig 2008-07-09 19:54:05.000000000 +0900
+Replace uid 0 with ROOTUID macro
+
+--- auth1.c.orig 2012-12-02 22:53:20.000000000 +0000
+++ auth1.c
-@@ -320,7 +320,7 @@ do_authloop(Authctxt *authctxt)
+@@ -321,7 +321,7 @@ do_authloop(Authctxt *authctxt)
#ifndef HAVE_CYGWIN
/* Special handling for root */
@@ -11,7 +13,7 @@ $NetBSD: patch-al,v 1.9 2010/02/18 08:04:35 martti Exp $
!auth_root_allowed(meth->name)) {
authenticated = 0;
# ifdef SSH_AUDIT_EVENTS
-@@ -418,8 +418,8 @@ do_authentication(Authctxt *authctxt)
+@@ -425,8 +425,8 @@ do_authentication(Authctxt *authctxt)
* If we are not running as root, the user must have the same uid as
* the server.
*/
diff --git a/security/openssh/patches/patch-am b/security/openssh/patches/patch-auth2.c
index 51d9ea7c932..6e1a46d4e52 100644
--- a/security/openssh/patches/patch-am
+++ b/security/openssh/patches/patch-auth2.c
@@ -1,9 +1,11 @@
-$NetBSD: patch-am,v 1.9 2011/02/16 17:45:08 taca Exp $
+$NetBSD: patch-auth2.c,v 1.1 2013/05/01 19:58:26 imil Exp $
---- auth2.c.orig 2011-02-16 01:25:58.000000000 +0000
+Replace uid 0 with ROOTUID macro
+
+--- auth2.c.orig 2012-12-02 22:53:20.000000000 +0000
+++ auth2.c
@@ -307,7 +307,7 @@ userauth_finish(Authctxt *authctxt, int
- authctxt->user);
+ fatal("INTERNAL ERROR: authenticated and postponed");
/* Special handling for root */
- if (authenticated && authctxt->pw->pw_uid == 0 &&
diff --git a/security/openssh/patches/patch-ag b/security/openssh/patches/patch-config.h.in
index ea9ccaf211f..025354a2354 100644
--- a/security/openssh/patches/patch-ag
+++ b/security/openssh/patches/patch-config.h.in
@@ -1,8 +1,10 @@
-$NetBSD: patch-ag,v 1.14 2011/02/16 17:45:08 taca Exp $
+$NetBSD: patch-config.h.in,v 1.1 2013/05/01 19:58:26 imil Exp $
---- config.h.in.orig 2011-02-04 00:59:51.000000000 +0000
+Added Interix and define new path to if_tun.h
+
+--- config.h.in.orig 2013-03-21 23:38:18.000000000 +0000
+++ config.h.in
-@@ -533,6 +533,9 @@
+@@ -561,6 +561,9 @@
/* define if you have int64_t data type */
#undef HAVE_INT64_T
@@ -12,7 +14,7 @@ $NetBSD: patch-ag,v 1.14 2011/02/16 17:45:08 taca Exp $
/* Define to 1 if you have the <inttypes.h> header file. */
#undef HAVE_INTTYPES_H
-@@ -659,6 +662,9 @@
+@@ -699,6 +702,9 @@
/* Define to 1 if you have the <net/if_tun.h> header file. */
#undef HAVE_NET_IF_TUN_H
diff --git a/security/openssh/patches/patch-aa b/security/openssh/patches/patch-configure
index ed902642d42..2782ef6cfaf 100644
--- a/security/openssh/patches/patch-aa
+++ b/security/openssh/patches/patch-configure
@@ -1,8 +1,10 @@
-$NetBSD: patch-aa,v 1.48 2011/02/16 17:45:08 taca Exp $
+$NetBSD: patch-configure,v 1.1 2013/05/01 19:58:26 imil Exp $
---- configure.orig 2010-04-16 03:17:11.000000000 +0300
-+++ configure 2010-06-09 21:30:29.000000000 +0300
-@@ -5665,6 +5665,9 @@
+Various fixes regarding portability
+
+--- configure.orig 2013-03-21 23:38:28.000000000 +0000
++++ configure
+@@ -5993,6 +5993,9 @@ if test "${with_rpath+set}" = set; then
fi
@@ -12,7 +14,7 @@ $NetBSD: patch-aa,v 1.48 2011/02/16 17:45:08 taca Exp $
# Allow user to specify flags
# Check whether --with-cflags was given.
-@@ -5810,6 +5813,7 @@
+@@ -6076,6 +6079,7 @@ for ac_header in \
maillock.h \
ndir.h \
net/if_tun.h \
@@ -20,7 +22,7 @@ $NetBSD: patch-aa,v 1.48 2011/02/16 17:45:08 taca Exp $
netdb.h \
netgroup.h \
pam/pam_appl.h \
-@@ -7660,6 +7664,36 @@
+@@ -6786,6 +6790,36 @@ $as_echo "#define HAVE_SECUREWARE 1" >>c
;;
esac
;;
@@ -57,30 +59,28 @@ $NetBSD: patch-aa,v 1.48 2011/02/16 17:45:08 taca Exp $
*-*-irix5*)
PATH="$PATH:/usr/etc"
-@@ -8226,7 +8260,7 @@
- _ACEOF
+@@ -6987,7 +7021,7 @@ fi
+ $as_echo "#define SSH_TUN_PREPEND_AF 1" >>confdefs.h
;;
-*-*-freebsd*)
+*-*-freebsd*|*-*-dragonfly*)
check_for_libcrypt_later=1
- cat >>confdefs.h <<\_ACEOF
-@@ -29573,14 +29607,20 @@
+ $as_echo "#define LOCKED_PASSWD_PREFIX \"*LOCKED*\"" >>confdefs.h
+@@ -17033,12 +17067,18 @@ fi
rm -f core conftest.err 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 <<\_ACEOF
+- $as_echo "#define DISABLE_WTMPX 1" >>confdefs.h
+-
+ 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 <<\_ACEOF
- #define DISABLE_WTMPX 1
- _ACEOF
--
++ $as_echo "#define DISABLE_WTMPX 1" >>confdefs.h
+ fi
fi
-else
@@ -92,7 +92,7 @@ $NetBSD: patch-aa,v 1.48 2011/02/16 17:45:08 taca Exp $
#define CONF_WTMPX_FILE "$conf_wtmpx_location"
_ACEOF
-@@ -30888,7 +30930,7 @@
+@@ -18441,7 +18481,7 @@ echo "OpenSSH has been configured with t
echo " User binaries: $B"
echo " System binaries: $C"
echo " Configuration files: $D"
diff --git a/security/openssh/patches/patch-ab b/security/openssh/patches/patch-configure.ac
index c895b1920db..891123a925e 100644
--- a/security/openssh/patches/patch-ab
+++ b/security/openssh/patches/patch-configure.ac
@@ -1,8 +1,10 @@
-$NetBSD: patch-ab,v 1.30 2011/02/16 17:45:08 taca Exp $
+$NetBSD: patch-configure.ac,v 1.1 2013/05/01 19:58:26 imil Exp $
---- configure.ac.orig 2010-04-10 15:58:01.000000000 +0300
-+++ configure.ac 2010-06-09 21:32:22.000000000 +0300
-@@ -191,6 +191,9 @@
+Various fixes regarding portability
+
+--- configure.ac.orig 2013-03-20 01:55:15.000000000 +0000
++++ configure.ac
+@@ -241,6 +241,9 @@ AC_ARG_WITH([rpath],
]
)
@@ -10,9 +12,9 @@ $NetBSD: patch-ab,v 1.30 2011/02/16 17:45:08 taca Exp $
+need_dash_r=
+
# Allow user to specify flags
- AC_ARG_WITH(cflags,
+ AC_ARG_WITH([cflags],
[ --with-cflags Specify additional flags to pass to compiler],
-@@ -258,6 +261,7 @@
+@@ -309,6 +312,7 @@ AC_CHECK_HEADERS([ \
maillock.h \
ndir.h \
net/if_tun.h \
@@ -20,7 +22,7 @@ $NetBSD: patch-ab,v 1.30 2011/02/16 17:45:08 taca Exp $
netdb.h \
netgroup.h \
pam/pam_appl.h \
-@@ -541,6 +545,15 @@
+@@ -603,6 +607,15 @@ main() { if (NSVersionOfRunTimeLibrary("
;;
esac
;;
@@ -35,12 +37,12 @@ $NetBSD: patch-ab,v 1.30 2011/02/16 17:45:08 taca Exp $
+ ;;
*-*-irix5*)
PATH="$PATH:/usr/etc"
- AC_DEFINE(BROKEN_INET_NTOA, 1,
-@@ -4106,9 +4119,17 @@
- )
+ AC_DEFINE([BROKEN_INET_NTOA], [1],
+@@ -4460,9 +4473,17 @@ AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
+ ])
if test -z "$conf_wtmpx_location"; then
if test x"$system_wtmpx_path" = x"no" ; then
-- AC_DEFINE(DISABLE_WTMPX)
+- AC_DEFINE([DISABLE_WTMPX])
+ for f in /var/log/wtmpx; do
+ if test -f $f ; then
+ conf_wtmpx_location=$f
@@ -53,10 +55,10 @@ $NetBSD: patch-ab,v 1.30 2011/02/16 17:45:08 taca Exp $
-else
+fi
+if test -n "$conf_wtmpx_location"; then
- AC_DEFINE_UNQUOTED(CONF_WTMPX_FILE, "$conf_wtmpx_location",
+ AC_DEFINE_UNQUOTED([CONF_WTMPX_FILE], ["$conf_wtmpx_location"],
[Define if you want to specify the path to your wtmpx file])
fi
-@@ -4156,7 +4177,7 @@
+@@ -4547,7 +4568,7 @@ echo "OpenSSH has been configured with t
echo " User binaries: $B"
echo " System binaries: $C"
echo " Configuration files: $D"
diff --git a/security/openssh/patches/patch-ac b/security/openssh/patches/patch-defines.h
index 500fb15e0ff..dcc7b09031b 100644
--- a/security/openssh/patches/patch-ac
+++ b/security/openssh/patches/patch-defines.h
@@ -1,6 +1,8 @@
-$NetBSD: patch-ac,v 1.19 2011/02/16 17:45:08 taca Exp $
+$NetBSD: patch-defines.h,v 1.1 2013/05/01 19:58:26 imil Exp $
---- defines.h.orig 2011-01-17 10:15:31.000000000 +0000
+Define ROOTUID, UTMPX_FILE and WTMPX_FILE
+
+--- defines.h.orig 2013-03-07 09:06:13.000000000 +0000
+++ defines.h
@@ -30,6 +30,15 @@
@@ -18,7 +20,7 @@ $NetBSD: patch-ac,v 1.19 2011/02/16 17:45:08 taca Exp $
#if defined(HAVE_DECL_SHUT_RD) && HAVE_DECL_SHUT_RD == 0
enum
{
-@@ -698,6 +707,24 @@ struct winsize {
+@@ -695,6 +704,24 @@ struct winsize {
# endif
# endif
#endif
diff --git a/security/openssh/patches/patch-ae b/security/openssh/patches/patch-includes.h
index 99bd65966d3..f2c0374e2c9 100644
--- a/security/openssh/patches/patch-ae
+++ b/security/openssh/patches/patch-includes.h
@@ -1,7 +1,9 @@
-$NetBSD: patch-ae,v 1.13 2010/02/19 10:17:33 martti Exp $
+$NetBSD: patch-includes.h,v 1.1 2013/05/01 19:58:26 imil Exp $
---- includes.h.orig 2009-08-20 09:16:01.000000000 +0300
-+++ includes.h 2010-02-19 12:07:37.000000000 +0200
+Interix support
+
+--- includes.h.orig 2013-02-22 22:12:24.000000000 +0000
++++ includes.h
@@ -124,6 +124,10 @@
#ifdef HAVE_READPASSPHRASE_H
# include <readpassphrase.h>
diff --git a/security/openssh/patches/patch-ad b/security/openssh/patches/patch-loginrec.c
index 469a7121c76..7174741255a 100644
--- a/security/openssh/patches/patch-ad
+++ b/security/openssh/patches/patch-loginrec.c
@@ -1,8 +1,10 @@
-$NetBSD: patch-ad,v 1.15 2011/02/16 17:45:08 taca Exp $
+$NetBSD: patch-loginrec.c,v 1.1 2013/05/01 19:58:26 imil Exp $
---- loginrec.c.orig 2011-01-17 10:15:31.000000000 +0000
+Interix support and related fixes
+
+--- loginrec.c.orig 2013-02-22 22:12:24.000000000 +0000
+++ loginrec.c
-@@ -433,8 +433,8 @@ login_set_addr(struct logininfo *li, con
+@@ -429,8 +429,8 @@ login_set_addr(struct logininfo *li, con
int
login_write(struct logininfo *li)
{
@@ -13,7 +15,7 @@ $NetBSD: patch-ad,v 1.15 2011/02/16 17:45:08 taca Exp $
logit("Attempt to write login records by non-root user (aborting)");
return (1);
}
-@@ -442,7 +442,7 @@ login_write(struct logininfo *li)
+@@ -438,7 +438,7 @@ login_write(struct logininfo *li)
/* set the timestamp */
login_set_current_time(li);
@@ -22,7 +24,7 @@ $NetBSD: patch-ad,v 1.15 2011/02/16 17:45:08 taca Exp $
syslogin_write_entry(li);
#endif
#ifdef USE_LASTLOG
-@@ -626,7 +626,7 @@ line_abbrevname(char *dst, const char *s
+@@ -622,7 +622,7 @@ line_abbrevname(char *dst, const char *s
** into account.
**/
@@ -31,7 +33,7 @@ $NetBSD: patch-ad,v 1.15 2011/02/16 17:45:08 taca Exp $
/* build the utmp structure */
void
-@@ -763,10 +763,6 @@ construct_utmpx(struct logininfo *li, st
+@@ -759,10 +759,6 @@ construct_utmpx(struct logininfo *li, st
set_utmpx_time(li, utx);
utx->ut_pid = li->pid;
@@ -42,7 +44,7 @@ $NetBSD: patch-ad,v 1.15 2011/02/16 17:45:08 taca Exp $
if (li->type == LTYPE_LOGOUT)
return;
-@@ -775,6 +771,8 @@ construct_utmpx(struct logininfo *li, st
+@@ -771,6 +767,8 @@ construct_utmpx(struct logininfo *li, st
* for logouts.
*/
@@ -51,7 +53,7 @@ $NetBSD: patch-ad,v 1.15 2011/02/16 17:45:08 taca Exp $
# ifdef HAVE_HOST_IN_UTMPX
strncpy(utx->ut_host, li->hostname,
MIN_SIZEOF(utx->ut_host, li->hostname));
-@@ -1410,7 +1408,7 @@ wtmpx_get_entry(struct logininfo *li)
+@@ -1406,7 +1404,7 @@ wtmpx_get_entry(struct logininfo *li)
** Low-level libutil login() functions
**/
diff --git a/security/openssh/patches/patch-au b/security/openssh/patches/patch-openbsd-compat_bsd-openpty.c
index 8f981492ab3..2d706e37602 100644
--- a/security/openssh/patches/patch-au
+++ b/security/openssh/patches/patch-openbsd-compat_bsd-openpty.c
@@ -1,6 +1,8 @@
-$NetBSD: patch-au,v 1.3 2006/10/31 03:31:20 taca Exp $
+$NetBSD: patch-openbsd-compat_bsd-openpty.c,v 1.1 2013/05/01 19:58:26 imil Exp $
---- openbsd-compat/bsd-openpty.c.orig 2006-08-24 18:52:30.000000000 +0900
+Interix support
+
+--- openbsd-compat/bsd-openpty.c.orig 2006-08-24 09:52:30.000000000 +0000
+++ openbsd-compat/bsd-openpty.c
@@ -121,15 +121,17 @@ openpty(int *amaster, int *aslave, char
return (-1);
diff --git a/security/openssh/patches/patch-ai b/security/openssh/patches/patch-openbsd-compat_openbsd-compat.h
index 8957e922c93..f2f7b417dbc 100644
--- a/security/openssh/patches/patch-ai
+++ b/security/openssh/patches/patch-openbsd-compat_openbsd-compat.h
@@ -1,6 +1,8 @@
-$NetBSD: patch-ai,v 1.10 2006/10/31 03:31:20 taca Exp $
+$NetBSD: patch-openbsd-compat_openbsd-compat.h,v 1.1 2013/05/01 19:58:26 imil Exp $
---- openbsd-compat/openbsd-compat.h.orig 2006-09-03 21:44:50.000000000 +0900
+strtoll() declaration
+
+--- openbsd-compat/openbsd-compat.h.orig 2013-02-15 01:20:42.000000000 +0000
+++ openbsd-compat/openbsd-compat.h
@@ -83,6 +83,10 @@ size_t strlcat(char *dst, const char *sr
int setenv(register const char *name, register const char *value, int rewrite);
diff --git a/security/openssh/patches/patch-aw b/security/openssh/patches/patch-openbsd-compat_port-tun.c
index e9f61310952..7945b5815e8 100644
--- a/security/openssh/patches/patch-aw
+++ b/security/openssh/patches/patch-openbsd-compat_port-tun.c
@@ -1,4 +1,6 @@
-$NetBSD: patch-aw,v 1.4 2011/02/16 17:45:09 taca Exp $
+$NetBSD: patch-openbsd-compat_port-tun.c,v 1.1 2013/05/01 19:58:26 imil Exp $
+
+if_tun.h can be found in net/tun
--- openbsd-compat/port-tun.c.orig 2010-08-10 02:47:42.000000000 +0000
+++ openbsd-compat/port-tun.c
diff --git a/security/openssh/patches/patch-platform.c b/security/openssh/patches/patch-platform.c
index a4f4b10a4f4..65c1a2c7680 100644
--- a/security/openssh/patches/patch-platform.c
+++ b/security/openssh/patches/patch-platform.c
@@ -1,8 +1,8 @@
-$NetBSD: patch-platform.c,v 1.1 2011/02/16 17:45:09 taca Exp $
+$NetBSD: patch-platform.c,v 1.2 2013/05/01 19:58:26 imil Exp $
-Fix for Interix.
+Interix support
---- platform.c.orig 2011-01-11 06:02:25.000000000 +0000
+--- platform.c.orig 2013-03-12 00:31:05.000000000 +0000
+++ platform.c
@@ -81,7 +81,9 @@ platform_privileged_uidswap(void)
/* uid 0 is not special on Cygwin so always try */
diff --git a/security/openssh/patches/patch-an b/security/openssh/patches/patch-scp.c
index 20e9e163732..49ce681868e 100644
--- a/security/openssh/patches/patch-an
+++ b/security/openssh/patches/patch-scp.c
@@ -1,6 +1,8 @@
-$NetBSD: patch-an,v 1.12 2011/02/16 17:45:08 taca Exp $
+$NetBSD: patch-scp.c,v 1.1 2013/05/01 19:58:26 imil Exp $
---- scp.c.orig 2011-02-16 01:25:58.000000000 +0000
+Interix support
+
+--- scp.c.orig 2013-03-20 01:55:15.000000000 +0000
+++ scp.c
@@ -477,7 +477,11 @@ main(int argc, char **argv)
argc -= optind;
@@ -14,7 +16,7 @@ $NetBSD: patch-an,v 1.12 2011/02/16 17:45:08 taca Exp $
fatal("unknown user %u", (u_int) userid);
if (!isatty(STDOUT_FILENO))
-@@ -877,8 +881,10 @@ rsource(char *name, struct stat *statp)
+@@ -881,8 +885,10 @@ rsource(char *name, struct stat *statp)
return;
}
while ((dp = readdir(dirp)) != NULL) {
@@ -25,7 +27,7 @@ $NetBSD: patch-an,v 1.12 2011/02/16 17:45:08 taca Exp $
if (!strcmp(dp->d_name, ".") || !strcmp(dp->d_name, ".."))
continue;
if (strlen(name) + 1 + strlen(dp->d_name) >= sizeof(path) - 1) {
-@@ -1275,7 +1281,9 @@ okname(char *cp0)
+@@ -1279,7 +1285,9 @@ okname(char *cp0)
case '\'':
case '"':
case '`':
diff --git a/security/openssh/patches/patch-ao b/security/openssh/patches/patch-session.c
index 5220250c6fc..b38a3874d5e 100644
--- a/security/openssh/patches/patch-ao
+++ b/security/openssh/patches/patch-session.c
@@ -1,12 +1,10 @@
-$NetBSD: patch-ao,v 1.17 2011/02/16 17:45:08 taca Exp $
+$NetBSD: patch-session.c,v 1.1 2013/05/01 19:58:26 imil Exp $
-One more replacing 0 with ROOTUID is handled by using SUBST framework
-because patch can't handle it when hpn-patch option is enabled.
-So, don't simply update this file with mkpatch command.
+Interix support
---- session.c.orig 2011-02-16 01:25:58.000000000 +0000
+--- session.c.orig 2013-03-15 00:22:37.000000000 +0000
+++ session.c
-@@ -1075,7 +1075,7 @@ read_etc_default_login(char ***env, u_in
+@@ -1081,7 +1081,7 @@ read_etc_default_login(char ***env, u_in
if (tmpenv == NULL)
return;
@@ -15,7 +13,7 @@ So, don't simply update this file with mkpatch command.
var = child_get_env(tmpenv, "SUPATH");
else
var = child_get_env(tmpenv, "PATH");
-@@ -1184,7 +1184,7 @@ do_setup_env(Session *s, const char *she
+@@ -1190,7 +1190,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",
@@ -24,7 +22,7 @@ So, don't simply update this file with mkpatch command.
SUPERUSER_PATH : _PATH_STDPATH);
}
# endif /* HAVE_CYGWIN */
-@@ -1298,6 +1298,18 @@ do_setup_env(Session *s, const char *she
+@@ -1304,6 +1304,18 @@ do_setup_env(Session *s, const char *she
strcmp(pw->pw_dir, "/") ? pw->pw_dir : "");
read_environment_file(&env, &envsize, buf);
}
@@ -43,7 +41,7 @@ So, don't simply update this file with mkpatch command.
if (debug_flag) {
/* dump the environment */
fprintf(stderr, "Environment:\n");
-@@ -1488,11 +1500,13 @@ do_setusercontext(struct passwd *pw)
+@@ -1494,11 +1506,13 @@ do_setusercontext(struct passwd *pw)
perror("setgid");
exit(1);
}
@@ -57,7 +55,7 @@ So, don't simply update this file with mkpatch command.
endgrent();
#endif
-@@ -2305,7 +2319,7 @@ session_pty_cleanup2(Session *s)
+@@ -2313,7 +2327,7 @@ session_pty_cleanup2(Session *s)
record_logout(s->pid, s->tty, s->pw->pw_name);
/* Release the pseudo-tty. */
diff --git a/security/openssh/patches/patch-ap b/security/openssh/patches/patch-ssh.c
index 629c14445a6..c2f54eae7a9 100644
--- a/security/openssh/patches/patch-ap
+++ b/security/openssh/patches/patch-ssh.c
@@ -1,8 +1,10 @@
-$NetBSD: patch-ap,v 1.12 2011/02/16 17:45:08 taca Exp $
+$NetBSD: patch-ssh.c,v 1.1 2013/05/01 19:58:26 imil Exp $
---- ssh.c.orig 2011-02-16 01:25:58.000000000 +0000
+Interix support
+
+--- ssh.c.orig 2012-07-06 03:45:01.000000000 +0000
+++ ssh.c
-@@ -761,7 +761,7 @@ main(int ac, char **av)
+@@ -794,7 +794,7 @@ main(int ac, char **av)
if (ssh_connect(host, &hostaddr, options.port,
options.address_family, options.connection_attempts, &timeout_ms,
options.tcp_keep_alive,
diff --git a/security/openssh/patches/patch-av b/security/openssh/patches/patch-sshd.c
index 262c9fa0858..de927853f47 100644
--- a/security/openssh/patches/patch-av
+++ b/security/openssh/patches/patch-sshd.c
@@ -1,8 +1,10 @@
-$NetBSD: patch-av,v 1.10 2011/02/16 17:45:08 taca Exp $
+$NetBSD: patch-sshd.c,v 1.1 2013/05/01 19:58:27 imil Exp $
---- sshd.c.orig 2011-02-16 01:25:58.000000000 +0000
+Interix support
+
+--- sshd.c.orig 2013-02-12 00:04:48.000000000 +0000
+++ sshd.c
-@@ -239,7 +239,11 @@ int *startup_pipes = NULL;
+@@ -237,7 +237,11 @@ int *startup_pipes = NULL;
int startup_pipe; /* in child */
/* variables used for privilege separation */
@@ -12,9 +14,9 @@ $NetBSD: patch-av,v 1.10 2011/02/16 17:45:08 taca Exp $
+int use_privsep = 0;
+#endif
struct monitor *pmonitor = NULL;
+ int privsep_is_preauth = 1;
- /* global authentication context */
-@@ -618,10 +622,15 @@ privsep_preauth_child(void)
+@@ -625,10 +629,15 @@ privsep_preauth_child(void)
/* XXX not ready, too heavy after chroot */
do_setusercontext(privsep_pw);
#else
@@ -30,16 +32,16 @@ $NetBSD: patch-av,v 1.10 2011/02/16 17:45:08 taca Exp $
#endif
}
-@@ -661,7 +670,7 @@ privsep_preauth(Authctxt *authctxt)
- close(pmonitor->m_sendfd);
+@@ -688,7 +697,7 @@ privsep_preauth(Authctxt *authctxt)
+ set_log_handler(mm_log_handler, pmonitor);
/* Demote the child */
- if (getuid() == 0 || geteuid() == 0)
+ if (getuid() == ROOTUID || geteuid() == ROOTUID)
privsep_preauth_child();
setproctitle("%s", "[net]");
- }
-@@ -676,7 +685,7 @@ privsep_postauth(Authctxt *authctxt)
+ if (box != NULL)
+@@ -706,7 +715,7 @@ privsep_postauth(Authctxt *authctxt)
#ifdef DISABLE_FD_PASSING
if (1) {
#else
@@ -48,7 +50,7 @@ $NetBSD: patch-av,v 1.10 2011/02/16 17:45:08 taca Exp $
#endif
/* File descriptor passing is broken or root login */
use_privsep = 0;
-@@ -1335,8 +1344,10 @@ main(int ac, char **av)
+@@ -1363,8 +1372,10 @@ main(int ac, char **av)
av = saved_argv;
#endif
@@ -60,7 +62,7 @@ $NetBSD: patch-av,v 1.10 2011/02/16 17:45:08 taca Exp $
/* Ensure that fds 0, 1 and 2 are open or directed to /dev/null */
sanitise_stdfd();
-@@ -1690,7 +1701,7 @@ main(int ac, char **av)
+@@ -1732,7 +1743,7 @@ main(int ac, char **av)
(st.st_uid != getuid () ||
(st.st_mode & (S_IWGRP|S_IWOTH)) != 0))
#else
@@ -69,7 +71,7 @@ $NetBSD: patch-av,v 1.10 2011/02/16 17:45:08 taca Exp $
#endif
fatal("%s must be owned by root and not group or "
"world-writable.", _PATH_PRIVSEP_CHROOT_DIR);
-@@ -1714,8 +1725,10 @@ main(int ac, char **av)
+@@ -1755,8 +1766,10 @@ main(int ac, char **av)
* to create a file, and we can't control the code in every
* module which might be used).
*/
diff --git a/security/openssh/patches/patch-aq b/security/openssh/patches/patch-sshpty.c
index ed29d3f1d2a..d7d9c6efd1b 100644
--- a/security/openssh/patches/patch-aq
+++ b/security/openssh/patches/patch-sshpty.c
@@ -1,6 +1,8 @@
-$NetBSD: patch-aq,v 1.7 2009/05/21 03:22:29 taca Exp $
+$NetBSD: patch-sshpty.c,v 1.1 2013/05/01 19:58:27 imil Exp $
---- sshpty.c.orig 2009-02-12 10:19:21.000000000 +0900
+Replace uid 0 with ROOTUID macro
+
+--- sshpty.c.orig 2009-02-12 01:19:21.000000000 +0000
+++ sshpty.c
@@ -86,7 +86,7 @@ void
pty_release(const char *tty)
diff --git a/security/openssh/patches/patch-ar b/security/openssh/patches/patch-uidswap.c
index 3c6d715a04f..60f6d435c0a 100644
--- a/security/openssh/patches/patch-ar
+++ b/security/openssh/patches/patch-uidswap.c
@@ -1,6 +1,8 @@
-$NetBSD: patch-ar,v 1.8 2009/05/21 03:22:29 taca Exp $
+$NetBSD: patch-uidswap.c,v 1.1 2013/05/01 19:58:27 imil Exp $
---- uidswap.c.orig 2009-01-21 14:04:24.000000000 +0900
+Interix support
+
+--- uidswap.c.orig 2012-11-05 06:04:37.000000000 +0000
+++ uidswap.c
@@ -66,13 +66,13 @@ temporarily_use_uid(struct passwd *pw)
(u_int)pw->pw_uid, (u_int)pw->pw_gid,
@@ -42,7 +44,7 @@ $NetBSD: patch-ar,v 1.8 2009/05/21 03:22:29 taca Exp $
#ifndef SAVED_IDS_WORK_WITH_SETEUID
/* Propagate the privileged gid to all of our gids. */
if (setgid(getegid()) < 0)
-@@ -198,8 +202,10 @@ restore_uid(void)
+@@ -186,8 +190,10 @@ restore_uid(void)
setgid(getgid());
#endif /* SAVED_IDS_WORK_WITH_SETEUID */
@@ -53,7 +55,7 @@ $NetBSD: patch-ar,v 1.8 2009/05/21 03:22:29 taca Exp $
temporarily_use_uid_effective = 0;
}
-@@ -220,6 +226,10 @@ permanently_set_uid(struct passwd *pw)
+@@ -208,6 +214,10 @@ permanently_set_uid(struct passwd *pw)
debug("permanently_set_uid: %u/%u", (u_int)pw->pw_uid,
(u_int)pw->pw_gid);
@@ -61,10 +63,10 @@ $NetBSD: patch-ar,v 1.8 2009/05/21 03:22:29 taca Exp $
+ if (setuser(pw->pw_name, NULL, SU_COMPLETE))
+ fatal("setuser %u: %.100s", (u_int)pw->pw_gid, strerror(errno));
+#else
- #if defined(HAVE_SETRESGID) && !defined(BROKEN_SETRESGID)
if (setresgid(pw->pw_gid, pw->pw_gid, pw->pw_gid) < 0)
fatal("setresgid %u: %.100s", (u_int)pw->pw_gid, strerror(errno));
-@@ -278,6 +288,7 @@ permanently_set_uid(struct passwd *pw)
+
+@@ -244,6 +254,7 @@ permanently_set_uid(struct passwd *pw)
(setuid(old_uid) != -1 || seteuid(old_uid) != -1))
fatal("%s: was able to restore old [e]uid", __func__);
#endif