Compare commits
6 commits
rawhide
...
sshkeysign
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
8e798e7b2b | ||
|
|
491cdfef4e | ||
|
|
ed50bbd490 | ||
|
|
c0531a76c6 | ||
|
|
467a2748c8 | ||
|
|
920144d13c |
4 changed files with 11 additions and 46 deletions
|
|
@ -1,31 +0,0 @@
|
||||||
diff -up openssh-8.2p1/authfile.c.keyperm openssh-8.2p1/authfile.c
|
|
||||||
--- openssh-8.2p1/authfile.c.keyperm 2020-02-14 01:40:54.000000000 +0100
|
|
||||||
+++ openssh-8.2p1/authfile.c 2020-02-17 11:55:12.841729758 +0100
|
|
||||||
@@ -31,6 +31,7 @@
|
|
||||||
|
|
||||||
#include <errno.h>
|
|
||||||
#include <fcntl.h>
|
|
||||||
+#include <grp.h>
|
|
||||||
#include <stdio.h>
|
|
||||||
#include <stdarg.h>
|
|
||||||
#include <stdlib.h>
|
|
||||||
@@ -101,7 +102,19 @@ sshkey_perm_ok(int fd, const char *filen
|
|
||||||
#ifdef HAVE_CYGWIN
|
|
||||||
if (check_ntsec(filename))
|
|
||||||
#endif
|
|
||||||
+
|
|
||||||
if ((st.st_uid == getuid()) && (st.st_mode & 077) != 0) {
|
|
||||||
+ if (st.st_mode & 040) {
|
|
||||||
+ struct group *gr;
|
|
||||||
+
|
|
||||||
+ if ((gr = getgrnam("ssh_keys")) && (st.st_gid == gr->gr_gid)) {
|
|
||||||
+ /* The only additional bit is read
|
|
||||||
+ * for ssh_keys group, which is fine */
|
|
||||||
+ if ((st.st_mode & 077) == 040 ) {
|
|
||||||
+ return 0;
|
|
||||||
+ }
|
|
||||||
+ }
|
|
||||||
+ }
|
|
||||||
error("@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@");
|
|
||||||
error("@ WARNING: UNPROTECTED PRIVATE KEY FILE! @");
|
|
||||||
error("@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@");
|
|
||||||
|
|
@ -1,2 +0,0 @@
|
||||||
#Type Name ID
|
|
||||||
g ssh_keys 101
|
|
||||||
21
openssh.spec
21
openssh.spec
|
|
@ -47,7 +47,7 @@
|
||||||
|
|
||||||
# Do not forget to bump pam_ssh_agent_auth release if you rewind the main package release to 1
|
# 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_ver 9.0p1
|
||||||
%global openssh_rel 8
|
%global openssh_rel 9
|
||||||
%global pam_ssh_agent_ver 0.10.4
|
%global pam_ssh_agent_ver 0.10.4
|
||||||
%global pam_ssh_agent_rel 7
|
%global pam_ssh_agent_rel 7
|
||||||
|
|
||||||
|
|
@ -73,7 +73,6 @@ Source13: sshd-keygen
|
||||||
Source15: sshd-keygen.target
|
Source15: sshd-keygen.target
|
||||||
Source16: ssh-agent.service
|
Source16: ssh-agent.service
|
||||||
Source17: ssh-agent.socket
|
Source17: ssh-agent.socket
|
||||||
Source18: openssh-systemd-sysusers.conf
|
|
||||||
Source19: openssh-server-systemd-sysusers.conf
|
Source19: openssh-server-systemd-sysusers.conf
|
||||||
|
|
||||||
#https://bugzilla.mindrot.org/show_bug.cgi?id=2581
|
#https://bugzilla.mindrot.org/show_bug.cgi?id=2581
|
||||||
|
|
@ -115,8 +114,6 @@ Patch502: openssh-6.6p1-keycat.patch
|
||||||
|
|
||||||
#https://bugzilla.mindrot.org/show_bug.cgi?id=1644
|
#https://bugzilla.mindrot.org/show_bug.cgi?id=1644
|
||||||
Patch601: openssh-6.6p1-allow-ip-opts.patch
|
Patch601: openssh-6.6p1-allow-ip-opts.patch
|
||||||
#https://bugzilla.mindrot.org/show_bug.cgi?id=1893 (WONTFIX)
|
|
||||||
Patch604: openssh-6.6p1-keyperm.patch
|
|
||||||
#(drop?) https://bugzilla.mindrot.org/show_bug.cgi?id=1925
|
#(drop?) https://bugzilla.mindrot.org/show_bug.cgi?id=1925
|
||||||
Patch606: openssh-5.9p1-ipv6man.patch
|
Patch606: openssh-5.9p1-ipv6man.patch
|
||||||
#?
|
#?
|
||||||
|
|
@ -380,7 +377,6 @@ popd
|
||||||
%patch502 -p1 -b .keycat
|
%patch502 -p1 -b .keycat
|
||||||
|
|
||||||
%patch601 -p1 -b .ip-opts
|
%patch601 -p1 -b .ip-opts
|
||||||
%patch604 -p1 -b .keyperm
|
|
||||||
%patch606 -p1 -b .ipv6man
|
%patch606 -p1 -b .ipv6man
|
||||||
%patch607 -p1 -b .sigpipe
|
%patch607 -p1 -b .sigpipe
|
||||||
%patch609 -p1 -b .x11
|
%patch609 -p1 -b .x11
|
||||||
|
|
@ -585,7 +581,6 @@ install -m744 %{SOURCE13} $RPM_BUILD_ROOT/%{_libexecdir}/openssh/sshd-keygen
|
||||||
install -m755 contrib/ssh-copy-id $RPM_BUILD_ROOT%{_bindir}/
|
install -m755 contrib/ssh-copy-id $RPM_BUILD_ROOT%{_bindir}/
|
||||||
install contrib/ssh-copy-id.1 $RPM_BUILD_ROOT%{_mandir}/man1/
|
install contrib/ssh-copy-id.1 $RPM_BUILD_ROOT%{_mandir}/man1/
|
||||||
install -d -m711 ${RPM_BUILD_ROOT}/%{_datadir}/empty.sshd
|
install -d -m711 ${RPM_BUILD_ROOT}/%{_datadir}/empty.sshd
|
||||||
install -p -D -m 0644 %{SOURCE18} %{buildroot}%{_sysusersdir}/openssh.conf
|
|
||||||
install -p -D -m 0644 %{SOURCE19} %{buildroot}%{_sysusersdir}/openssh-server.conf
|
install -p -D -m 0644 %{SOURCE19} %{buildroot}%{_sysusersdir}/openssh-server.conf
|
||||||
|
|
||||||
%if ! %{no_gnome_askpass}
|
%if ! %{no_gnome_askpass}
|
||||||
|
|
@ -611,11 +606,13 @@ pushd pam_ssh_agent_auth-pam_ssh_agent_auth-%{pam_ssh_agent_ver}
|
||||||
popd
|
popd
|
||||||
%endif
|
%endif
|
||||||
|
|
||||||
%pre
|
|
||||||
%sysusers_create_compat %{SOURCE18}
|
|
||||||
|
|
||||||
%pre server
|
%pre server
|
||||||
%sysusers_create_compat %{SOURCE19}
|
%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
|
%post server
|
||||||
%systemd_post sshd.service sshd.socket
|
%systemd_post sshd.service sshd.socket
|
||||||
|
|
@ -653,9 +650,8 @@ test -f %{sysconfig_anaconda} && \
|
||||||
%attr(0755,root,root) %{_bindir}/ssh-keygen
|
%attr(0755,root,root) %{_bindir}/ssh-keygen
|
||||||
%attr(0644,root,root) %{_mandir}/man1/ssh-keygen.1*
|
%attr(0644,root,root) %{_mandir}/man1/ssh-keygen.1*
|
||||||
%attr(0755,root,root) %dir %{_libexecdir}/openssh
|
%attr(0755,root,root) %dir %{_libexecdir}/openssh
|
||||||
%attr(2555,root,ssh_keys) %{_libexecdir}/openssh/ssh-keysign
|
%attr(4555,root,root) %{_libexecdir}/openssh/ssh-keysign
|
||||||
%attr(0644,root,root) %{_mandir}/man8/ssh-keysign.8*
|
%attr(0644,root,root) %{_mandir}/man8/ssh-keysign.8*
|
||||||
%attr(0644,root,root) %{_sysusersdir}/openssh.conf
|
|
||||||
|
|
||||||
%files clients
|
%files clients
|
||||||
%attr(0755,root,root) %{_bindir}/ssh
|
%attr(0755,root,root) %{_bindir}/ssh
|
||||||
|
|
@ -724,6 +720,9 @@ test -f %{sysconfig_anaconda} && \
|
||||||
%endif
|
%endif
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
* Fri Dec 02 2022 Dmitry Belyavskiy <dbelyavs@redhat.com> - 9.0p1-9
|
||||||
|
- Restore upstream behaviour and default host key permissions (rhbz#2141272)
|
||||||
|
|
||||||
* Mon Oct 24 2022 Norbert Pocs <npocs@redhat.com> - 9.0p1-8
|
* Mon Oct 24 2022 Norbert Pocs <npocs@redhat.com> - 9.0p1-8
|
||||||
- Add additional audit logging about ssh key used to login (rhbz#2049947)
|
- Add additional audit logging about ssh key used to login (rhbz#2049947)
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -30,8 +30,7 @@ if ! $KEYGEN -q -t $KEYTYPE -f $KEY -C '' -N '' >&/dev/null; then
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# sanitize permissions
|
# sanitize permissions
|
||||||
/usr/bin/chgrp ssh_keys $KEY
|
/usr/bin/chmod 600 $KEY
|
||||||
/usr/bin/chmod 640 $KEY
|
|
||||||
/usr/bin/chmod 644 $KEY.pub
|
/usr/bin/chmod 644 $KEY.pub
|
||||||
if [[ -x /usr/sbin/restorecon ]]; then
|
if [[ -x /usr/sbin/restorecon ]]; then
|
||||||
/usr/sbin/restorecon $KEY{,.pub}
|
/usr/sbin/restorecon $KEY{,.pub}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue