File: t_unlock.out

package info (click to toggle)
fscrypt 0.3.5-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 1,064 kB
  • sloc: sh: 970; makefile: 159; ansic: 84
file content (116 lines) | stat: -rw-r--r-- 3,606 bytes parent folder | download
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
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116

# 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: fscrypt metadata file at
                        "MNT/.fscrypt/policies/desc1"
                        is corrupt: proto: cannot parse invalid wire-format data

# Try to unlock with missing policy metadata
[ERROR] fscrypt unlock: filesystem "MNT" does not contain
                        the policy metadata for "MNT/dir".
                        This directory has either been encrypted with another
                        tool (such as e4crypt), or the file
                        "MNT/.fscrypt/policies/desc20"
                        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.

# Try to unlock with wrong policy metadata
[ERROR] fscrypt unlock: inconsistent metadata between encrypted directory
                        "MNT/dir1" and its corresponding
                        metadata file
                        "MNT/.fscrypt/policies/desc21".

                        Directory has
                        descriptor:desc21 padding:32
                        contents:AES_256_XTS filenames:AES_256_CTS
                        policy_version:2

                        Metadata file has
                        descriptor:desc23 padding:32
                        contents:AES_256_XTS filenames:AES_256_CTS
                        policy_version:2