Merge pull request #1352 from freeipa/fix_sssd_on_test_container

test container: Add DAC_READ_SEARCH capability
This commit is contained in:
Thomas Woerner
2025-04-17 14:49:49 +02:00
committed by GitHub
2 changed files with 14 additions and 1 deletions

View File

@@ -4,13 +4,18 @@
SCRIPTDIR="$(dirname -- "$(readlink -f "${BASH_SOURCE[0]}")")"
TOPDIR="$(readlink -f "${SCRIPTDIR}/../..")"
. "${SCRIPTDIR}/shdefaults"
# shellcheck disable=SC1091
. "${TOPDIR}/utils/shfun"
container_create() {
local name=${1}
local image=${2}
shift 2
declare -a extra_opts=()
declare -a extra_opts
readarray -t extra_opts < \
<(sed -e "s/-/--cap-drop=/g" -e "s/+/--cap-add=/g" <<< "${CAP_DEFAULTS[@]}")
for opt in "$@"
do
[ -z "${opt}" ] && continue