scripts/ocsp-stapling*.test: add bwrap attempt at top, to isolate network namespace.
This commit is contained in:
parent
8f25456f86
commit
1e9971f64c
@ -2,6 +2,22 @@
|
||||
|
||||
# ocsp-stapling-with-ca-as-responder.test
|
||||
|
||||
# if we can, isolate the network namespace to eliminate port collisions
|
||||
if [[ "${AM_BWRAPPED-}" != "yes" ]]; then
|
||||
bwrap_path="$(command -v bwrap)"
|
||||
if [[ -z "$bwrap_path" ]]; then
|
||||
echo "couldn't find bwrap -- not isolating network namespace."
|
||||
elif [[ ! -u "$bwrap_path" ]]; then
|
||||
echo "$bwrap_path isn't setuid -- not isolating network namespace."
|
||||
else
|
||||
echo "isolating network namespace..."
|
||||
export AM_BWRAPPED=yes
|
||||
exec $bwrap_path --unshare-net --dev-bind / / "$0" "$@"
|
||||
unset AM_BWRAPPED
|
||||
echo "not isolating network namespace."
|
||||
fi
|
||||
fi
|
||||
|
||||
if [[ -z "${RETRIES_REMAINING-}" ]]; then
|
||||
export RETRIES_REMAINING=2
|
||||
fi
|
||||
|
@ -3,6 +3,22 @@
|
||||
# ocsp-stapling.test
|
||||
# Test requires HAVE_OCSP and HAVE_CERTIFICATE_STATUS_REQUEST
|
||||
|
||||
# if we can, isolate the network namespace to eliminate port collisions
|
||||
if [[ "${AM_BWRAPPED-}" != "yes" ]]; then
|
||||
bwrap_path="$(command -v bwrap)"
|
||||
if [[ -z "$bwrap_path" ]]; then
|
||||
echo "couldn't find bwrap -- not isolating network namespace."
|
||||
elif [[ ! -u "$bwrap_path" ]]; then
|
||||
echo "$bwrap_path isn't setuid -- not isolating network namespace."
|
||||
else
|
||||
echo "isolating network namespace..."
|
||||
export AM_BWRAPPED=yes
|
||||
exec $bwrap_path --unshare-net --dev-bind / / "$0" "$@"
|
||||
unset AM_BWRAPPED
|
||||
echo "not isolating network namespace."
|
||||
fi
|
||||
fi
|
||||
|
||||
if [[ -z "${RETRIES_REMAINING-}" ]]; then
|
||||
export RETRIES_REMAINING=2
|
||||
fi
|
||||
|
@ -3,6 +3,22 @@
|
||||
# ocsp-stapling2.test
|
||||
# Test requires HAVE_OCSP and HAVE_CERTIFICATE_STATUS_REQUEST_V2
|
||||
|
||||
# if we can, isolate the network namespace to eliminate port collisions
|
||||
if [[ "${AM_BWRAPPED-}" != "yes" ]]; then
|
||||
bwrap_path="$(command -v bwrap)"
|
||||
if [[ -z "$bwrap_path" ]]; then
|
||||
echo "couldn't find bwrap -- not isolating network namespace."
|
||||
elif [[ ! -u "$bwrap_path" ]]; then
|
||||
echo "$bwrap_path isn't setuid -- not isolating network namespace."
|
||||
else
|
||||
echo "isolating network namespace..."
|
||||
export AM_BWRAPPED=yes
|
||||
exec $bwrap_path --unshare-net --dev-bind / / "$0" "$@"
|
||||
unset AM_BWRAPPED
|
||||
echo "not isolating network namespace."
|
||||
fi
|
||||
fi
|
||||
|
||||
if [[ -z "${RETRIES_REMAINING-}" ]]; then
|
||||
export RETRIES_REMAINING=2
|
||||
fi
|
||||
|
Loading…
x
Reference in New Issue
Block a user