From: Jakub Jelen Date: Tue, 29 Sep 2020 10:02:45 +0000 (+0000) Subject: if unable to add a missing newline, fail X-Git-Tag: V_8_5_P1~18 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=983e05ef3b81329d76d6a802b39ad0d1f637c06c;p=thirdparty%2Fopenssh-portable.git if unable to add a missing newline, fail SSH-Copy-ID-Upstream: 76b25e18f55499ea9edb4c4d6dc4a80bebc36d95 --- diff --git a/contrib/ssh-copy-id b/contrib/ssh-copy-id index b8a67419b..5fee15076 100644 --- a/contrib/ssh-copy-id +++ b/contrib/ssh-copy-id @@ -252,7 +252,7 @@ installkeys_sh() { cd; umask 077; mkdir -p "${AUTH_KEY_DIR}" && - { [ -z \`tail -1c ${AUTH_KEY_FILE} 2>/dev/null\` ] || echo >> "${AUTH_KEY_FILE}"; } && + { [ -z \`tail -1c ${AUTH_KEY_FILE} 2>/dev/null\` ] || echo >> "${AUTH_KEY_FILE}" || exit 1; } && cat >> "${AUTH_KEY_FILE}" || exit 1; if type restorecon >/dev/null 2>&1; then