| OLD | NEW |
| 1 #!/bin/sh | 1 #!/bin/sh |
| 2 # Copyright (c) 2010 The Chromium OS Authors. All rights reserved. |
| 3 # Use of this source code is governed by a BSD-style license that can be |
| 4 # found in the LICENSE file. |
| 2 | 5 |
| 3 if [ -z "$1" ]; then | 6 if [ -z "$1" ]; then |
| 4 USERNAME="chronos" | 7 USERNAME="chronos" |
| 5 else | 8 else |
| 6 USERNAME="$1" | 9 USERNAME="$1" |
| 7 fi | 10 fi |
| 8 | 11 |
| 9 PKCS11_GROUP="pkcs11" | 12 PKCS11_GROUP="pkcs11" |
| 10 | 13 |
| 11 OPENCRYPTOKI_DIR="/var/lib/opencryptoki" | 14 OPENCRYPTOKI_DIR="/var/lib/opencryptoki" |
| (...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 65 | 68 |
| 66 # Creating this directory because if it's not there, token initialization | 69 # Creating this directory because if it's not there, token initialization |
| 67 # will neither create it nor populate it. | 70 # will neither create it nor populate it. |
| 68 mkdir -p "$USER_TOKEN_DIR/TOK_OBJ" | 71 mkdir -p "$USER_TOKEN_DIR/TOK_OBJ" |
| 69 | 72 |
| 70 # Configure the tpm as a token | 73 # Configure the tpm as a token |
| 71 pkcs_slot 0 tpm | 74 pkcs_slot 0 tpm |
| 72 | 75 |
| 73 # Make sure the user can access their own data | 76 # Make sure the user can access their own data |
| 74 chown -R "$USERNAME:$PKCS11_GROUP" "$USER_TOKEN_DIR" | 77 chown -R "$USERNAME:$PKCS11_GROUP" "$USER_TOKEN_DIR" |
| OLD | NEW |