View | Details | Raw Unified | Return to bug 1920 | Differences between
and this patch

Collapse All | Expand All

(-)contrib/redhat/openssh.spec (-11 / +11 lines)
Lines 84-107 Link Here
84
%if %{build6x}
84
%if %{build6x}
85
PreReq: initscripts >= 5.00
85
PreReq: initscripts >= 5.00
86
%else
86
%else
87
PreReq: initscripts >= 5.20
87
Requires: initscripts >= 5.20
88
%endif
88
%endif
89
BuildPreReq: perl, openssl-devel, tcp_wrappers
89
BuildRequires: perl, openssl-devel, tcp_wrappers
90
BuildPreReq: /bin/login
90
BuildRequires: /bin/login
91
%if ! %{build6x}
91
%if ! %{build6x}
92
BuildPreReq: glibc-devel, pam
92
BuildPreReq: glibc-devel, pam
93
%else
93
%else
94
BuildPreReq: /usr/include/security/pam_appl.h
94
BuildRequires: /usr/include/security/pam_appl.h
95
%endif
95
%endif
96
%if ! %{no_x11_askpass}
96
%if ! %{no_x11_askpass}
97
BuildPreReq: /usr/include/X11/Xlib.h
97
BuildRequires: /usr/include/X11/Xlib.h
98
%endif
98
%endif
99
%if ! %{no_gnome_askpass}
99
%if ! %{no_gnome_askpass}
100
BuildPreReq: pkgconfig
100
BuildRequires: pkgconfig
101
%endif
101
%endif
102
%if %{kerberos5}
102
%if %{kerberos5}
103
BuildPreReq: krb5-devel
103
BuildRequires: krb5-devel
104
BuildPreReq: krb5-libs
104
BuildRequires: krb5-libs
105
%endif
105
%endif
106
106
107
%package clients
107
%package clients
Lines 114-120 Link Here
114
Summary: The OpenSSH server daemon.
114
Summary: The OpenSSH server daemon.
115
Group: System Environment/Daemons
115
Group: System Environment/Daemons
116
Obsoletes: ssh-server
116
Obsoletes: ssh-server
117
PreReq: openssh = %{version}-%{release}, chkconfig >= 0.9
117
Requires: openssh = %{version}-%{release}, chkconfig >= 0.9
118
%if ! %{build6x}
118
%if ! %{build6x}
119
Requires: /etc/pam.d/system-auth
119
Requires: /etc/pam.d/system-auth
120
%endif
120
%endif
Lines 712-718 Link Here
712
  it generates.
712
  it generates.
713
713
714
* Thu Oct  5 2000 Nalin Dahyabhai <nalin@redhat.com>
714
* Thu Oct  5 2000 Nalin Dahyabhai <nalin@redhat.com>
715
- Add BuildPreReq on /usr/include/security/pam_appl.h to be sure we always
715
- Add BuildRequires on /usr/include/security/pam_appl.h to be sure we always
716
  build PAM authentication in.
716
  build PAM authentication in.
