You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Run ecflow_ui as the host user and make the launcher configurable
launch-ecflow_ui.sh now recreates the invoking user's account
(ECF_RUN_USER/UID/GID) and drops privileges via setpriv before exec, so
ecflow's get_login_name() matches the host. It also honours
ECF_UI_NO_PROXYCHAINS to run directly, and forces IPv4 resolution of the
proxy host to avoid proxychains "localnet address error".
docker_ecflow_ui.sh drives the entrypoint in both proxychains modes and
adds --run-as-root, --host-launcher FILE, and --proxy-host.
Copy file name to clipboardExpand all lines: releng/dockit/ecflow-all/launch-ecflow_ui.sh
+41-2Lines changed: 41 additions & 2 deletions
Original file line number
Diff line number
Diff line change
@@ -4,6 +4,41 @@ set -e
4
4
set -u
5
5
set -o pipefail
6
6
7
+
#
8
+
# Allow to, by default, run ecflow_ui as a specific (host) user instead of root.
9
+
# This can be opted out of by setting ECF_UI_NO_PROXYCHAINS, which will skip all proxychains setup and run ecflow_ui straight away, under the optional privilege drop.
10
+
#
11
+
# When ECF_RUN_UID is set, a matching group/passwd entry is created and privileges are dropped to
12
+
# it (via setpriv) before ecflow_ui is exec'd, so that ecflow's get_login_name() -- which is just
13
+
# getpwuid(getuid())->pw_name, ignoring $USER/$LOGNAME -- reports that user, mirroring how the
14
+
# client identifies the user on the host. root is retained until the final exec because writing
15
+
# /etc/proxychains4.conf below requires it. ECF_RUN_USER is required when ECF_RUN_UID is set;
16
+
# ECF_RUN_GID defaults to ECF_RUN_UID.
17
+
#
18
+
run_as_user_prefix=()
19
+
if [ -n"${ECF_RUN_UID:-}" ];then
20
+
run_as_user="${ECF_RUN_USER:?launch-ecflow_ui.sh: ECF_RUN_USER must be set when ECF_RUN_UID is set}"
0 commit comments