[X2Go-Commits] [live-build-x2go] 15/28: added checks so only keyfiles are copied

git-admin at x2go.org git-admin at x2go.org
Sat Nov 18 02:33:06 CET 2017


This is an automated email from the git hooks/post-receive script.

x2go pushed a commit to branch feature/openbox-magic-pixel-workaround
in repository live-build-x2go.

commit 55efbbb602332fd8c803b108855817c9a3dd983e
Author: Stefan Baur <kontakt at baur-itcs.de>
Date:   Tue Nov 7 23:25:29 2017 +0100

    added checks so only keyfiles are copied
---
 config/includes.chroot/lib/live/config/2270-getsshclientkeysfrommedia | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/config/includes.chroot/lib/live/config/2270-getsshclientkeysfrommedia b/config/includes.chroot/lib/live/config/2270-getsshclientkeysfrommedia
index a8df481..19ebfbe 100755
--- a/config/includes.chroot/lib/live/config/2270-getsshclientkeysfrommedia
+++ b/config/includes.chroot/lib/live/config/2270-getsshclientkeysfrommedia
@@ -54,7 +54,9 @@ GetSSHClientKeysFromMedia ()
 			# any keyfile in the config dir will be copied over to live system
 			#
 			for KEYFILE in $1/config/ssh/* $1/ssh/* $1/.ssh/* ; do
-				[ -s "$KEYFILE" ] || continue
+				([ -f "$KEYFILE" ] && [ -s "$KEYFILE" ]) || continue
+				egrep -q "BEGIN .*(PRIVATE|PUBLIC) KEY" "$KEYFILE" || continue
+				echo -n "\n$(date +'%F | %T | ')'$0' Keyfile '$KEYFILE' found, copying and adjusting ownership and permissions on destination." | tee -a /dev/tty8
 				KEYDESTPATH="$USERHOME/.ssh/$(basename "$KEYFILE")"
 				touch "$KEYDESTPATH"
 				chown   user:user \

--
Alioth's /srv/git/code.x2go.org/live-build-x2go.git//..//_hooks_/post-receive-email on /srv/git/code.x2go.org/live-build-x2go.git


More information about the x2go-commits mailing list