Delete creatin sshd keys. After reboot it will be create in automate mode

This commit is contained in:
Alexander Kazancev 2012-04-28 23:42:12 +04:00
parent 4330ab1370
commit 38ca382f5e

View file

@ -54,7 +54,7 @@
Summary: OpenSSH free Secure Shell (SSH) implementation
Name: openssh
Version: 5.8p2
Release: %mkrel 2
Release: %mkrel 3
License: BSD
Group: Networking/Remote access
URL: http://www.openssh.com/
@ -557,64 +557,6 @@ rm -rf %{buildroot}
%_pre_useradd sshd /var/empty /bin/true
%post server
# do some key management; taken from the initscript
KEYGEN=/usr/bin/ssh-keygen
RSA1_KEY=/etc/ssh/ssh_host_key
RSA_KEY=/etc/ssh/ssh_host_rsa_key
DSA_KEY=/etc/ssh/ssh_host_dsa_key
do_rsa1_keygen() {
if [ ! -s $RSA1_KEY ]; then
echo -n "Generating SSH1 RSA host key... "
if $KEYGEN -q -t rsa1 -f $RSA1_KEY -C '' -N '' >&/dev/null; then
chmod 600 $RSA1_KEY
chmod 644 $RSA1_KEY.pub
echo "done"
echo
else
echo "failed"
echo
exit 1
fi
fi
}
do_rsa_keygen() {
if [ ! -s $RSA_KEY ]; then
echo "Generating SSH2 RSA host key... "
if $KEYGEN -q -t rsa -f $RSA_KEY -C '' -N '' >&/dev/null; then
chmod 600 $RSA_KEY
chmod 644 $RSA_KEY.pub
echo "done"
echo
else
echo "failed"
echo
exit 1
fi
fi
}
do_dsa_keygen() {
if [ ! -s $DSA_KEY ]; then
echo "Generating SSH2 DSA host key... "
if $KEYGEN -q -t dsa -f $DSA_KEY -C '' -N '' >&/dev/null; then
chmod 600 $DSA_KEY
chmod 644 $DSA_KEY.pub
echo "done"
echo
else
echo "failed"
echo
exit 1
fi
fi
}
do_rsa1_keygen
do_rsa_keygen
do_dsa_keygen
%_post_service sshd
%preun server
@ -796,7 +738,7 @@ fi
+ Revision: 491719
- fix #55951 (the openssh-server package needs openssl and makedev in Requires(post))
+ JĂŠrĂ´me Quelin <jquelin@mandriva.org>
+ Jérôme Quelin <jquelin@mandriva.org>
- reverting to bash, till all functions get fixed
- remove bashisms, switch to dash
@ -872,7 +814,7 @@ fi
- added audit support from openssh-5.0p1-1.fc9 (disabled for now, though it works)
- sync with fc9 (SendEnv AcceptEnv)
* Wed Apr 23 2008 GĂśtz Waschk <waschk@mandriva.org> 5.0p1-3mdv2009.0
* Wed Apr 23 2008 Götz Waschk <waschk@mandriva.org> 5.0p1-3mdv2009.0
+ Revision: 196921
- fix gssapi with DNS loadbalanced clusters
@ -893,7 +835,7 @@ fi
+ Revision: 190750
- security fix for CVE-2008-1483
+ Giuseppe Ghibò <ghibo@mandriva.com>
+ Giuseppe Ghibò <ghibo@mandriva.com>
- Move 2007.1 backports ssp flags to a more effective place in the building.
* Mon Mar 17 2008 Tomasz Pawel Gajc <tpg@mandriva.org> 4.7p1-7mdv2008.1
@ -941,7 +883,7 @@ fi
- dropped upstream chan_read_failed patch (P2)
- fixed build deps (edit-devel)
+ Giuseppe Ghibò <ghibo@mandriva.com>
+ Giuseppe Ghibò <ghibo@mandriva.com>
- Add conditional flags for 2007.1 and CD4.
+ Thierry Vignaud <tv@mandriva.org>
@ -1045,7 +987,7 @@ correct alternatives, with recent introduction of qt version of ssh-askpass ( se
package ).
- Nuke the old invalid buildrequires dependency for db1
* Tue Jul 04 2006 Per Řyvind Karlsen <pkarlsen@mandriva.com> 4.3p2-9mdv2007.0
* Tue Jul 04 2006 Per Øyvind Karlsen <pkarlsen@mandriva.com> 4.3p2-9mdv2007.0
- fix buildrequires
- fix macro-in-%%changelog