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

Side by Side Diff: tcsd.conf

Issue 6793028: Fixed a minor 'umask' that couldn't have worked. (Closed) Base URL: ssh://gitrw.chromium.org:9222/init.git@master
Patch Set: ...once umask isn't being restored, don't need to save it. Created 9 years, 8 months 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 | Annotate | Revision Log
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 # Copyright (c) 2010 The Chromium OS Authors. All rights reserved. 1 # Copyright (c) 2010 The Chromium OS Authors. All rights reserved.
2 # Use of this source code is governed by a BSD-style license that can be 2 # Use of this source code is governed by a BSD-style license that can be
3 # found in the LICENSE file. 3 # found in the LICENSE file.
4 4
5 # Trousers daemon, which talks to the TPM (or the TPM emulator). 5 # Trousers daemon, which talks to the TPM (or the TPM emulator).
6 # Started directly from tpm-probe. 6 # Started directly from tpm-probe.
7 7
8 # Note, this line is modified by chromeos-factoryinstall.ebuild 8 # Note, this line is modified by chromeos-factoryinstall.ebuild
9 # Please do not change without also changing this reference. 9 # Please do not change without also changing this reference.
10 stop on starting halt or starting reboot 10 stop on starting halt or starting reboot
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after
42 elif [ "$owned" -eq "1" ]; then 42 elif [ "$owned" -eq "1" ]; then
43 # Already owned. 43 # Already owned.
44 # Check if trousers' system.data is size zero. If so, then the TPM has 44 # Check if trousers' system.data is size zero. If so, then the TPM has
45 # been owned already and we need to copy over an empty system.data to be 45 # been owned already and we need to copy over an empty system.data to be
46 # able to use it in trousers. 46 # able to use it in trousers.
47 if [ ! -f /var/lib/tpm/system.data ] || \ 47 if [ ! -f /var/lib/tpm/system.data ] || \
48 [ ! -s /var/lib/tpm/system.data ]; then 48 [ ! -s /var/lib/tpm/system.data ]; then
49 if [ ! -e /var/lib/tpm ]; then 49 if [ ! -e /var/lib/tpm ]; then
50 mkdir -m 0700 -p /var/lib/tpm 50 mkdir -m 0700 -p /var/lib/tpm
51 fi 51 fi
52 current_mask=$(umask)
53 umask 0177 52 umask 0177
54 cp --no-preserve=mode /etc/trousers/system.data.auth \ 53 cp --no-preserve=mode /etc/trousers/system.data.auth \
55 /var/lib/tpm/system.data 54 /var/lib/tpm/system.data
56 umask 0133 55 umask 0133
57 touch /var/lib/.tpm_owned 56 touch /var/lib/.tpm_owned
58 umask $(current_mask)
59 fi 57 fi
60 fi 58 fi
61 fi 59 fi
62 end script 60 end script
63 61
64 exec /usr/sbin/tcsd 62 exec /usr/sbin/tcsd
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698