Skip to content
Snippets Groups Projects
Unverified Commit 72453399 authored by Rafael Guterres Jeffman's avatar Rafael Guterres Jeffman Committed by GitHub
Browse files

Merge pull request #1351 from t-woerner/infra_image_start_debug

infra/image/shdefaults: Add SYS_PTRACE to CAP_DEFAULTS
parents 86701caf 638422e1
No related branches found
No related tags found
No related merge requests found
...@@ -4,6 +4,7 @@ ...@@ -4,6 +4,7 @@
SCRIPTDIR="$(dirname -- "$(readlink -f "${BASH_SOURCE[0]}")")" SCRIPTDIR="$(dirname -- "$(readlink -f "${BASH_SOURCE[0]}")")"
TOPDIR="$(readlink -f "${SCRIPTDIR}/../..")" TOPDIR="$(readlink -f "${SCRIPTDIR}/../..")"
# shellcheck disable=SC1091
. "${SCRIPTDIR}/shdefaults" . "${SCRIPTDIR}/shdefaults"
# shellcheck disable=SC1091 # shellcheck disable=SC1091
...@@ -15,7 +16,8 @@ container_create() { ...@@ -15,7 +16,8 @@ container_create() {
shift 2 shift 2
declare -a extra_opts declare -a extra_opts
readarray -t extra_opts < \ readarray -t extra_opts < \
<(sed -e "s/-/--cap-drop=/g" -e "s/+/--cap-add=/g" <<< "${CAP_DEFAULTS[@]}") <(sed -e "s/-/--cap-drop=/g" -e "s/+/--cap-add=/g" \
<<< "$(printf '%s\n' "${CAP_DEFAULTS[@]}")")
for opt in "$@" for opt in "$@"
do do
[ -z "${opt}" ] && continue [ -z "${opt}" ] && continue
......
...@@ -5,4 +5,5 @@ ...@@ -5,4 +5,5 @@
# Use +CAP to add the capability and -CAP to drop the capability. # Use +CAP to add the capability and -CAP to drop the capability.
CAP_DEFAULTS=( CAP_DEFAULTS=(
"+DAC_READ_SEARCH" # Required for SSSD "+DAC_READ_SEARCH" # Required for SSSD
"+SYS_PTRACE" # Required for debugging
) )
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment