From 790e4854dd13497f872dc829a8e480acbf223031 Mon Sep 17 00:00:00 2001 From: Alex Vandiver Date: Thu, 30 Mar 2023 17:57:34 +0000 Subject: [PATCH] hooks: Run hooks as the zulip user, not as root. --- scripts/lib/upgrade-zulip-stage-2 | 1 + 1 file changed, 1 insertion(+) diff --git a/scripts/lib/upgrade-zulip-stage-2 b/scripts/lib/upgrade-zulip-stage-2 index 3a12e26c39..579d6195dd 100755 --- a/scripts/lib/upgrade-zulip-stage-2 +++ b/scripts/lib/upgrade-zulip-stage-2 @@ -449,6 +449,7 @@ def run_hooks(kind: Literal["pre-deploy", "post-deploy"]) -> None: subprocess.check_call( [os.path.join(path, script_name), old_version, NEW_ZULIP_VERSION], cwd=deploy_path, + preexec_fn=su_to_zulip, )