717
- Try setting SSH_ASKPASS if gnome-ssh-askpass is installed.
717
- Try setting SSH_ASKPASS if gnome-ssh-askpass is installed.
718
- Clean out no-longer-used patches.
718
- Clean out no-longer-used patches.
Lines 721-727 Link Here
721
721
722
* Mon Oct  2 2000 Nalin Dahyabhai <nalin@redhat.com>
722
* Mon Oct  2 2000 Nalin Dahyabhai <nalin@redhat.com>
723
- Update x11-askpass to 1.0.2. (#17835)
723
- Update x11-askpass to 1.0.2. (#17835)
724
- Add BuildPreReqs for /bin/login and /usr/bin/rsh so that configure will
724
- Add BuildRequiress for /bin/login and /usr/bin/rsh so that configure will
725
  always find them in the right place. (#17909)
725
  always find them in the right place. (#17909)
726
- Set the default path to be the same as the one supplied by /bin/login, but
726
- Set the default path to be the same as the one supplied by /bin/login, but
727
  add /usr/X11R6/bin. (#17909)
727
  add /usr/X11R6/bin. (#17909)
(-)contrib/redhat/sshd.init (-64 / +7 lines)
Lines 22-91 Link Here
22
prog="sshd"
22
prog="sshd"
23
23
24
# Some functions to make the below more readable
24
# Some functions to make the below more readable
25
KEYGEN=/usr/bin/ssh-keygen
26
SSHD=/usr/sbin/sshd
25
SSHD=/usr/sbin/sshd
27
RSA1_KEY=/etc/ssh/ssh_host_key
28
RSA_KEY=/etc/ssh/ssh_host_rsa_key
29
DSA_KEY=/etc/ssh/ssh_host_dsa_key
30
PID_FILE=/var/run/sshd.pid
26
PID_FILE=/var/run/sshd.pid
31
27
32
do_rsa1_keygen() {
33
	if [ ! -s $RSA1_KEY ]; then
34
		echo -n $"Generating SSH1 RSA host key: "
35
		if $KEYGEN -q -t rsa1 -f $RSA1_KEY -C '' -N '' >&/dev/null; then
36
			chmod 600 $RSA1_KEY
37
			chmod 644 $RSA1_KEY.pub
38
			if [ -x /sbin/restorecon ]; then
39
			    /sbin/restorecon $RSA1_KEY.pub
40
			fi
41
			success $"RSA1 key generation"
42
			echo
43
		else
44
			failure $"RSA1 key generation"
45
			echo
46
			exit 1
47
		fi
48
	fi
49
}
50
51
do_rsa_keygen() {
52
	if [ ! -s $RSA_KEY ]; then
53
		echo -n $"Generating SSH2 RSA host key: "
54
		if $KEYGEN -q -t rsa -f $RSA_KEY -C '' -N '' >&/dev/null; then
55
			chmod 600 $RSA_KEY
56
			chmod 644 $RSA_KEY.pub
57
			if [ -x /sbin/restorecon ]; then
58
			    /sbin/restorecon $RSA_KEY.pub
59
			fi
60
			success $"RSA key generation"
61
			echo
62
		else
63
			failure $"RSA key generation"
64
			echo
65
			exit 1
66
		fi
67
	fi
68
}
69
70
do_dsa_keygen() {
71
	if [ ! -s $DSA_KEY ]; then
72
		echo -n $"Generating SSH2 DSA host key: "
73
		if $KEYGEN -q -t dsa -f $DSA_KEY -C '' -N '' >&/dev/null; then
74
			chmod 600 $DSA_KEY
75
			chmod 644 $DSA_KEY.pub
76
			if [ -x /sbin/restorecon ]; then
77
			    /sbin/restorecon $DSA_KEY.pub
78
			fi
79
			success $"DSA key generation"
80
			echo
81
		else
82
			failure $"DSA key generation"
83
			echo
84
			exit 1
85
		fi
86
	fi
87
}
88
89
do_restart_sanity_check()
28
do_restart_sanity_check()
90
{
29
{
91
	$SSHD -t
30
	$SSHD -t
Lines 99-107 Link Here
99
start()
38
start()
100
{
39
{
101
	# Create keys if necessary
40
	# Create keys if necessary
102
	do_rsa1_keygen
41
	/usr/bin/ssh-keygen -A
103
	do_rsa_keygen
42
	if [ -x /sbin/restorecon ]; then
104
	do_dsa_keygen
43
		/sbin/restorcon /etc/ssh/ssh_host_key.pub
44
		/sbin/restorcon /etc/ssh/ssh_host_rsa_key.pub
45
		/sbin/restorcon /etc/ssh/ssh_host_dsa_key.pub
46
		/sbin/restorcon /etc/ssh/ssh_host_ecdsa_key.pub
47
	fi
105
48
106
	echo -n $"Starting $prog:"
49
	echo -n $"Starting $prog:"
107
	$SSHD $OPTIONS && success || failure
50
	$SSHD $OPTIONS && success || failure

Return to bug 1920