diff options
Diffstat (limited to 'test/integration/framework')
-rw-r--r-- | test/integration/framework | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/test/integration/framework b/test/integration/framework index 9ce300d55..d576712e5 100644 --- a/test/integration/framework +++ b/test/integration/framework @@ -176,6 +176,10 @@ addtrap() { } setupenvironment() { + # privilege dropping and testing doesn't work if /tmp isn't world-writeable (as e.g. with libpam-tmpdir) + if [ -n "$TMPDIR" ] && [ "$(id -u)" = '0' ] && [ "$(stat --format '%a' "$TMPDIR")" != '1777' ]; then + unset TMPDIR + fi TMPWORKINGDIRECTORY=$(mktemp -d) addtrap "cd /; rm -rf $TMPWORKINGDIRECTORY;" msgninfo "Preparing environment for ${CCMD}$(basename $0)${CINFO} in ${TMPWORKINGDIRECTORY}… " |