From 10bbfcbfe125e9c9568031328e372c01ff144fc9 Mon Sep 17 00:00:00 2001 From: Eric Biggers Date: Wed, 27 Nov 2019 11:20:19 -0800 Subject: [PATCH] cmd/fscrypt: adjust message when listing protector sources 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 https://github.com/google/fscrypt/issues/164 --- README.md | 6 +++--- cmd/fscrypt/prompt.go | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index 017d0250..254b4588 100644 --- a/README.md +++ b/README.md @@ -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) @@ -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) @@ -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) diff --git a/cmd/fscrypt/prompt.go b/cmd/fscrypt/prompt.go index 5fce0c78..b854fb94 100644 --- a/cmd/fscrypt/prompt.go +++ b/cmd/fscrypt/prompt.go @@ -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]