mirror of
https://github.com/systemd/systemd.git
synced 2024-12-22 17:35:35 +03:00
test: drop default ACL from $TESTDIR
This fixes an issue introduced by the commit 954c77c251
.
For some reasons, setting default ACL on $TESTDIR makes TEST-29-PORTABLE
fail. Let's drop the default ACL, and set ACL on saved results instead.
Fixes #19519.
This commit is contained in:
parent
853401a6bc
commit
a83a7d1e9e
@ -1131,6 +1131,10 @@ save_journal() {
|
||||
rm -r "$j"
|
||||
done
|
||||
|
||||
if [ -n "${SUDO_USER}" ]; then
|
||||
setfacl -m "user:${SUDO_USER:?}:r-X" "$dest"*
|
||||
fi
|
||||
|
||||
# we want to print this sometime later, so save this in a variable
|
||||
JOURNAL_LIST="$(ls -l "$dest"*)"
|
||||
}
|
||||
@ -1142,6 +1146,9 @@ check_result_common() {
|
||||
if [ -s "$workspace/failed" ]; then
|
||||
# Non-empty …/failed has highest priority
|
||||
cp -a "$workspace/failed" "${TESTDIR:?}/"
|
||||
if [ -n "${SUDO_USER}" ]; then
|
||||
setfacl -m "user:${SUDO_USER:?}:r-X" "${TESTDIR:?}/"failed
|
||||
fi
|
||||
ret=1
|
||||
elif [ -e "$workspace/testok" ]; then
|
||||
# …/testok always counts (but with lower priority than …/failed)
|
||||
@ -2477,7 +2484,6 @@ do_test() {
|
||||
if [ -n "${SUDO_USER}" ]; then
|
||||
ddebug "Making ${TESTDIR:?} readable for ${SUDO_USER} (acquired from sudo)"
|
||||
setfacl -m "user:${SUDO_USER:?}:r-X" "${TESTDIR:?}"
|
||||
setfacl -d -m "user:${SUDO_USER:?}:r-X" "${TESTDIR:?}"
|
||||
fi
|
||||
|
||||
testname="$(basename "$PWD")"
|
||||
|
Loading…
Reference in New Issue
Block a user