[X2Go-Commits] [buildscripts] 01/01: bin/slave-start-prepare.sh: add ugly su hack to re-initialize groups after a schroot operation.
git-admin at x2go.org
git-admin at x2go.org
Sat Nov 25 06:13:20 CET 2017
This is an automated email from the git hooks/post-receive script.
x2go pushed a commit to branch master
in repository buildscripts.
commit 2099b47cbef86c86c91ca777bba7adbab0a75176
Author: Mihai Moldovan <ionic at ionic.de>
Date: Sat Nov 25 06:13:13 2017 +0100
bin/slave-start-prepare.sh: add ugly su hack to re-initialize groups after a schroot operation.
I don't even want to comment on this.
---
bin/slave-start-prepare.sh | 11 +++++++++++
1 file changed, 11 insertions(+)
diff --git a/bin/slave-start-prepare.sh b/bin/slave-start-prepare.sh
index 94d1ef0..caefe27 100755
--- a/bin/slave-start-prepare.sh
+++ b/bin/slave-start-prepare.sh
@@ -4,6 +4,17 @@ set -e
typeset prefix="$(cut -d"-" -f1 <<< "$(basename "${0}")")"
+# Before we do anything here, we need an ugly hack.
+# In order to simulate a full login cycle (which schroot will not perform),
+# we rely on su to do it.
+# su's PAM configuration must be hacked in order to allow this
+# in a password-less fashion though.
+# We need a better way of handling this, which would typically
+# be sudo, but sudo is buggy currently and does not do what its
+# man page is implying...
+# Oh, and we rely on $USER being set correctly.
+exec su - "${USER}"
+
# Generate this stuff via:
# - openssl s_client -showcerts -servername hostname -connect host:port
# - copy the first PEM-encoded certificate to ${cert} including headers (if printed)
--
Alioth's /home/x2go-admin/maintenancescripts/git/hooks/post-receive-email on /srv/git/code.x2go.org/buildscripts.git
More information about the x2go-commits
mailing list