aboutsummaryrefslogtreecommitdiff
path: root/cli-tests/t_unlock.out
blob: 29a10dd824900540e408a737fe14789f027f3c55 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
# Encrypt directory with --skip-unlock

# => Check dir status
"MNT/dir" is encrypted with fscrypt.

Policy:   desc1
Options:  padding:32 contents:AES_256_XTS filenames:AES_256_CTS policy_version:2 
Unlocked: No

Protected with 1 protector:
PROTECTOR         LINKED  DESCRIPTION
desc2  No      custom protector "prot"
touch: cannot touch 'MNT/dir/file': Required key not available

# => Get policy status via mount:
desc1  No        desc2

# Unlock directory
Enter custom passphrase for protector "prot": "MNT/dir" is now unlocked and ready for use.

# => Check dir status
"MNT/dir" is encrypted with fscrypt.

Policy:   desc1
Options:  padding:32 contents:AES_256_XTS filenames:AES_256_CTS policy_version:2 
Unlocked: Yes

Protected with 1 protector:
PROTECTOR         LINKED  DESCRIPTION
desc2  No      custom protector "prot"

# => Get policy status via mount:
desc1  Yes       desc2

# Lock by cycling mount

# => Check dir status
"MNT/dir" is encrypted with fscrypt.

Policy:   desc1
Options:  padding:32 contents:AES_256_XTS filenames:AES_256_CTS policy_version:2 
Unlocked: No

Protected with 1 protector:
PROTECTOR         LINKED  DESCRIPTION
desc2  No      custom protector "prot"
mkdir: cannot create directory 'MNT/dir/subdir': Required key not available

# => Get policy status via mount:
desc1  No        desc2

# Try to unlock with wrong passphrase
[ERROR] fscrypt unlock: incorrect key provided
"MNT/dir" is encrypted with fscrypt.

Policy:   desc1
Options:  padding:32 contents:AES_256_XTS filenames:AES_256_CTS policy_version:2 
Unlocked: No

Protected with 1 protector:
PROTECTOR         LINKED  DESCRIPTION
desc2  No      custom protector "prot"

# Unlock directory
Enter custom passphrase for protector "prot": "MNT/dir" is now unlocked and ready for use.

# => Check dir status
"MNT/dir" is encrypted with fscrypt.

Policy:   desc1
Options:  padding:32 contents:AES_256_XTS filenames:AES_256_CTS policy_version:2 
Unlocked: Yes

Protected with 1 protector:
PROTECTOR         LINKED  DESCRIPTION
desc2  No      custom protector "prot"
contents

# => Get policy status via mount:
desc1  Yes       desc2

# Try to unlock with corrupt policy metadata
[ERROR] fscrypt unlock: MNT/dir: system error: missing
                        policy metadata for encrypted directory

This file or directory has either been encrypted with another tool (such as
e4crypt) or the corresponding filesystem metadata has been deleted.

# Try to unlock with missing policy metadata
[ERROR] fscrypt unlock: MNT/dir: system error: missing
                        policy metadata for encrypted directory

This file or directory has either been encrypted with another tool (such as
e4crypt) or the corresponding filesystem metadata has been deleted.

# Try to unlock with missing protector metadata
[ERROR] fscrypt unlock: could not load any protectors

You may need to mount a linked filesystem. Run with --verbose for more
information.