1# Copyright (c) 2012 The Chromium OS Authors. All rights reserved. 2# Use of this source code is governed by a BSD-style license that can be 3# found in the LICENSE file. 4 5# The names of expected mount-points, devices, magic files, etc on chrome os. 6 7# Constants used by other constants. 8USER_DATA_DIR = '/home/chronos' 9WHITELIST_DIR = '/var/lib/whitelist' 10LOG_DIR = '/var/log' 11 12# Rest of constants. 13BROWSER = 'chrome' 14BROWSER_EXE = '/opt/google/chrome/' + BROWSER 15 16CHAPS_USER_DATABASE_PATH = '/home/chronos/user/.chaps/database' 17 18CHROME_CORE_MAGIC_FILE = '/mnt/stateful_partition/etc/collect_chrome_crashes' 19CHROME_LOG_DIR = '/var/log/chrome' 20CHROME_VERSION_COMMAND = BROWSER_EXE + ' --version' 21 22# Directory to save log files preserved during autoupdate. 23AUTOUPDATE_PRESERVE_LOG = '/mnt/stateful_partition/unencrypted/preserve/log' 24 25CLEANUP_LOGS_PAUSED_FILE = '/var/lib/cleanup_logs_paused' 26 27CLIENT_LOGIN_URL = '/accounts/ClientLogin' 28CLIENT_LOGIN_NEW_URL = '/ClientLogin' 29 30CRASH_DIR = '/var/spool/crash' 31CRASH_REPORTER_RESIDUE_DIR = '/tmp/crash_reporter' 32 33# LOGS to collect from DUTs 34LOG_PSTORE_DIRS = ('/sys/fs/pstore',) 35LOG_I915_ERROR_STATE = '/sys/kernel/debug/dri/0/i915_error_state' 36 37CREDENTIALS = { 38 '$mockowner': ['mockowner.test.account@gmail.com', 'perfsmurf'], 39 '$default': ['performance.test.account@gmail.com', 'perfsmurf'], 40 '$apps': ['performance.test.account@googleapps.com', 'perfsmurf'], 41 '$backdoor': ['chronos@gmail.com', 'chronos'], 42} 43 44SHADOW_ROOT = '/home/.shadow' 45 46CRYPTOHOME_DEV_REGEX_ANY = r'.*' 47CRYPTOHOME_DEV_REGEX_REGULAR_USER_SHADOW = r'^/home/\.shadow/.*/vault$' 48CRYPTOHOME_DEV_REGEX_REGULAR_USER_DEVICE = r'^/dev/(?!loop[0-9]+$)[^/]*$' 49CRYPTOHOME_DEV_REGEX_REGULAR_USER_EPHEMERAL = r'^ephemeralfs/.*$' 50# Ecryptfs-based user home directory mounts the SHADOW encrypted directory, 51# while ext4-crypto based user home is a bind-mount to an encrypted directory 52# part of a ext4 filesystem that mounts the main disk device. Both can be 53# a home directory of a regular user. 54CRYPTOHOME_DEV_REGEX_REGULAR_USER = r'(%s|%s|%s)' % ( 55 CRYPTOHOME_DEV_REGEX_REGULAR_USER_SHADOW, 56 CRYPTOHOME_DEV_REGEX_REGULAR_USER_DEVICE, 57 CRYPTOHOME_DEV_REGEX_REGULAR_USER_EPHEMERAL) 58CRYPTOHOME_DEV_REGEX_LOOP_DEVICE = r'^/dev/loop[0-9]+$' 59CRYPTOHOME_DEV_REGEX_GUEST = r'^guestfs$' 60 61CRYPTOHOME_FS_REGEX_ANY = r'.*' 62CRYPTOHOME_FS_REGEX_TMPFS = r'^tmpfs$' 63CRYPTOHOME_FS_REGEX_EXT4 = r'^ext4$' 64CRYPTOHOME_FS_REGEX_ECRYPTFS = r'^ecryptfs$' 65 66CRYPTOHOME_MOUNT_PT = USER_DATA_DIR + '/user' 67 68CRYPTOHOMED_LOG = '/var/log/cryptohomed.log' 69 70# Directories to copy out of cryptohome, relative to CRYPTOHOME_MOUNT_PT. 71CRYPTOHOME_DIRS_TO_RECOVER = ['crash', 'log'] 72 73DISABLE_BROWSER_RESTART_MAGIC_FILE = '/run/disable_chrome_restart' 74DEFAULT_OWNERSHIP_TIMEOUT = 300 # Ownership is an inherently random process. 75 76ENABLE_BROWSER_HANG_DETECTION_FILE = \ 77 '/run/session_manager/enable_hang_detection' 78 79FLIMFLAM_TEST_PATH = '/usr/lib/flimflam/test/' 80 81GUEST_USER = '$guest' 82 83LOGIN_PROFILE = USER_DATA_DIR + '/Default' 84 85LOGIN_PROMPT_STATUS_COMMAND = 'bootstat_get_last login-prompt-visible' 86 87LSB_RELEASE = '/etc/lsb-release' 88 89MOCK_OWNER_CERT = 'mock_owner_cert.pem' 90MOCK_OWNER_KEY = 'mock_owner_private.key' 91MOCK_OWNER_POLICY = 'mock_owner.policy' 92 93ISSUE_AUTH_TOKEN_URL = '/accounts/IssueAuthToken' 94ISSUE_AUTH_TOKEN_NEW_URL = '/IssueAuthToken' 95 96OAUTH1_GET_REQUEST_TOKEN_URL = '/accounts/o8/GetOAuthToken' 97OAUTH1_GET_REQUEST_TOKEN_NEW_URL = '/o/oauth/GetOAuthToken/' 98OAUTH1_GET_ACCESS_TOKEN_URL = '/accounts/OAuthGetAccessToken' 99OAUTH1_GET_ACCESS_TOKEN_NEW_URL = '/OAuthGetAccessToken' 100OAUTH_LOGIN_URL = '/accounts/OAuthLogin' 101OAUTH_LOGIN_NEW_URL = '/OAuthLogin' 102MERGE_SESSION_URL = '/MergeSession' 103 104OAUTH2_CLIENT_ID = '77185425430.apps.googleusercontent.com' 105OAUTH2_CLIENT_SECRET = 'OTJgUOQcT7lO7GsGZq2G4IlT' 106OAUTH2_WRAP_BRIDGE_URL = '/accounts/OAuthWrapBridge' 107OAUTH2_WRAP_BRIDGE_NEW_URL = '/OAuthWrapBridge' 108OAUTH2_GET_AUTH_CODE_URL = '/o/oauth2/programmatic_auth' 109OAUTH2_GET_TOKEN_URL = '/o/oauth2/token' 110 111OWNER_KEY_FILE = WHITELIST_DIR + '/owner.key' 112 113SERVICE_LOGIN_URL = '/accounts/ServiceLogin' 114SERVICE_LOGIN_NEW_URL = '/ServiceLogin' 115SERVICE_LOGIN_AUTH_URL = '/ServiceLoginAuth' 116SERVICE_LOGIN_AUTH_ERROR = 'The username or password you entered is incorrect.' 117 118SESSION_MANAGER = 'session_manager' 119SIGNED_POLICY_FILE = WHITELIST_DIR + '/policy' 120SPECIAL_CASE_DOMAIN = 'gmail.com' 121USER_POLICY_DIR = '/run/user_policy' 122USER_POLICY_KEY_FILENAME = 'policy.pub' 123 124TOKEN_AUTH_URL = '/accounts/TokenAuth' 125TOKEN_AUTH_NEW_URL = '/TokenAuth' 126 127UI_LOG = '/var/log/ui/ui.LATEST' 128UI_RESPAWN_TIMESTAMPS_FILE = '/tmp/ui-respawn-timestamps' 129UI_TOO_CRASHY_TIMESTAMPS_FILE = '/tmp/ui-too-crashy-timestamps' 130 131RESOLV_CONF_FILE = '/etc/resolv.conf' 132 133PENDING_SHUTDOWN_PATH = '/var/lib/crash_reporter/pending_clean_shutdown' 134UNCLEAN_SHUTDOWN_DETECTED_PATH = '/run/unclean-shutdown-detected' 135 136INTERACTIVE_XMLRPC_SERVER_PORT = 9980 137INTERACTIVE_XMLRPC_SERVER_COMMAND = ( 138 'cd /usr/local/autotest/common_lib/cros; ' 139 './interactive_xmlrpc_server.py') 140INTERACTIVE_XMLRPC_SERVER_CLEANUP_PATTERN = 'interactive_xmlrpc_server' 141INTERACTIVE_XMLRPC_SERVER_READY_METHOD = 'ready' 142 143SHILL_XMLRPC_SERVER_PORT = 9989 144SHILL_XMLRPC_SERVER_COMMAND = ( 145 'cd /usr/local/autotest/cros/networking; ' 146 './shill_xmlrpc_server.py') 147 148SHILL_XMLRPC_SERVER_CLEANUP_PATTERN = 'shill_xmlrpc_server' 149SHILL_XMLRPC_SERVER_READY_METHOD = 'ready' 150 151BLUETOOTH_DEVICE_XMLRPC_SERVER_PORT = 9990 152BLUETOOTH_DEVICE_XMLRPC_SERVER_COMMAND = ( 153 'cd /usr/local/autotest/cros/bluetooth; ' 154 './bluetooth_device_xmlrpc_server.py') 155BLUETOOTH_DEVICE_XMLRPC_SERVER_CLEANUP_PATTERN = ( 156 'bluetooth_device_xmlrpc_server') 157BLUETOOTH_DEVICE_XMLRPC_SERVER_READY_METHOD = 'ready' 158 159BLUETOOTH_TESTER_XMLRPC_SERVER_PORT = 9990 160BLUETOOTH_TESTER_XMLRPC_SERVER_COMMAND = ( 161 'cd /usr/local/autotest/cros/bluetooth; ' 162 './bluetooth_tester_xmlrpc_server.py') 163BLUETOOTH_TESTER_XMLRPC_SERVER_CLEANUP_PATTERN = ( 164 'bluetooth_tester_xmlrpc_server') 165BLUETOOTH_TESTER_XMLRPC_SERVER_READY_METHOD = 'ready' 166 167MULTIMEDIA_XMLRPC_SERVER_PORT = 9991 168MULTIMEDIA_XMLRPC_SERVER_COMMAND = ( 169 'cd /usr/local/autotest/cros/multimedia; ' 170 './multimedia_xmlrpc_server.py') 171MULTIMEDIA_XMLRPC_SERVER_CLEANUP_PATTERN = 'multimedia_xmlrpc_server' 172MULTIMEDIA_XMLRPC_SERVER_READY_METHOD = 'ready' 173MULTIMEDIA_XMLRPC_SERVER_LOG_FILE= '/var/log/multimedia_xmlrpc_server.log' 174MULTIMEDIA_XMLRPC_SERVER_REQUEST_TIMEOUT = 180 175 176AUDIO_TEST_EXTENSION = ( 177 '/usr/local/autotest/cros/multimedia/audio_test_extension') 178DISPLAY_TEST_EXTENSION = ( 179 '/usr/local/autotest/cros/multimedia/display_test_extension') 180 181APMANAGER_XMLRPC_SERVER_PORT = 9992 182APMANAGER_XMLRPC_SERVER_COMMAND = ( 183 'cd /usr/local/autotest/cros/networking; ' 184 './apmanager_xmlrpc_server.py') 185APMANAGER_XMLRPC_SERVER_CLEANUP_PATTERN = 'apmanager_xmlrpc_server' 186APMANAGER_XMLRPC_SERVER_READY_METHOD = 'ready' 187 188DARK_RESUME_XMLRPC_SERVER_PORT = 9993 189DARK_RESUME_XMLRPC_SERVER_COMMAND = ( 190 'cd /usr/local/autotest/cros; ' 191 './dark_resume_xmlrpc_server.py') 192DARK_RESUME_XMLRPC_SERVER_CLEANUP_PATTERN = 'dark_resume_xmlrpc_server' 193DARK_RESUME_XMLRPC_SERVER_READY_METHOD = 'ready' 194 195# Bug filing 196CHROME_VERSION = 'CHROME_VERSION' 197 198# Moblab Environment Constants. 199MOBLAB_USER = 'moblab' 200