summaryrefslogtreecommitdiff
path: root/contrib/solaris
diff options
context:
space:
mode:
authorBen Lindstrom <mouring@eviladmin.org>2001-05-12 16:50:50 +0000
committerBen Lindstrom <mouring@eviladmin.org>2001-05-12 16:50:50 +0000
commit6ef3964c793f22dcbbfdac106cd5ead67a26bc2a (patch)
treeaa7b79a9cd2c6a41140af4880dcf42e8ac75530f /contrib/solaris
parentc93e84c2cecf2b968a069de595aff374abe89036 (diff)
downloadopenssh-git-6ef3964c793f22dcbbfdac106cd5ead67a26bc2a.tar.gz
- (bal) Patch to partial sync up contrib/solaris/ packaging software.
Patch by pete <ninjaz@webexpress.com>
Diffstat (limited to 'contrib/solaris')
-rwxr-xr-xcontrib/solaris/build-pkg22
-rw-r--r--contrib/solaris/postinstall.in40
-rw-r--r--contrib/solaris/prototype9
3 files changed, 65 insertions, 6 deletions
diff --git a/contrib/solaris/build-pkg b/contrib/solaris/build-pkg
index 76529ed4..fe92d9dd 100755
--- a/contrib/solaris/build-pkg
+++ b/contrib/solaris/build-pkg
@@ -145,21 +145,28 @@ mkdir -p ${BUILDDIR}/man/man1
mkdir -p ${BUILDDIR}/man/man8
mkdir -p ${BUILDDIR}/etc
mkdir -p ${BUILDDIR}/bin
+mkdir -p ${BUILDDIR}/libexec
mkdir -p ${BUILDDIR}/sbin
echo "Populating build directories..."
cp -p ../../../sshd sbin
cp -p ../../../ssh-keygen bin
+cp -p ../../../ssh-keyscan bin
cp -p ../../../ssh bin
cp -p ../../../ssh-add bin
cp -p ../../../ssh-agent bin
cp -p ../../../scp bin
-cp -p ../../../scp.1 man/man1/scp.1
-cp -p ../../../ssh-add.1 man/man1/ssh-add.1
-cp -p ../../../ssh-agent.1 man/man1/ssh-agent.1
-cp -p ../../../ssh-keygen.1 man/man1/ssh-keygen.1
-cp -p ../../../ssh.1 man/man1/ssh.1
-cp -p ../../../sshd.8 man/man8/sshd.8
+cp -p ../../../scp.1.out man/man1/scp.1
+cp -p ../../../sftp bin
+cp -p ../../../sftp.1.out man/man1/sftp.1
+cp -p ../../../sftp-server libexec/sftp-server
+cp -p ../../../sftp-server.8.out man/man8/sftp-server.8
+cp -p ../../../ssh-add.1.out man/man1/ssh-add.1
+cp -p ../../../ssh-agent.1.out man/man1/ssh-agent.1
+cp -p ../../../ssh-keygen.1.out man/man1/ssh-keygen.1
+cp -p ../../../ssh-keyscan.1.out man/man1/ssh-keyscan.1
+cp -p ../../../ssh.1.out man/man1/ssh.1
+cp -p ../../../sshd.8.out man/man8/sshd.8
cp -p ../../../sshd_config.out etc/sshd_config.default
cp -p ../../../ssh_config.out etc/ssh_config.default
cp -p ../../../ssh_prng_cmds etc/ssh_prng_cmds.default
@@ -182,8 +189,11 @@ ${STRIP} bin/ssh
${STRIP} bin/ssh-add
${STRIP} bin/ssh-agent
${STRIP} bin/ssh-keygen
+${STRIP} bin/ssh-keyscan
${STRIP} sbin/sshd
${STRIP} bin/scp
+${STRIP} bin/sftp
+${STRIP} libexec/sftp-server
echo ""
echo "Building Package"
diff --git a/contrib/solaris/postinstall.in b/contrib/solaris/postinstall.in
index 6f2c9b30..3ce3bf13 100644
--- a/contrib/solaris/postinstall.in
+++ b/contrib/solaris/postinstall.in
@@ -89,6 +89,26 @@ if [ ! "${UPDATE}" = "1" ]; then
else
echo "Using existing DSA public/private host key pair for SSH-2."
fi
+ if [ ! -f "${CONFDIR}/ssh_host_rsa_key" ]; then
+ echo "Creating new RSA public/private host key pair for SSH-2."
+ $INSTALLF $PKGINST ${CONFDIR}/ssh_host_rsa_key
+ $INSTALLF $PKGINST ${CONFDIR}/ssh_host_rsa_key.pub
+ ### If there is *anything* there then leave it, otherwise look
+ ### in some reasonable alternate locations before giving up.
+ ### It's worth spending some extra time looking for the old one
+ ### to avoid a bunch of "host identification has changed" warnings.
+ ### Note that some old keys from the commercial SSH2 might not
+ ### be compatible, but we don't test for that.
+ if [ -f "${PKG_INSTALL_ROOT}/etc/ssh_host_rsa_key" ]; then
+ mv ${PKG_INSTALL_ROOT}/etc/ssh_host_rsa_key ${CONFDIR}
+ elif [ -f "${PKG_INSTALL_ROOT}/usr/local/etc/ssh_host_rsa_key" ]; then
+ mv ${PKG_INSTALL_ROOT}/usr/local/etc/ssh_host_rsa_key ${CONFDIR}
+ else
+ ${DESTBIN}/ssh-keygen -t rsa -f ${CONFDIR}/ssh_host_rsa_key -N ''
+ fi
+ else
+ echo "Using existing RSA public/private host key pair for SSH-2."
+ fi
else
echo "Performing an \"update\" installation of OpenSSH."
### Okay, this part *is* an update install...so we need to ensure
@@ -178,6 +198,26 @@ else
else
echo "Using existing DSA public/private host key pair for SSH-2."
fi
+ if [ ! -f "${CONFDIR}/ssh_host_rsa_key" ]; then
+ echo "Creating new RSA public/private host key pair for SSH-2."
+ $INSTALLF $PKGINST ${CONFDIR}/ssh_host_rsa_key
+ $INSTALLF $PKGINST ${CONFDIR}/ssh_host_rsa_key.pub
+ ### If there is *anything* there then leave it, otherwise look
+ ### in some reasonable alternate locations before giving up.
+ ### It's worth spending some extra time looking for the old one
+ ### to avoid a bunch of "host identification has changed" warnings.
+ ### Note that some old keys from the commercial SSH2 might not
+ ### be compatible, but we don't test for that.
+ if [ -f "${PKG_INSTALL_ROOT}/etc/ssh_host_rsa_key" ]; then
+ mv ${PKG_INSTALL_ROOT}/etc/ssh_host_rsa_key ${CONFDIR}
+ elif [ -f "${PKG_INSTALL_ROOT}/usr/local/etc/ssh_host_rsa_key" ]; then
+ mv ${PKG_INSTALL_ROOT}/usr/local/etc/ssh_host_rsa_key ${CONFDIR}
+ else
+ ${DESTBIN}/ssh-keygen -d -f ${CONFDIR}/ssh_host_rsa_key -N ''
+ fi
+ else
+ echo "Using existing RSA public/private host key pair for SSH-2."
+ fi
fi
if [ ! -d %%PIDDIR%% ]; then
diff --git a/contrib/solaris/prototype b/contrib/solaris/prototype
index 422b4aa7..3c93f2c1 100644
--- a/contrib/solaris/prototype
+++ b/contrib/solaris/prototype
@@ -5,11 +5,15 @@ i preremove
d none man 0755 root sys
d none man/man1 0755 root sys
f none man/man1/scp.1 0644 root sys
+f none man/man1/sftp.1 0644 root sys
f none man/man1/ssh-add.1 0644 root sys
f none man/man1/ssh-agent.1 0644 root sys
f none man/man1/ssh-keygen.1 0644 root sys
+f none man/man1/ssh-keyscan.1 0644 root sys
f none man/man1/ssh.1 0644 root sys
+s none man/man1/slogin.1=ssh.1
d none man/man8 0755 root sys
+f none man/man8/sftp-server.8 0644 root sys
f none man/man8/sshd.8 0644 root sys
d none etc 0755 root sys
f none etc/sshd_config.default 0644 root sys
@@ -20,8 +24,13 @@ f none etc/sshd-initscript 0755 root sys
d none bin 0755 root sys
f none bin/ssh-keygen 0755 root sys
f none bin/ssh 0755 root sys
+s none bin/slogin=ssh 0755 root sys
f none bin/ssh-add 0755 root sys
f none bin/ssh-agent 0755 root sys
+f none bin/ssh-keyscan 0755 root sys
f none bin/scp 0755 root sys
+f none bin/sftp 0755 root sys
+d none libexec 0755 root sys
+f none libexec/sftp-server 0755 root sys
d none sbin 0755 root sys
f none sbin/sshd 0755 root sys