Blame openssh-6.7p1-fix-ssh-copy-id-on-non-sh-shell.patch
|
Jakub Jelen |
6df422 |
diff --git a/contrib/ssh-copy-id b/contrib/ssh-copy-id
|
|
Jakub Jelen |
6df422 |
index 8e1091c..4bba5d6 100644
|
|
Jakub Jelen |
6df422 |
--- a/contrib/ssh-copy-id
|
|
Jakub Jelen |
6df422 |
+++ b/contrib/ssh-copy-id
|
|
Jakub Jelen |
6df422 |
@@ -274,9 +274,9 @@ case "$REMOTE_VERSION" in
|
|
Jakub Jelen |
6df422 |
populate_new_ids 0
|
|
Jakub Jelen |
6df422 |
fi
|
|
Jakub Jelen |
6df422 |
[ "$DRY_RUN" ] || printf '%s\n' "$NEW_IDS" | ssh "$@" "
|
|
Jakub Jelen |
6df422 |
- umask 077 ;
|
|
Jakub Jelen |
6df422 |
+ exec sh -c 'umask 077 ;
|
|
Jakub Jelen |
6df422 |
mkdir -p .ssh && cat >> .ssh/authorized_keys || exit 1 ;
|
|
Jakub Jelen |
6df422 |
- if type restorecon >/dev/null 2>&1 ; then restorecon -F .ssh .ssh/authorized_keys ; fi" \
|
|
Jakub Jelen |
6df422 |
+ if type restorecon >/dev/null 2>&1 ; then restorecon -F .ssh .ssh/authorized_keys ; fi'" \
|
|
Jakub Jelen |
6df422 |
|| exit 1
|
|
Jakub Jelen |
6df422 |
ADDED=$(printf '%s\n' "$NEW_IDS" | wc -l)
|
|
Jakub Jelen |
6df422 |
;;
|