| |
@@ -47,7 +47,7 @@
|
| |
|
| |
# Do not forget to bump pam_ssh_agent_auth release if you rewind the main package release to 1
|
| |
%global openssh_ver 9.0p1
|
| |
- %global openssh_rel 10
|
| |
+ %global openssh_rel 11
|
| |
%global pam_ssh_agent_ver 0.10.4
|
| |
%global pam_ssh_agent_rel 7
|
| |
|
| |
@@ -74,6 +74,7 @@
|
| |
Source16: ssh-agent.service
|
| |
Source17: ssh-agent.socket
|
| |
Source19: openssh-server-systemd-sysusers.conf
|
| |
+ Source20: ssh-host-keys-perms.service
|
| |
|
| |
#https://bugzilla.mindrot.org/show_bug.cgi?id=2581
|
| |
Patch100: openssh-6.7p1-coverity.patch
|
| |
@@ -582,6 +583,12 @@
|
| |
install contrib/ssh-copy-id.1 $RPM_BUILD_ROOT%{_mandir}/man1/
|
| |
install -d -m711 ${RPM_BUILD_ROOT}/%{_datadir}/empty.sshd
|
| |
install -p -D -m 0644 %{SOURCE19} %{buildroot}%{_sysusersdir}/openssh-server.conf
|
| |
+ # Migration for Fedora 38 change to remove group ownership for standard host keys
|
| |
+ # See https://fedoraproject.org/wiki/Changes/SSHKeySignSuidBit
|
| |
+ # To be removed in Fedora 40
|
| |
+ install -m644 %{SOURCE20} $RPM_BUILD_ROOT/%{_unitdir}/ssh-host-keys-perms.service
|
| |
+ install -d -m755 $RPM_BUILD_ROOT/%{_unitdir}/sshd.service.wants.d/
|
| |
+ ln -s /%{_unitdir}/ssh-host-keys-perms.service $RPM_BUILD_ROOT/%{_unitdir}/sshd.service.wants.d/ssh-host-keys-perms.service
|
| |
|
| |
%if ! %{no_gnome_askpass}
|
| |
install contrib/gnome-ssh-askpass $RPM_BUILD_ROOT%{_libexecdir}/openssh/gnome-ssh-askpass
|
| |
@@ -608,11 +615,6 @@
|
| |
|
| |
%pre server
|
| |
%sysusers_create_compat %{SOURCE19}
|
| |
- # Migration scriptlet for Fedora 38/39
|
| |
- # We want to remove group ownership for standard host keys if they exist
|
| |
- test -f /etc/ssh/ssh_host_rsa_key && /usr/bin/chmod g-r /etc/ssh/ssh_host_rsa_key || :
|
| |
- test -f /etc/ssh/ssh_host_ecdsa_key && /usr/bin/chmod g-r /etc/ssh/ssh_host_ecdsa_key || :
|
| |
- test -f /etc/ssh/ssh_host_ed25519_key && /usr/bin/chmod g-r /etc/ssh/ssh_host_ed25519_key || :
|
| |
|
| |
%post server
|
| |
%systemd_post sshd.service sshd.socket
|
| |
@@ -699,6 +701,8 @@
|
| |
%attr(0644,root,root) %{_unitdir}/sshd-keygen@.service
|
| |
%attr(0644,root,root) %{_unitdir}/sshd-keygen.target
|
| |
%attr(0644,root,root) %{_sysusersdir}/openssh-server.conf
|
| |
+ %attr(0644,root,root) %{_unitdir}/ssh-host-keys-perms.service
|
| |
+ %attr(0755,root,root) %{_unitdir}/sshd.service.wants.d/ssh-host-keys-perms.service
|
| |
|
| |
%files keycat
|
| |
%doc HOWTO.ssh-keycat
|
| |
@@ -720,6 +724,9 @@
|
| |
%endif
|
| |
|
| |
%changelog
|
| |
+ * Wed Feb 22 2023 Timothée Ravier <tim@siosm.fr> - 9.0p1-11
|
| |
+ - Use a systemd unit to restore default host key permissions (rhbz#2172956)
|
| |
+
|
| |
* Fri Dec 02 2022 Dmitry Belyavskiy <dbelyavs@redhat.com> - 9.0p1-10
|
| |
- Restore upstream behaviour and default host key permissions (rhbz#2141272)
|
| |
|
| |
On traditional systems, don't we still need to chmod/chown the keys at update time though? Otherwise, sshd.service won't be able to restart after it's updated. Probably would be cleaner at this point to split the logic into a separate script and have both the systemd service and scriptlet call it.