Skip to content

Commit

Permalink
cmd/fscrypt: adjust message when listing protector sources
Browse files Browse the repository at this point in the history
Saying "Your data can be protected with one of the following sources" is
ambiguous because it could be interpreted to mean that an encrypted
directory can only have one type of protector.  In fact, an encrypted
directory can have multiple protectors, and they can be of any type.

Update #164
  • Loading branch information
ebiggers committed Nov 27, 2019
1 parent 2a45549 commit 10bbfcb
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -257,7 +257,7 @@ Metadata directories created at "/mnt/disk/.fscrypt".
>>>>> mkdir /mnt/disk/dir1
>>>>> fscrypt encrypt /mnt/disk/dir1
Should we create a new protector? [Y/n] y
Your data can be protected with one of the following sources:
The following protector sources are available:
1 - Your login passphrase (pam_passphrase)
2 - A custom passphrase (custom_passphrase)
3 - A raw 256-bit key (raw_key)
Expand Down Expand Up @@ -364,7 +364,7 @@ passphrase.
>>>>> mkdir /mnt/disk/dir2
>>>>> fscrypt encrypt /mnt/disk/dir2
Should we create a new protector? [Y/n] y
Your data can be protected with one of the following sources:
The following protector sources are available:
1 - Your login passphrase (pam_passphrase)
2 - A custom passphrase (custom_passphrase)
3 - A raw 256-bit key (raw_key)
Expand Down Expand Up @@ -449,7 +449,7 @@ sure you are aware of
# could also use `fscrypt encrypt --key=secret.key` to achieve the same thing.
>>>>> fscrypt metadata create protector /mnt/disk
Create new protector on "/mnt/disk" [Y/n] y
Your data can be protected with one of the following sources:
The following protector sources are available:
1 - Your login passphrase (pam_passphrase)
2 - A custom passphrase (custom_passphrase)
3 - A raw 256-bit key (raw_key)
Expand Down
2 changes: 1 addition & 1 deletion cmd/fscrypt/prompt.go
Original file line number Diff line number Diff line change
Expand Up @@ -185,7 +185,7 @@ func promptForSource(ctx *actions.Context) error {
}

// We print all the sources with their number, description, and name.
fmt.Println("Your data can be protected with one of the following sources:")
fmt.Println("The following protector sources are available:")
for idx := 1; idx < len(metadata.SourceType_value); idx++ {
source := metadata.SourceType(idx)
description := sourceDescriptions[source]
Expand Down

0 comments on commit 10bbfcb

Please sign in to comment.