From 6ef3964c793f22dcbbfdac106cd5ead67a26bc2a Mon Sep 17 00:00:00 2001 From: Ben Lindstrom Date: Sat, 12 May 2001 16:50:50 +0000 Subject: - (bal) Patch to partial sync up contrib/solaris/ packaging software. Patch by pete --- contrib/solaris/build-pkg | 22 ++++++++++++++++------ contrib/solaris/postinstall.in | 40 ++++++++++++++++++++++++++++++++++++++++ contrib/solaris/prototype | 9 +++++++++ 3 files changed, 65 insertions(+), 6 deletions(-) (limited to 'contrib/solaris') diff --git a/contrib/solaris/build-pkg b/contrib/solaris/build-pkg index 76529ed48..fe92d9dda 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 6f2c9b303..3ce3bf13d 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 422b4aa77..3c93f2c1a 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 -- cgit v1.2.3