summaryrefslogtreecommitdiffstats
path: root/remoting
diff options
context:
space:
mode:
authorskonig@chromium.org <skonig@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-12-13 02:55:18 +0000
committerskonig@chromium.org <skonig@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-12-13 02:55:18 +0000
commit8f265de1d6bfe03fa36cc7adbe69243d73e8dad1 (patch)
tree3e89fbf1680e6b0bd5f30e824cc7fa2f9b5ea87f /remoting
parente3d88b937e4f813ad0aafefcbd05224c1bec8254 (diff)
downloadchromium_src-8f265de1d6bfe03fa36cc7adbe69243d73e8dad1.zip
chromium_src-8f265de1d6bfe03fa36cc7adbe69243d73e8dad1.tar.gz
chromium_src-8f265de1d6bfe03fa36cc7adbe69243d73e8dad1.tar.bz2
Don't run host for managed accounts on OS X.
Previously if you set up the host under a normal user account, then logged out and logged back in under another account that was managed (i.e. had parental controls enabled), we would attempt to launch the host, triggering an OS notification that it can't be run. We didn't trap this as a permanent error so we'd try to re-launch again, triggering another notification, then another, etc. This change looks for the specific error code returned when a process can't be run by a managed account, then treats it as a premanent error. BUG=144685 TEST=Manual Review URL: https://chromiumcodereview.appspot.com/11553037 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@172793 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'remoting')
-rwxr-xr-xremoting/host/installer/mac/PrivilegedHelperTools/org.chromium.chromoting.me2me.sh6
1 files changed, 6 insertions, 0 deletions
diff --git a/remoting/host/installer/mac/PrivilegedHelperTools/org.chromium.chromoting.me2me.sh b/remoting/host/installer/mac/PrivilegedHelperTools/org.chromium.chromoting.me2me.sh
index cbee2a0..338319d 100755
--- a/remoting/host/installer/mac/PrivilegedHelperTools/org.chromium.chromoting.me2me.sh
+++ b/remoting/host/installer/mac/PrivilegedHelperTools/org.chromium.chromoting.me2me.sh
@@ -27,6 +27,11 @@ MAX_PERMANENT_ERROR_EXIT_CODE=105
MINIMUM_RELAUNCH_INTERVAL=60
MAXIMUM_HOST_FAILURES=10
+# Exit code 126 is defined by Posix to mean "Command found, but not
+# executable", and is returned if the process cannot be launched due to
+# parental control.
+PERMISSION_DENIED_PARENTAL_CONTROL=126
+
HOST_PID=0
SIGNAL_WAS_TRAPPED=0
@@ -93,6 +98,7 @@ run_host() {
kill -$SIGNAL "$HOST_PID"
elif [[ "$EXIT_CODE" -eq "0" ||
"$EXIT_CODE" -eq "$SIGTERM_EXIT_CODE" ||
+ "$EXIT_CODE" -eq "$PERMISSION_DENIED_PARENTAL_CONTROL" ||
("$EXIT_CODE" -ge "$MIN_PERMANENT_ERROR_EXIT_CODE" && \
"$EXIT_CODE" -le "$MAX_PERMANENT_ERROR_EXIT_CODE") ]]; then
echo "Host returned permanent exit code $EXIT_CODE"