Blame openssh-7.9p1-ssh-copy-id.patch
|
Jakub Jelen |
bd3516 |
From 22bfdcf060b632b5a6ff603f8f42ff166c211a66 Mon Sep 17 00:00:00 2001
|
|
Jakub Jelen |
bd3516 |
From: Jakub Jelen <jjelen@redhat.com>
|
|
Jakub Jelen |
bd3516 |
Date: Tue, 29 Sep 2020 10:02:45 +0000
|
|
Jakub Jelen |
bd3516 |
Subject: [PATCH] Fail hard on the first failed attempt to write the
|
|
Jakub Jelen |
bd3516 |
authorized_keys_file
|
|
Jakub Jelen |
bd3516 |
|
|
Jakub Jelen |
bd3516 |
---
|
|
Jakub Jelen |
bd3516 |
ssh-copy-id | 2 +-
|
|
Jakub Jelen |
bd3516 |
1 file changed, 1 insertion(+), 1 deletion(-)
|
|
Jakub Jelen |
bd3516 |
|
|
Jakub Jelen |
bd3516 |
diff --git a/contrib/ssh-copy-id b/contrib/ssh-copy-id
|
|
Jakub Jelen |
bd3516 |
index 392f64f..e69a23f 100755
|
|
Jakub Jelen |
bd3516 |
--- a/contrib/ssh-copy-id
|
|
Jakub Jelen |
bd3516 |
+++ b/contrib/ssh-copy-id
|
|
Jakub Jelen |
bd3516 |
@@ -251,7 +251,7 @@ installkeys_sh() {
|
|
Jakub Jelen |
bd3516 |
cd;
|
|
Jakub Jelen |
bd3516 |
umask 077;
|
|
Jakub Jelen |
bd3516 |
mkdir -p $(dirname "${AUTH_KEY_FILE}") &&
|
|
Jakub Jelen |
bd3516 |
- { [ -z \`tail -1c ${AUTH_KEY_FILE} 2>/dev/null\` ] || echo >> ${AUTH_KEY_FILE}; } &&
|
|
Jakub Jelen |
bd3516 |
+ { [ -z \`tail -1c ${AUTH_KEY_FILE} 2>/dev/null\` ] || echo >> ${AUTH_KEY_FILE} || exit 1; } &&
|
|
Jakub Jelen |
bd3516 |
cat >> ${AUTH_KEY_FILE} ||
|
|
Jakub Jelen |
bd3516 |
exit 1;
|
|
Jakub Jelen |
bd3516 |
if type restorecon >/dev/null 2>&1; then
|
|
Jakub Jelen |
bd3516 |
--
|
|
Jakub Jelen |
bd3516 |
GitLab
|
|
Jakub Jelen |
bd3516 |
|
|
Jakub Jelen |
bd3516 |
|