From 7cfed8fe78b2c8879d4af626565a9c7bda1fbec6 Mon Sep 17 00:00:00 2001 From: happy_orange Date: Mon, 20 Feb 2023 21:45:03 +0800 Subject: [PATCH] bugfix the ssh_keys not exist in /etc/group --- openssh.spec | 3 ++- sshd-keygen | 3 +-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/openssh.spec b/openssh.spec index da91ad9..2e06ed9 100644 --- a/openssh.spec +++ b/openssh.spec @@ -604,7 +604,7 @@ popd %generate_compatibility_deps %pre server -%sysusers_create_compat %{SOURCE20} +%sysusers_create_compat %{SOURCE19} # 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 || : @@ -721,6 +721,7 @@ test -f %{sysconfig_anaconda} && \ %changelog * Mon Feb 20 2023 Funda Wang - 9.0p1-3 - Enable libfido2 support +- bugfix the ssh_keys not exist in /etc/group * Fri Feb 17 2023 Funda Wang - 9.0p1-2 - Add switch for libfido2 support diff --git a/sshd-keygen b/sshd-keygen index 141814c..170ada0 100644 --- a/sshd-keygen +++ b/sshd-keygen @@ -30,8 +30,7 @@ if ! $KEYGEN -q -t $KEYTYPE -f $KEY -C '' -N '' >&/dev/null; then fi # sanitize permissions -/usr/bin/chgrp ssh_keys $KEY -/usr/bin/chmod 640 $KEY +/usr/bin/chmod 600 $KEY /usr/bin/chmod 644 $KEY.pub if [[ -x /usr/sbin/restorecon ]]; then /usr/sbin/restorecon $KEY{,.pub} -- Gitee