Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(6)

Side by Side Diff: src/platform/cryptohome/lib/common

Issue 490001: make cryptohome check a magic file to discern between chrome-login and slim-login (Closed)
Patch Set: mount error handlers already assumed common worked Created 11 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « src/platform/cryptohome/bin/mount ('k') | src/scripts/build_chrome.sh » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 #!/bin/bash 1 #!/bin/bash
2 # Copyright (c) 2009 The Chromium OS Authors. All rights reserved. 2 # Copyright (c) 2009 The Chromium OS Authors. All rights reserved.
3 # Use of this source code is governed by a BSD-style license that can be 3 # Use of this source code is governed by a BSD-style license that can be
4 # found in the LICENSE file. 4 # found in the LICENSE file.
5 # 5 #
6 # common file containing shared globals and 6 # common file containing shared globals and
7 # necessary inclusions for chromeos-cryptohome 7 # necessary inclusions for chromeos-cryptohome
8 # mounting and unmounting. 8 # mounting and unmounting.
9 9
10 # Configurable globals 10 # Configurable globals
11 export IMAGE_DIR=/home/.shadow 11 export IMAGE_DIR=/home/.shadow
12 export MOUNT_OPTIONS="nosuid,noexec,nodev" 12 export MOUNT_OPTIONS="nosuid,noexec,nodev"
13 export LOG_FILE=/var/log/cryptohome.log 13 export LOG_FILE=/var/log/cryptohome.log
14 export STDOUT_FILE=/var/log/cryptohome.stdout.log 14 export STDOUT_FILE=/var/log/cryptohome.stdout.log
15 export STDERR_FILE=/var/log/cryptohome.stderr.log 15 export STDERR_FILE=/var/log/cryptohome.stderr.log
16 16
17 export DEFAULT_USER=chronos 17 export DEFAULT_USER=chronos
18 export DEFAULT_LOOP_DEVICE=/dev/loop0 18 export DEFAULT_LOOP_DEVICE=/dev/loop0
19 export DEFAULT_MAPPER_DEVICE=/dev/mapper/cryptohome 19 export DEFAULT_MAPPER_DEVICE=/dev/mapper/cryptohome
20 export DEFAULT_MOUNT_POINT=/home/$DEFAULT_USER 20
21 # temporary hack to check if we're doing chrome-login
22 CHROME_LOGIN_FILE=/tmp/doing-chrome-login
23 MOUNT_POINT=/home/$DEFAULT_USER
24 if [ -f ${CHROME_LOGIN_FILE} ]; then
25 MOUNT_POINT=${MOUNT_POINT}/user
26 fi
27
28 export DEFAULT_MOUNT_POINT=${MOUNT_POINT}
21 29
22 # If the variable is defined and the file exists, 30 # If the variable is defined and the file exists,
23 # encryption will be disabled for users listed in the 31 # encryption will be disabled for users listed in the
24 # file. The file should take the format: 32 # file. The file should take the format:
25 # user@domain<NEWLINE> 33 # user@domain<NEWLINE>
26 # user2@domain<NEWLINE> 34 # user2@domain<NEWLINE>
27 # ... 35 # ...
28 export DISABLED_ENCRYPTION_FILE="$IMAGE_DIR/users" 36 export DISABLED_ENCRYPTION_FILE="$IMAGE_DIR/users"
29 37
30 # TODO: support multiple wrapped master key instances for easy 38 # TODO: support multiple wrapped master key instances for easy
(...skipping 13 matching lines...) Expand all
44 # Pull in requirements 52 # Pull in requirements
45 PATH=/bin:/sbin:/usr/bin:/usr/sbin 53 PATH=/bin:/sbin:/usr/bin:/usr/sbin
46 source $location/utils/declare_commands 54 source $location/utils/declare_commands
47 source $location/cryptohome 55 source $location/cryptohome
48 56
49 # Fire up the tests. 57 # Fire up the tests.
50 if [[ "${BASH_SOURCE[0]}" == "$0" ]]; then 58 if [[ "${BASH_SOURCE[0]}" == "$0" ]]; then
51 echo "Error: common should not be called directly" 1>&1 59 echo "Error: common should not be called directly" 1>&1
52 exit 1 60 exit 1
53 fi 61 fi
OLDNEW
« no previous file with comments | « src/platform/cryptohome/bin/mount ('k') | src/scripts/build_chrome.sh » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698