aboutsummaryrefslogtreecommitdiff
path: root/cmd/fscrypt/fscrypt.go
AgeCommit message (Collapse)Author
2020-05-09cmd/fscrypt: add FSCRYPT_CONSISTENT_OUTPUT environmental variableEric Biggers
Allow setting FSCRYPT_CONSISTENT_OUTPUT=1 in the environment to cause policies and protectors to sorted by last modification time. The CLI tests need this to make the output of 'fscrypt' ordered in a consistent way with regard to the operations performed.
2020-05-09cmd/fscrypt: add FSCRYPT_ROOT_MNT environmental variableEric Biggers
Allow overriding the mountpoint where login protectors are stored by setting the FSCRYPT_ROOT_MNT environmental variable. The CLI tests need this to avoid touching the real "/".
2020-05-09cmd/fscrypt: add FSCRYPT_CONF environmental variableEric Biggers
Allow overriding the location of fscrypt.conf by setting the FSCRYPT_CONF environmental variable. The CLI tests need this to avoid touching the real /etc/fscrypt.conf.
2020-03-23cmd: Simplify "fscrypt --version" output (#207)Joseph Richey
There's no need to include the build time, author, and copyright info in the output of "fscrypt --version". This information is: - Overly complex (the current string is hard to parse) - Inaccurate (there are other authors than just me) - Unnecessary (the Apache 2 license is for Source Code) - Makes reproducible builds impossible The default version string is just fine. Signed-off-by: Joe Richey <joerichey@google.com>
2020-01-05cmd/fscrypt: add 'fscrypt lock' commandEric Biggers
Add support for 'fscrypt lock'. This command "locks" a directory, undoing 'fscrypt unlock'. When the filesystem keyring is used, 'fscrypt lock' also detects when a directory wasn't fully locked due to some files still being in-use. It can then be run again later to try to finish locking the files.
2019-09-08Fix various typos and grammatical errors (#141)ebiggers
These were found by a combination of manual review and a custom script that checks for common errors. Also removed an outdated sentence from the comment for setupBefore().
2018-02-11lint: Remove all build tagsJoseph Richey
Our current build tags set off the linter. We will later add in more comprehensive build tags that will be properly formatted.
2017-08-29cmd/fscrypt: Stop dropping/raising for sudoJoseph Richey
2017-08-29Added +build linux,cgo flagsJoe Richey
2017-08-17cmd/fscrypt: purge command now clears cacheJoe Richey joerichey@google.com
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