aboutsummaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2021-09-13README: add section about encrypting existing filesEric Biggers
2021-09-13README: consistently format section titlesEric Biggers
Capitalize the first word only, and don't use periods.
2021-09-13README: add section about backup, restore, and recoveryEric Biggers
Resolves https://github.com/google/fscrypt/issues/51 Resolves https://github.com/google/fscrypt/issues/115
2021-09-13README: remove note about stabilityEric Biggers
A lot of people are already using fscrypt, so in practice we haven't been breaking backwards compatibility and aren't going to. Just remove the scary-sounding "Note about stability".
2021-09-13README: remove note about planned commandsEric Biggers
These would still be nice to add. However, the mention of them in the README is misleading because people reading it might come away with the impression that there is currently no way to back up fscrypt metadata or to recover directories -- which isn't true. (The fscrypt metadata is just a directory which can be backed up like any other directory. And 'fscrypt encrypt' already offers to generate a recovery passphrase when the directory and protector are on different filesystems.) Just remove this note; it doesn't really add any value.
2021-08-31Merge pull request #309 from ebiggers/troubleshootingJoseph Richey
Updates to the troubleshooting documentation
2021-08-31README: document symlink size bugEric Biggers
Update https://github.com/google/fscrypt/issues/305
2021-08-31README: documentation tweaksEric Biggers
Clarify some of the troubleshooting documentation.
2021-07-16cli-tests: fix failure with latest bash versionEric Biggers
2021-07-16README: add troubleshooting section for ENOPKG errorEric Biggers
Inspired by https://reddit.com/r/linuxquestions/comments/n75dv4
2021-06-27README: add troubleshooting section for keyring linkage issueEric Biggers
Fixes https://github.com/google/fscrypt/issues/194 Update https://github.com/google/fscrypt/issues/100
2021-06-27cmd/fscrypt: fix detection of GRUB installationEric Biggers
Fix the GRUB detection logic to take into account that MOUNTPOINT/boot/grub might not be on the same filesystem as MOUNTPOINT, due to MOUNTPOINT/boot being another mountpoint. The warning is only appropriate when GRUB is installed on the same filesystem that encryption is going to be enabled on.
2021-06-14README: improve troubleshooting tips for unlocked encrypted filesEric Biggers
Rename the troubleshooting section "Can't log in with ssh even when user's encrypted home directory is unlocked" to the more general "Some processes can't access unlocked encrypted files", and rewrite it to provide clearer directions for how to fix the problem by upgrading encrypted directories to policy version 2. Also add a related section "Users can access other users' unlocked encrypted files" which covers the reverse "issue", i.e. people expecting some processes to *not* be able to access unlocked encrypted files. Fixes https://github.com/google/fscrypt/issues/248
2021-06-09README: improve troubleshooting section for login protector not in syncEric Biggers
Update https://github.com/google/fscrypt/issues/273
2021-05-24Merge pull request #292 from josephlr/memJoseph Richey
Only use 1/8 of the system RAM and run the Garbage Collector in the timing loop
2021-05-24Run the Garbage Collector in the timing loopJoe Richey
Running `crypto.PassphraseHash` in a loop allocates a lot of memory. Golang is not always prudent about collecting the garbage from previous runs, resulting in a OOM error on memory-pressured systems. With a `maxMemoryBytes` of 128 MiB, this change reduces the maximum resident memory for `fscrypt setup` to 141 MiB (was perviously 405 MiB) Signed-off-by: Joe Richey <joerichey@google.com>
2021-05-24Only use 1/8 of the system RAMJoe Richey
On systems with high memory pressure, using half of the entire RAM for hashing can result in fscrypt getting OOM killed. Signed-off-by: Joe Richey <joerichey@google.com>
2021-05-12filesystem: skip TestHaveReadAccessTo() when running as rootEric Biggers
Root can read all files, so this test fails when running as root. Skip it instead. Resolves https://github.com/google/fscrypt/issues/288
2021-05-05Specify -buildmode=c-shared after GO_FLAGS rather than beforeEric Biggers
When building pam_fscrypt.so, specify -buildmode=c-shared after $(GO_FLAGS) so that it overrides any user-specified buildmode. This is needed to allow -buildmode=pie to be specified in GO_FLAGS if the packager wants to build fscrypt as a position-independent executable (e.g. following https://wiki.archlinux.org/title/Go_package_guidelines). Previously, trying to do this caused pam_fscrypt.so to be incorrectly built as an executable rather than as a shared library.
2021-04-27cmd/fscrypt: fix word mismatch "protector" => "policy"Gibeom Gwon
Fix word mismatch in usage and description of metadata create policy command.
2021-04-22cmd/fscrypt: use golang.org/x/termTobias Klauser
The golang.org/x/crypto/ssh/terminal package is deprecated and merely a wrapper around golang.org/x/term. Thus, use the latter directly.
2021-04-22Makefile: Optionally avoid installation of Ubuntu-specific PAM configFlorian Schmaus
This allows non Ubuntu distributions to opt out from the installation of Ubuntu-specific PAM files.
2021-03-31Release version v0.3.0 (#282)v0.3.0Eric Biggers
2021-03-31Merge pull request #283 from google/coverageJoseph Richey
Stop generating and uploading coverage in CI
2021-03-31Only run CI on master branch and PRs to masterJoe Richey
This avoids duplicate CI checks Signed-off-by: Joe Richey <joerichey@google.com>
2021-03-31Stop generating and uploading coverage in CIJoe Richey
This is currently broken, and we don't really use the findings. Signed-off-by: Joe Richey <joerichey@google.com>
2021-03-09Merge pull request #281 from ebiggers/pam_fscrypt-updatesJoseph Richey
pam_fscrypt: eliminate unnecessary options and improve documentation
2021-03-08README: improve PAM configuration documentation (again)Eric Biggers
Make some more corrections: - pam-config-framework isn't actually Ubuntu-specific but actually applies to Debian and any Debian derivative. - The pam-config-framework file is indeed installed by `make install`, just not into the correct location. - On Debian (and Debian derivatives), the PAM configuration isn't actually part of the 'fscrypt' package but rather 'libpam-fscrypt'. - Clarify where to add the pam_fscrypt.so session hook.
2021-03-08README: make it clear that pam_fscrypt also handles lockingEric Biggers
There are several mentions of pam_fscrypt handling unlocking directories. Make sure to mention locking alongside this.
2021-03-08pam_fscrypt: make "lock_policies" the default behaviorEric Biggers
All pam_fscrypt configuration guides that I'm aware of say to use the "lock_policies" option for the pam_fscrypt.so session hook. The Debian/Ubuntu pam-config-framework config file has it too. Make locking the default behavior, since this is what everyone wants. Existing configuration files that contain the "lock_policies" option will continue to work, but that option won't do anything anymore. (We could add an option "unlock_only" to restore the old default behavior, but it's not clear that it would be useful. So for simplicity, leave it out for now.)
2021-03-08pam_fscrypt: decide cache dropping behavior automaticallyEric Biggers
Configuring whether pam_fscrypt drops caches or not isn't really something the user should have to do, and it's also irrelevant for v2 encryption policies (the default on newer systems). It's better to have pam_fscrypt automatically decide whether it needs to drop caches or not. Do this by making pam_fscrypt check whether any encryption policy keys are being removed from a user keyring (rather than from a filesystem keyring). If so, it drops caches; otherwise it doesn't. This supersedes the "drop_caches" option, which won't do anything anymore.
2021-03-03pam_fscrypt/config: prioritise over other session modulesRobert McQueen
Services launched by systemd user sessions on Debian / Ubuntu systems are often not able to access the home directory, because there is no guarantee / requirement that pam_fscrypt is sequenced before pam_systemd. Although this pam-config mechanism is Debian-specific, the config file is provided here upstream and unmodified in Debian. Raising the priority here so that it's always ordered ahead of pam_systemd will solve issues such as https://github.com/google/fscrypt/issues/270, https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=964951 and https://bugs.launchpad.net/ubuntu/+source/systemd/+bug/1889416. After a survey of pam-config files available in Debian bullseye, the value of 100 was chosen as it appears after most other plugins that could be involved in more explicit homedir configuration (eg pam_mount at 128) but before those which seem unlikely to work without a home directory (eg pam_ssh at 64).
2021-02-02ci.yml: always run apt-get updateEric Biggers
In GitHub Workflows, apparently running 'apt-get update' before 'apt-get install' is sometimes needed, and it doesn't hurt to always do it.
2021-01-25Avoid using the word "whitelist"Eric Biggers
2021-01-19cmd/fscrypt: fix missing protector error formatAlastair Hughes
Update #272
2020-11-30bash-completion: add completion scriptHenry-Joseph Audéoud
2020-11-26README: Fix badge imageJoe Richey
Workflow names are case-sensitive Signed-off-by: Joe Richey <joerichey@google.com>
2020-11-26Switch from Travis CI to GitHub ActionsEric Biggers
travis-ci.org is being shut down, so switch to GitHub Actions. It should be mostly equivalent, but I did drop functionality in a couple cases: - Publishing release binaries. I don't think providing Linux binaries is useful, since people build their own anyway. So I left this out. - Build and testing on ppc64le. GitHub Actions only natively supports x86. I tried uraimo/run-on-arch-action, which uses Docker and QEMU user-mode emulation, but the fscrypt tests can't be run because QEMU user-mode emulation doesn't support all the needed system calls.
2020-11-26cli-tests: force processes spawned by 'expect' to have 80 column-outputEric Biggers
Otherwise the cli tests fail when executed from GitHub Actions.
2020-11-09README.md: add table of contentsEric Biggers
2020-11-07travis.yml: upgrade to Ubuntu 20.04 and enable cli testsEric Biggers
Now that Travis CI supports a version of Ubuntu that has a kernel that supports v2 encryption policies, upgrade to it and enable the cli tests.
2020-11-07cmd/fscrypt: fix race condition in getPassphraseKey()Eric Biggers
Set the terminal to raw mode *before* printing the prompt. Otherwise the user (or the automated test) might enter the passphrase before the terminal gets put into raw mode. This is needed for some of the CLI tests to pass reliably in Travis CI.
2020-11-07cli-tests/common.sh: fix _user_do()Eric Biggers
Apparently, on some distros 'su' doesn't preserve $PATH. So, manually export it in the command. Also, ensure that the shell stays as bash. This is needed for some of the CLI tests to pass in Travis CI.
2020-11-07cmd/fscrypt: fix isDirUnlockedHeuristic() on latest kernelsEric Biggers
On an "incompletely locked" directory, isDirUnlockedHeuristic() is supposed to return true, but on Linux v5.10-rc1 and later it returns false since now creating a subdirectory fails rather than succeeds. This change was intentional, so make isDirUnlockedHeuristic() apply a second heuristic too: also return true if any filenames in the directory don't appear to be valid no-key names. This fixes cli-tests/t_v1_encrypt on Linux v5.10-rc1 and later.
2020-10-15Travis-ci: added support for ppc64le (#257)sanjaymsh
2020-08-09Fix nil error issue, Resolves https://github.com/google/fscrypt/issues/242bitcodr
2020-08-07README.md: recommend 'sudo make install PREFIX=/usr' on Ubuntu (#244)Eric Biggers
Ubuntu's PAM configuration framework only recognizes files in /usr, not /usr/local. So for installs from source, unfortunately we have to recommend installing to /usr, despite this not being conventional. Resolves https://github.com/google/fscrypt/issues/240
2020-06-13Release version v0.2.9 (#238)v0.2.9Eric Biggers
2020-06-13Merge pull request #237 from ebiggers/t_v1_policy_fixEric Biggers
Adjust status message for v1 policies unlocked by another user and fix cli-tests/t_v1_policy
2020-06-13cmd/fscrypt: adjust status message for v1-encrypted dirsEric Biggers
When 'fscrypt status DIR' detects that a v1-encrypted directory is still usable but its key seems to be absent, it shows the status as "Unlocked: Partially (incompletely locked)". But actually it can also be the case that the directory is unlocked by another user. Adjust the status message accordingly. This commit also fixes cli-tests/t_v1_policy.