From 3442013c525fb2f95e60c0a569072d0140e81f68 Mon Sep 17 00:00:00 2001 From: Chris Hyzer Date: Tue, 19 Jan 2021 10:55:54 -0500 Subject: [PATCH] GRP-3093: sudo should pass env in container --- container_files/usr-local-bin/gsh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/container_files/usr-local-bin/gsh b/container_files/usr-local-bin/gsh index 59a939f4..c2afae14 100755 --- a/container_files/usr-local-bin/gsh +++ b/container_files/usr-local-bin/gsh @@ -10,7 +10,7 @@ export GSH_JVMARGS="$GSH_JVMARGS -DENV=$ENV -DUSERTOKEN=$USERTOKEN" # openshift cannot do whoami if [ "$GROUPER_GSH_CHECK_USER" = "true" ] && [ "$GROUPER_GSH_USER" != "$(whoami)" ] then - sudo -u tomcat bin/gsh.sh "$@" | tee /tmp/loggrouper + sudo --preserve-env -u tomcat bin/gsh.sh "$@" | tee /tmp/loggrouper else exec bin/gsh.sh "$@" | tee /tmp/loggrouper