Commit 73bac857 authored by Lambros Lambrou's avatar Lambros Lambrou Committed by Commit Bot

Run config upgrade tool on MacOS

This updates the installer, and the launchd agent (whenever it is run
as root) to run the upgrade tool.

Bug: 954427
Change-Id: I7f4a4b89c95ec76f706f4906a207af2236c29871
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1633970Reviewed-by: default avatarJamie Walch <jamiewalch@chromium.org>
Reviewed-by: default avatarJoe Downing <joedow@chromium.org>
Commit-Queue: Joe Downing <joedow@chromium.org>
Cr-Commit-Position: refs/heads/master@{#664125}
parent eb8e49e2
......@@ -45,6 +45,12 @@ handle_signal() {
}
run_host() {
# Run the config-upgrade tool, but only if running as root, as normal users
# don't have permission to write the config file.
if [[ "$EUID" -eq 0 ]]; then
"$HOST_EXE" --upgrade-token --host-config="$CONFIG_FILE"
fi
local host_failure_count=0
local host_start_time=0
......
......@@ -15,6 +15,8 @@ PLIST=/Library/LaunchAgents/org.chromium.chromoting.plist
PAM_CONFIG=/etc/pam.d/chrome-remote-desktop
ENABLED_FILE="$HELPERTOOLS/$SERVICE_NAME.me2me_enabled"
ENABLED_FILE_BACKUP="$ENABLED_FILE.backup"
HOST_BUNDLE_NAME=@@HOST_BUNDLE_NAME@@
HOST_EXE=$CONFIG_DIR/$HOST_BUNDLE_NAME/Contents/MacOS/remoting_me2me_host
KSADMIN=/Library/Google/GoogleSoftwareUpdate/GoogleSoftwareUpdate.bundle/Contents/MacOS/ksadmin
KSUPDATE=https://tools.google.com/service/update2
......@@ -90,6 +92,9 @@ else
logger PAM config has local edits. Not updating.
fi
# Run the config-upgrade tool.
"$HOST_EXE" --upgrade-token --host-config="$CONFIG_FILE"
# Load the service for each user for whom the service was unloaded in the
# preflight script (this includes the root user, in case only the login screen
# is being remoted and this is a Keystone-triggered update).
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment