summaryrefslogtreecommitdiffstats
path: root/remoting/tools
diff options
context:
space:
mode:
authorsimonmorris@chromium.org <simonmorris@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-10-30 22:31:12 +0000
committersimonmorris@chromium.org <simonmorris@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-10-30 22:31:12 +0000
commit52ba3eaab56d133fe404e6b40315e1ed86ab5bbe (patch)
tree9fcfd9cf0a62532fb04c8ac8fa99ccb652bba6fc /remoting/tools
parent7cd5e7168ca6d9aaa53abad1b7ae2c278fb2f470 (diff)
downloadchromium_src-52ba3eaab56d133fe404e6b40315e1ed86ab5bbe.zip
chromium_src-52ba3eaab56d133fe404e6b40315e1ed86ab5bbe.tar.gz
chromium_src-52ba3eaab56d133fe404e6b40315e1ed86ab5bbe.tar.bz2
[Chromoting] Add a username policy, and implement it for the Linux Me2Me host.
BUG=158080 Review URL: https://chromiumcodereview.appspot.com/11341032 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@165036 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'remoting/tools')
-rwxr-xr-xremoting/tools/me2me_virtual_host.py14
1 files changed, 9 insertions, 5 deletions
diff --git a/remoting/tools/me2me_virtual_host.py b/remoting/tools/me2me_virtual_host.py
index 3506794..55fb5e4 100755
--- a/remoting/tools/me2me_virtual_host.py
+++ b/remoting/tools/me2me_virtual_host.py
@@ -995,27 +995,31 @@ Web Store: https://chrome.google.com/remotedesktop"""
# Delete the host or auth configuration depending on the returned error
# code, so the next time this script is run, a new configuration
# will be created and registered.
- if os.WEXITSTATUS(status) == 2:
+ if os.WEXITSTATUS(status) == 100:
logging.info("Host configuration is invalid - exiting.")
host_config.clear_auth()
host_config.clear_host_info()
host_config.save()
return 0
- elif os.WEXITSTATUS(status) == 3:
+ elif os.WEXITSTATUS(status) == 101:
logging.info("Host ID has been deleted - exiting.")
host_config.clear_host_info()
host_config.save()
return 0
- elif os.WEXITSTATUS(status) == 4:
+ elif os.WEXITSTATUS(status) == 102:
logging.info("OAuth credentials are invalid - exiting.")
host_config.clear_auth()
host_config.save()
return 0
- elif os.WEXITSTATUS(status) == 5:
+ elif os.WEXITSTATUS(status) == 103:
logging.info("Host domain is blocked by policy - exiting.")
os.remove(host.config_file)
return 0
- # Nothing to do for Mac-only status 6 (login screen unsupported)
+ # Nothing to do for Mac-only status 104 (login screen unsupported)
+ elif os.WEXITSTATUS(status) == 105:
+ logging.info("Username is blocked by policy - exiting.")
+ os.remove(host.config_file)
+ return 0
if __name__ == "__main__":