From: Elan Ruusamäe Date: Fri, 29 Jul 2016 16:56:21 +0000 (+0300) Subject: sshd-keygen: do not exit as failure if restorecon is missing X-Git-Tag: auto/th/openssh-7.2p2-2 X-Git-Url: http://git.pld-linux.org/?p=packages%2Fopenssh.git;a=commitdiff_plain;h=refs%2Ftags%2Fauto%2Fth%2Fopenssh-7.2p2-2 sshd-keygen: do not exit as failure if restorecon is missing --- diff --git a/openssh.spec b/openssh.spec index f32cd46..0ae1c27 100644 --- a/openssh.spec +++ b/openssh.spec @@ -46,7 +46,7 @@ Summary(ru.UTF-8): OpenSSH - свободная реализация прото Summary(uk.UTF-8): OpenSSH - вільна реалізація протоколу Secure Shell (SSH) Name: openssh Version: 7.2p2 -Release: 1 +Release: 2 Epoch: 2 License: BSD Group: Applications/Networking diff --git a/sshd-keygen b/sshd-keygen old mode 100644 new mode 100755 index b31c06b..a090614 --- a/sshd-keygen +++ b/sshd-keygen @@ -11,7 +11,7 @@ ssh_gen_key() { /usr/bin/ssh-keygen -t $type -f $keyfile -N '' >&2 chmod 600 $keyfile - [ -x /sbin/restorecon ] && /sbin/restorecon $keyfile + [ ! -x /sbin/restorecon ] || /sbin/restorecon $keyfile } # generate new keys with empty passwords if they do not exist