This is an automated email from the git hooks/post-receive script. x2go pushed a commit to branch master in repository buildscripts. commit 82dbcf3a85426425591782fb7b6c515aa82b92ca Author: Mihai Moldovan <ionic@ionic.de> Date: Sat Nov 25 06:56:19 2017 +0100 bin/slave-start-{chroot,prepare}: move su invocation up the chain. As su spawns a login shell, attempts at running it as part of a script are futile. --- bin/slave-start-chroot.sh | 2 +- bin/slave-start-prepare.sh | 11 ----------- 2 files changed, 1 insertion(+), 12 deletions(-) diff --git a/bin/slave-start-chroot.sh b/bin/slave-start-chroot.sh index f51fef5..f60b5f0 100755 --- a/bin/slave-start-chroot.sh +++ b/bin/slave-start-chroot.sh @@ -22,4 +22,4 @@ fi "${HOME}/bin/slave-sync.sh" -schroot -c "${chroot}" -- python -c "import pty; pty.spawn('bin/${prefix}-slave-start-prepare.sh')" +schroot -c "${chroot}" -- python -c "import pty; pty.spawn('su - \"${USER}\" -c \"bin/${prefix}-slave-start-prepare.sh\"')" diff --git a/bin/slave-start-prepare.sh b/bin/slave-start-prepare.sh index caefe27..94d1ef0 100755 --- a/bin/slave-start-prepare.sh +++ b/bin/slave-start-prepare.sh @@ -4,17 +4,6 @@ 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