summaryrefslogtreecommitdiffstats
path: root/contrib/suse
diff options
context:
space:
mode:
authorDamien Miller <djm@mindrot.org>2011-08-12 11:02:35 +1000
committerDamien Miller <djm@mindrot.org>2011-08-12 11:02:35 +1000
commit2db9977c061ff027bafa488c8e9afad505be773e (patch)
tree4135ffe03fea325a0890036f565fa5f102349e06 /contrib/suse
parent4d47ec9c892883b60b496335425b427a48498bbc (diff)
- (djm) [contrib/redhat/openssh.spec contrib/redhat/sshd.init]
[contrib/suse/openssh.spec contrib/suse/rc.sshd] Updated RHEL and SLES init scrips from imorgan AT nas.nasa.gov
Diffstat (limited to 'contrib/suse')
-rw-r--r--contrib/suse/openssh.spec16
-rw-r--r--contrib/suse/rc.sshd16
2 files changed, 7 insertions, 25 deletions
diff --git a/contrib/suse/openssh.spec b/contrib/suse/openssh.spec
index db0c127b..4621f548 100644
--- a/contrib/suse/openssh.spec
+++ b/contrib/suse/openssh.spec
@@ -28,11 +28,12 @@ Provides: ssh
# (Build[ing] Prereq[uisites] only work for RPM 2.95 and newer.)
# building prerequisites -- stuff for
# OpenSSL (openssl-devel),
-# TCP Wrappers (nkitb),
+# TCP Wrappers (tcpd-devel),
# and Gnome (glibdev, gtkdev, and gnlibsd)
#
BuildPrereq: openssl
-BuildPrereq: nkitb
+BuildPrereq: tcpd-devel
+BuildPrereq: zlib-devel
#BuildPrereq: glibdev
#BuildPrereq: gtkdev
#BuildPrereq: gnlibsd
@@ -177,15 +178,8 @@ rm -rf $RPM_BUILD_ROOT
/usr/sbin/useradd -r -o -g sshd -u %{sshd_uid} -s /bin/false -c "SSH Privilege Separation User" -d /var/lib/sshd sshd 2> /dev/null || :
%post
-if [ ! -f /etc/ssh/ssh_host_key -o ! -s /etc/ssh/ssh_host_key ]; then
- echo "Generating SSH RSA host key..."
- /usr/bin/ssh-keygen -t rsa -f /etc/ssh/ssh_host_rsa_key -N '' >&2
-fi
-if [ ! -f /etc/ssh/ssh_host_dsa_key -o ! -s /etc/ssh/ssh_host_dsa_key ]; then
- echo "Generating SSH DSA host key..."
- /usr/bin/ssh-keygen -t dsa -f /etc/ssh/ssh_host_dsa_key -N '' >&2
-fi
-%{fillup_and_insserv -n -s -y ssh sshd START_SSHD}
+/usr/bin/ssh-keygen -A
+%{fillup_and_insserv -n -y ssh sshd}
%run_permissions
%verifyscript
diff --git a/contrib/suse/rc.sshd b/contrib/suse/rc.sshd
index 4d4880d7..4a3bc41d 100644
--- a/contrib/suse/rc.sshd
+++ b/contrib/suse/rc.sshd
@@ -43,20 +43,8 @@ rc_reset
case "$1" in
start)
- if ! test -f /etc/ssh/ssh_host_key ; then
- echo Generating /etc/ssh/ssh_host_key.
- ssh-keygen -t rsa1 -f /etc/ssh/ssh_host_key -N ''
- fi
- if ! test -f /etc/ssh/ssh_host_dsa_key ; then
- echo Generating /etc/ssh/ssh_host_dsa_key.
-
- ssh-keygen -t dsa -f /etc/ssh/ssh_host_dsa_key -N ''
- fi
- if ! test -f /etc/ssh/ssh_host_rsa_key ; then
- echo Generating /etc/ssh/ssh_host_rsa_key.
-
- ssh-keygen -t rsa -f /etc/ssh/ssh_host_rsa_key -N ''
- fi
+ # Generate any missing host keys
+ ssh-keygen -A
echo -n "Starting SSH daemon"
## Start daemon with startproc(8). If this fails
## the echo return value is set appropriate.