Skip to content
This repository was archived by the owner on Apr 12, 2022. It is now read-only.

Commit 9e3d43d

Browse files
author
Dimitrios Liappis
committed
Add comment about user of chroot for privilege de-escalation
Addresses #125 (comment)
1 parent 2bb9382 commit 9e3d43d

1 file changed

Lines changed: 1 addition & 0 deletions

File tree

build/elasticsearch/bin/docker-entrypoint.sh

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@ run_as_other_user_if_needed() {
2828
# or simply to run /bin/bash to check the image
2929
if [[ "$1" != "eswrapper" ]]; then
3030
if [[ "$(id -u)" == "0" ]] && [[ "$1" == *elasticsearch* ]]; then
31+
# Use chroot to switch to UID 1000
3132
exec chroot --userspec=1000 / "$@"
3233
else
3334
exec "$@"

0 commit comments

Comments
 (0)