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