aboutsummaryrefslogtreecommitdiff
path: root/cli-tests
AgeCommit message (Collapse)Author
2020-05-09actions/policy: improve errorsEric Biggers
ErrMissingPolicyMetadata: Include the mount, directory path, and metadata path. Also move the explanation into actions/ since it doesn't refer to any CLI command. ErrPolicyMetadataMismatch: Include a lot more information. Also start checking for consistency of the policy key descriptors, not just the encryption options. Add a test for this. ErrDifferentFilesystem: Include the mountpoints. ErrOnlyProtector: Clarify the message and include the protector descriptor. ErrAlreadyProtected: ErrNotProtected: Include the policy and protector descriptors. ErrAccessDeniedPossiblyV2: Make it slightly clearer what failed. Also move the explanation into actions/ since it doesn't refer to any CLI command.
2020-05-09actions/protector: improve errorsEric Biggers
ErrProtectorName: Rename to ErrLoginProtectorName for clarity, and include the name and user. ErrMissingProtectorName: Include the correct protector source. ErrDuplicateName: Rename to ErrProtectorNameExists for clarity, and remove a level of wrapping by including the name directly. ErrDuplicateUID: Rename to ErrLoginProtectorExists for clarity, and remove a level of wrapping by including the user directly.
2020-05-09actions/config: improve config file related errorsEric Biggers
ErrBadConfig: Fix backwards wrapping, include the bad config, and make it clear that this is an internal error. ErrBadConfigFile: Fix backwards wrapping, include the config file location, and adjust the suggestion slightly. ErrConfigFileExists: Include the config file location. ErrNoConfigFile: Include the config file location, and adjust the suggestion slightly.
2020-05-09Try to detect incomplete locking of v1-encrypted directoryEric Biggers
'fscrypt lock' on a v1-encrypted directory doesn't warn about in-use files, as the kernel doesn't provide a way to easily detect it. Instead, implement a heuristic where we check whether a subdirectory can be created. If yes, then the directory must not be fully locked. Make both 'fscrypt lock' and 'fscrypt status' use this heuristic. Resolves https://github.com/google/fscrypt/issues/215
2020-05-09cli-tests: add t_v1_policy_fs_keyringEric Biggers
Test using v1 encryption policies (deprecated) with use_fs_keyring_for_v1_policies = true.
2020-05-09cli-tests: add t_v1_policyEric Biggers
Test using v1 encryption policies (deprecated).
2020-05-09cli-tests: add t_unlockEric Biggers
Test unlocking a directory.
2020-05-09cli-tests: add t_statusEric Biggers
Test getting global, filesystem, and unencrypted directory status when the filesystem is or isn't set up for fscrypt.
2020-05-09cli-tests: add t_setupEric Biggers
Test 'fscrypt setup'.
2020-05-09cli-tests: add t_passphrase_hashingEric Biggers
Test that the passphrase hashing seems to take long enough.
2020-05-09cli-tests: add t_not_supportedEric Biggers
Test that fscrypt fails when the filesystem doesn't support encryption.
2020-05-09cli-tests: add t_not_enabledEric Biggers
Test that fscrypt fails when the filesystem doesn't have the encrypt feature enabled. Then test enabling it.
2020-05-09cli-tests: add t_lockEric Biggers
Test locking a directory.
2020-05-09cli-tests: add t_encrypt_raw_keyEric Biggers
Test encrypting a directory using a raw_key protector.
2020-05-09cli-tests: add t_encrypt_loginEric Biggers
Test encrypting a directory using a login (pam_passphrase) protector.
2020-05-09cli-tests: add t_encrypt_customEric Biggers
Test encrypting a directory using a custom_passphrase protector.
2020-05-09cli-tests: add t_encryptEric Biggers
Add general tests for 'fscrypt encrypt'. For protector-specific tests, see t_encrypt_custom, t_encrypt_login, and t_encrypt_raw_key.
2020-05-09cli-tests: add t_change_passphraseEric Biggers
Test changing the passphrase of a custom_passphrase protector.
2020-05-09Add cli-tests frameworkEric Biggers
Add a framework for writing automated tests of the fscrypt command-line tool. See cli-tests/README.md for details.