[X2Go-Commits] [live-build-x2go] 03/28: make sure file permissions are correct, even when copying from vfat; make sure all keys are generated before storing on media
git-admin at x2go.org
git-admin at x2go.org
Sat Nov 18 02:33:04 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 6210f638032bcbc46d91ee7072073ab9804572d9
Author: Stefan Baur <kontakt at baur-itcs.de>
Date: Tue Nov 7 16:17:02 2017 +0100
make sure file permissions are correct, even when copying from vfat; make sure all keys are generated before storing on media
---
config/includes.chroot/lib/live/config/2260-getsshhostkeysfrommedia | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/config/includes.chroot/lib/live/config/2260-getsshhostkeysfrommedia b/config/includes.chroot/lib/live/config/2260-getsshhostkeysfrommedia
index 8050125..438957b 100644
--- a/config/includes.chroot/lib/live/config/2260-getsshhostkeysfrommedia
+++ b/config/includes.chroot/lib/live/config/2260-getsshhostkeysfrommedia
@@ -21,9 +21,15 @@ GetSSHHostKeysFromMedia ()
# any keyfile in the config dir will be copied over to live system
for KEYFILE in $1/config/sshdkeys/ssh_host*key* ; do
[ -e "$KEYFILE" ] && cp $KEYFILE /etc/ssh/ && KEYFLAG=1
+ if echo $(basename $KEYFILE) | grep -q '\.pub$' ; then
+ chmod 644 /etc/ssh/$(basename $KEYFILE)
+ else
+ chmod 600 /etc/ssh/$(basename $KEYFILE)
+ fi
done
# no keys present (as detected by flag not being set), but directory is there? Store keys.
if [ -z "$KEYFLAG" ] ; then
+ ssh-keygen -A # make sure we have keyfiles for every key the server expects
mount -oremount,rw $1 && cp /etc/ssh/ssh_host*key* $1/config/sshdkeys/
else
# reload sshd config
--
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