Skip to content

Commit

Permalink
We set the sudo variable early now, act based on the effective volume…
Browse files Browse the repository at this point in the history
… permissions.

Addressing
+ podman run -d --name freeipa-master -h ipa.example.test -v /tmp/freeipa-test-730377/data:/data:Z -e PASSWORD=Secret123 quay.io/freeipa/freeipa-server:rocky-8
Error: lsetxattr /tmp/freeipa-test-730377/data/build-id: operation not permitted
  • Loading branch information
adelton committed Oct 24, 2024
1 parent 290a7be commit 65b6756
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions tests/run-master-and-replica.sh
Original file line number Diff line number Diff line change
Expand Up @@ -18,10 +18,14 @@ fi
function setup_sudo() {
if test "$VOLUME" == "${VOLUME#/}" ; then
sudo="$docker run --rm -i --security-opt label=disable -v $VOLUME:/$VOLUME docker.io/library/busybox"
elif test -O $VOLUME/build-id ; then
sudo=
else
sudo=sudo
$docker run --rm -v $VOLUME:/data:Z docker.io/library/busybox touch /data/.test-permissions
if echo test > $VOLUME/.test-permissions ; then
sudo=
else
sudo=sudo
fi
rm -f $VOLUME/.test-permissions || :
fi
}
setup_sudo
Expand Down

0 comments on commit 65b6756

Please sign in to comment.