aboutsummaryrefslogtreecommitdiff
path: root/cmd/fscrypt
AgeCommit message (Collapse)Author
2017-07-17cmd/fscrypt: more nits to fix "make lint"Joe Richey joerichey@google.com
2017-07-17cmd/fscrypt: username and login token fixJoe Richey joerichey@google.com
The commit changes how we get the username representation, and uses the new pam API for checking the proposed login token.
2017-07-17cmd/fscrypt: prompts now use command functionsJoe Richey joerichey@google.com
2017-07-17cmd/fscrypt: Improve "fscrypt status"Joe Richey joerichey@google.com
Now that we can distinguish between lacking encryption support and lacking fscrypt metadata, "fscrypt status" can now display this additional information.
2017-07-17cmd/fscrypt: Check support before encryptingJoe Richey joerichey@google.com
Almost all actions only need to to check that the fscrypt metadata exists (this is handled by the Mount methods). Only "fscrypt encrypt" need to be sure the filesystem also supports encryption, so this check is added.
2017-07-14cmd/fscrypt: fix protector and policy cleanupJoe Richey joerichey@google.com
Protectors are only reverted if they were created, and Policies are only depovisioned on failure.
2017-06-28Finalize import paths and documentationv0.1.00.1.0Joe Richey joerichey@google.com
This commit changes all the internal import paths from `fscrypt/foo` to `github.com/google/fscrypt/foo` so that it can be built once we release externaly. The documentation in README.md is updated accordingly. Also, the README has a note noting that we do not make any guarantees about project stability before 1.0 (when it ships with Ubuntu). Change-Id: I6ba86e442c74057c8a06ba32a42e17f94833e280
2017-06-28cmd/fscrypt: commands to add/remove protectorsJoe Richey joerichey@google.com
This commit adds in the "fscrypt metadata add-protector-to-policy" and the "fscrypt metadata remove-protector-from-policy" subcommands. These commands allow for the creating of policies protected by multiple protectors. Change-Id: Id7e6c057448d15757c838a82d487a1b9806f585d
2017-06-28cmd/fscrypt: add metadata commandJoe Richey joerichey@google.com
This command adds in the "fscrypt metadata" command. This command allows advanced users to manipulate the metadata directly instead of just creating a policy or protector as an option when encrypting a directory. As some of these methods will require certain flags, error handling for this case is also added. As the change passphrase method must indicate when a old vs new password is necessary, additional KeyFuncs are added which add this indicator. Change-Id: Ibc92872088fae078df3c0eebd4f0cfcb7252d781
2017-06-28cmd/fscrypt: add in status and purge commandsJoe Richey joerichey@google.com
This commit adds in the status command, which has 2 functions, allowing the user to query the state of the entire system or a specific filesystem. This commit also adds in the purge command to remove all policy keys corresponding to a filesystem. This (along with getting the unlock status for the status commands) uses additional keyctl functionality in the crypto and actions packages. Change-Id: Ic8e097b335c044c0b91973eff19753f363f4525d
2017-06-28cmd/fscrypt: setup, encrypt, unlock commandsJoe Richey joerichey@google.com
This commit adds in the framework for adding commands and subcommands to the fscrypt tool. This commit adds in the "setup", "encrypt", and "unlock" commands. Additional information can be found by running: fscrypt <command> --help. This commit defines how flags are parsed and errors are handled. It also creates an extensible framework for prompting the user for information. Change-Id: I159d7f44ee2b2bbc5e072f0802850e082d9a13ce
2017-05-02cmd/fscrypt: Initial stub program and docsJoe Richey
This commit adds in a stub fscrypt program. The binary just tells the time and the tests do nothing, but the Makefile will build them! This commit also adds documentation to the README that explains how to get, build, run, test, format, lint, and install the code. Also note that the executable is now in the cmd/fscrypt directory. The library implementing the core functionality will be at the root. This is essentially point 2 of https://medium.com/@benbjohnson/structuring-applications-in-go-3b04be4ff091 Change-Id: Ib7bd782e458bdf3db456beb978be4c75b4734561