Skip to content

Commit eb8231b

Browse files
authored
Merge pull request #405 from citrus-it/openssh
Openssh: Move to 64-bit, improve tests, cleanup patches.
2 parents b50ceae + 3cfd40a commit eb8231b

11 files changed

+117
-441
lines changed

build/openssh/build.sh

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -34,9 +34,9 @@ PKG=network/openssh
3434
SUMMARY="OpenSSH Client and utilities"
3535
DESC="OpenSSH Secure Shell protocol Client and associated Utilities"
3636

37-
BUILDARCH=32
38-
# Since we're only building 32-bit, don't bother with isaexec subdirs
39-
CONFIGURE_OPTS_32="
37+
BUILDARCH=64
38+
# Since we're only building 64-bit, don't bother with isaexec subdirs
39+
CONFIGURE_OPTS_64="
4040
--prefix=$PREFIX
4141
--sysconfdir=/etc/ssh
4242
--includedir=$PREFIX/include
@@ -63,18 +63,11 @@ CONFIGURE_OPTS="
6363
--with-solaris-projects
6464
"
6565

66-
CFLAGS+="-O2 "
66+
CFLAGS+="-O2 -g -fstack-check "
6767
CFLAGS+="-DPAM_ENHANCEMENT -DSET_USE_PAM -DPAM_BUGFIX -DDTRACE_SFTP "
6868
CFLAGS+="-I/usr/include/kerberosv5 -DKRB5_BUILD_FIX -DDISABLE_BANNER "
6969
CFLAGS+="-DDEPRECATE_SUNSSH_OPT -DOPTION_DEFAULT_VALUE -DSANDBOX_SOLARIS"
7070

71-
auto_reconf() {
72-
# This package needs a whack upside the head post-patches!
73-
pushd $TMPDIR/$BUILDDIR >/dev/null
74-
autoreconf -fi
75-
popd
76-
}
77-
7871
move_manpage() {
7972
local page=$1
8073
local old=$2
@@ -112,12 +105,19 @@ init
112105
download_source $PROG $PROG $VER
113106
move_manpages
114107
patch_source
115-
auto_reconf
108+
run_inbuild autoreconf -fi
116109
prep_build
117110
run_autoconf
118111
build
119112
install_smf network ssh.xml sshd
120-
run_testsuite tests
113+
114+
export TESTSUITE_FILTER='^ok |^test_|failed|^all tests'
115+
(
116+
# The test SSH daemon needs root privileges to properly access PAM
117+
# on OmniOS. Sudo does not work well enough so use pfexec here.
118+
export SUDO=pfexec
119+
run_testsuite tests
120+
)
121121

122122
# Remove the letter from VER for packaging
123123
VER=${VER//p/.}

build/openssh/patches/0012-Deprecate-SunSSH-compatible-server-options.patch

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ Subject: [PATCH 12/34] Deprecate SunSSH compatible server options
99
# server config (sshd_config) options. In internal testing we have discovered,
1010
# that this would bring too much trouble to the said administrators.
1111
# The probability of these options appearing in existing sshd_config files
12-
# is higher than initially though, because some of the options have been in
12+
# is higher than initially thought, because some of the options have been in
1313
# default sshd_config file for very long time. Also the consequence of
1414
# unknown server option is harsh - ssh service goes to maintenance mode
1515
# possible rendering the instance not accessible. For this reason we will

build/openssh/patches/0020-Compatibility-fix-for-ListenAddress.patch

Lines changed: 13 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,15 @@ fact will listen on both IPv4 and IPv6.
88
diff -pruN '--exclude=*.orig' openssh-7.6p1~/servconf.c openssh-7.6p1/servconf.c
99
--- openssh-7.6p1~/servconf.c 2017-11-22 12:16:10.881359013 +0000
1010
+++ openssh-7.6p1/servconf.c 2017-11-22 12:16:10.931424966 +0000
11-
@@ -768,11 +768,22 @@ process_queued_listen_addrs(ServerOption
11+
@@ -678,6 +841,7 @@
12+
process_queued_listen_addrs(ServerOptions *options)
13+
{
14+
u_int i;
15+
+ int v4port = 0;
16+
17+
if (options->num_ports == 0)
18+
options->ports[options->num_ports++] = SSH_DEFAULT_PORT;
19+
@@ -685,11 +849,25 @@
1220
options->address_family = AF_UNSPEC;
1321

1422
for (i = 0; i < options->num_queued_listens; i++) {
@@ -19,7 +27,10 @@ diff -pruN '--exclude=*.orig' openssh-7.6p1~/servconf.c openssh-7.6p1/servconf.c
1927
+ * on :: into a listener of unspecified AF (so it listens on
2028
+ * v4 too)
2129
+ */
22-
+ if (strcmp(options->queued_listen_addrs[i], "::") == 0) {
30+
+ if (!strcmp(options->queued_listen_addrs[i], "0.0.0.0"))
31+
+ v4port = options->queued_listen_ports[i];
32+
+ if (!strcmp(options->queued_listen_addrs[i], "::") &&
33+
+ options->queued_listen_ports[i] != v4port) {
2334
+ add_listen_addr(options, NULL,
2435
+ options->queued_listen_ports[i]);
2536
+ } else {

build/openssh/patches/0024-Add-with-key-dir-configure-option-to-place-SSH-host-.patch

Lines changed: 0 additions & 115 deletions
This file was deleted.

build/openssh/patches/0027-Set-default-sshd-options-based-on-etc-default-login.patch

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -7,13 +7,13 @@ diff -pruN '--exclude=*.orig' openssh-7.6p1~/pathnames.h openssh-7.6p1/pathnames
77
--- openssh-7.6p1~/pathnames.h 2017-11-22 12:16:11.028564589 +0000
88
+++ openssh-7.6p1/pathnames.h 2017-11-22 12:16:11.123678066 +0000
99
@@ -46,6 +46,7 @@
10-
#define _PATH_HOST_ED25519_KEY_FILE SSHKEYDIR "/ssh_host_ed25519_key"
11-
#define _PATH_HOST_RSA_KEY_FILE SSHKEYDIR "/ssh_host_rsa_key"
12-
#define _PATH_DH_MODULI SSHKEYDIR "/moduli"
10+
#define _PATH_HOST_ED25519_KEY_FILE SSHDIR "/ssh_host_ed25519_key"
11+
#define _PATH_HOST_RSA_KEY_FILE SSHDIR "/ssh_host_rsa_key"
12+
#define _PATH_DH_MODULI SSHDIR "/moduli"
1313
+#define _PATH_DEFAULT_LOGIN ETCDIR "/default/login"
14-
/* Backwards compatibility */
15-
#define _PATH_DH_PRIMES SSHDIR "/primes"
1614

15+
#ifndef _PATH_SSH_PROGRAM
16+
#define _PATH_SSH_PROGRAM "/usr/bin/ssh"
1717
diff -pruN '--exclude=*.orig' openssh-7.6p1~/servconf.c openssh-7.6p1/servconf.c
1818
--- openssh-7.6p1~/servconf.c 2017-11-22 12:16:10.931424966 +0000
1919
+++ openssh-7.6p1/servconf.c 2017-11-22 12:16:11.124233172 +0000

build/openssh/patches/0031-Restore-tcpwrappers-libwrap-support.patch

Lines changed: 0 additions & 151 deletions
This file was deleted.

0 commit comments

Comments
 (0)