aboutsummaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2025-11-04Upgrade golang.org/x/toolsEric Biggers
Ran the following commands, using Go 1.23.12: go get golang.org/x/tools@v0.36.0 go mod tidy ... where v0.36.0 is the latest version that supports Go 1.23.
2025-11-04Upgrade honnef.co/go/toolsEric Biggers
Ran the following commands, using Go 1.23.12: go get honnef.co/go/tools go mod tidy
2025-11-04Upgrade google.golang.org/protobufEric Biggers
Ran the following commands, using Go 1.23.12: go get google.golang.org/protobuf go mod tidy make gen
2025-11-04Upgrade golang.org/x/cryptoEric Biggers
Ran the following commands, using Go 1.23.12: go get golang.org/x/crypto@v0.41.0 go mod tidy ... where v0.41.0 is the latest version that supports Go 1.23.
2025-11-04Upgrade golang.org/x/termEric Biggers
Ran the following commands, using Go 1.23.12: go get golang.org/x/term@v0.34.0 go mod tidy ... where v0.34.0 is the latest version that supports Go 1.23.
2025-11-04Upgrade golang.org/x/sysEric Biggers
Ran the following commands, using Go 1.23.12: go get golang.org/x/sys@v0.35.0 go mod tidy ... where v0.35.0 is the latest version that supports Go 1.23.
2025-11-04Bump up required Go version to 1.23Eric Biggers
2025-02-24filesystem/mountpoint: fall back to using mount source fieldEric Biggers
This hopefully resolves https://github.com/google/fscrypt/issues/382.
2025-02-17ci.yml: upgrade ubuntu-20.04 to ubuntu-latestEric Biggers
GitHub Actions will drop support for ubuntu-20.04 soon.
2025-02-17Fix non-constant format string passed to errors.Wrapf()Eric Biggers
Do not pass a path as the format string argument to errors.Wrapf(), as this causes it to be misinterpreted as a format string, causing an unexpected message if the path contains something like '%s'. Instead use errors.Wrap(). This was diagnosed by Go 1.24. Fixes https://github.com/google/fscrypt/issues/422
2025-02-17build(deps): bump golang.org/x/crypto in the go_modules groupdependabot[bot]
Bumps the go_modules group with 1 update: [golang.org/x/crypto](https://github.com/golang/crypto). Updates `golang.org/x/crypto` from 0.17.0 to 0.31.0 - [Commits](https://github.com/golang/crypto/compare/v0.17.0...v0.31.0) --- updated-dependencies: - dependency-name: golang.org/x/crypto dependency-type: direct:production dependency-group: go_modules ... Signed-off-by: dependabot[bot] <support@github.com>
2024-12-27README.md: fix a typoEric Biggers
2024-12-03Document stdin behaviour for getting raw keyPetteri Räty
Document the logic described in makeRawKey.
2024-05-02Compare mount by value instead of referenceNymanRobin
This has to be since the mounts are reloaded each time a mount is added. In case of two mounts mounting at the same time there will be a race condition for applying policy. Signed-off-by: NymanRobin <robin.nyman@est.tech>
2024-04-30README.md: link to RFE about systemd-homed fscrypt version support (#412)dkg
README.md: link to RFE about systemd-homed fscrypt version support Including a link to the specific report can help a reader recognize when the warning about systemd-homed is no longer important. It might also help to drive attention to the right place to improve systemd-homed. Co-authored-by: Joe Richey <joerichey@google.com> Co-authored-by: <dkg@fifthhorseman.net>
2024-03-19v0.3.5v0.3.5Eric Biggers
2024-03-19Upgrade google.golang.org/protobuf to v1.33.0Eric Biggers
2024-02-17README.md: remove old warning about ext4 encryption on removable mediaEric Biggers
This warning is only applicable for systems with kernel versions older than v4.1, which is now too old to be worth the mention here.
2024-02-17README.md: update documentation about alternativesEric Biggers
2024-02-06ci.yml: use actions/checkout@v4Eric Biggers
This addresses the following warning from GitHub Actions: Node.js 16 actions are deprecated. Please update the following actions to use Node.js 20: actions/checkout@v3. For more information see: https://github.blog/changelog/2023-09-22-github-actions-transitioning-from-node-16-to-node-20/. A near-identical warning forced everyone to upgrade to v3 last year, so this is some pointless churn, but let's just get it over with again...
2023-12-26build(deps): bump golang.org/x/crypto from 0.13.0 to 0.17.0dependabot[bot]
Bumps [golang.org/x/crypto](https://github.com/golang/crypto) from 0.13.0 to 0.17.0. - [Commits](https://github.com/golang/crypto/compare/v0.13.0...v0.17.0) --- updated-dependencies: - dependency-name: golang.org/x/crypto dependency-type: direct:production ... Signed-off-by: dependabot[bot] <support@github.com>
2023-12-11Provide better error message when given a locked regular fileEric Biggers
Since opening an encrypted regular file that is locked fails with ENOKEY, getting the encryption policy of such a file is not possible. As a result, 'fscrypt status' and 'fscrypt lock' fail on such files. Provide a better error message that tries to explain what is going on. Resolves https://github.com/google/fscrypt/issues/393
2023-11-02README.md, errors.go: CephFS now supports fscryptEric Biggers
2023-09-09Bump up required Go version to 1.18Eric Biggers
2023-09-09Upgrade github.com/urfave/cliEric Biggers
2023-09-09Upgrade honnef.co/go/toolsEric Biggers
2023-09-09Upgrade google.golang.org/protobufEric Biggers
2023-09-09Upgrade golang.org/x/toolsEric Biggers
2023-09-09Upgrade golang.org/x/cryptoEric Biggers
2023-09-09Upgrade golang.org/x/termEric Biggers
2023-09-09Upgrade golang.org/x/sysEric Biggers
2023-09-09Fixup for previous commitEric Biggers
2023-09-09Stop using golang.org/x/lintEric Biggers
golint is not supported anymore. See https://github.com/golang/go/issues/38968. We already use both 'go vet' and 'staticcheck' which are maintained.
2023-09-09README.md: don't recommend 'go get'Eric Biggers
With the latest version of go, the recommended 'go get' commands fail: go: go.mod file not found in current directory or any parent directory. 'go get' is no longer supported outside a module. To build and install a command, use 'go install' with a version, like 'go install example.com/cmd@latest' For more information, see https://golang.org/doc/go-get-install-deprecation or run 'go help get' or 'go help install'. Replace them with commands that work.
2023-09-09mountpoint_test: skip TestLoadSourceDevice if loop0 doesn't existEric Biggers
Probably resolves https://github.com/google/fscrypt/issues/382
2023-09-09Re-run 'make format' with latest version of gofmtEric Biggers
2023-09-09Adjust nested lists to prevent gofmt from flattening themEric Biggers
The latest version of gofmt flattens the nested lists in comments in crypto.go and filesystem.go. According to https://go.dev/doc/comment#mistakes, "Go doc comments do not support nested lists". However, that page also mentions that a workaround is to use different list markers for each level. Do that.
2023-01-30v0.3.4v0.3.4Eric Biggers
2023-01-30Add a NEWS fileEric Biggers
Copy the GitHub release notes into a NEWS.md file so that the release notes are included in the actual git repo. This way, they aren't hidden away in GitHub, where they require an internet connection to access and will be lost if GitHub ever goes away. This also makes the release notes be properly versioned; GitHub allows past release notes to be edited, and there doesn't seem to be any record of what changed. Finally, this allows packages to install the release notes into /usr/share/doc/$pkgname/, as is the usual convention.
2023-01-30ci.yml: upgrade to actions/checkout@v3Eric Biggers
This avoids the following warning from GitHub Actions: Node.js 12 actions are deprecated. Please update the following actions to use Node.js 16: actions/checkout@v2.
2022-12-04Only use up to MaxParallelism CPUsJoe Richey
This prevents panics on 256-core systems, and has a 300-core system use 255 CPUs (the max) rather than 44 CPUs (300 casted to a uint8). Signed-off-by: Joe Richey <joerichey@google.com> [ebiggers: also set TruncationFixed at the end of getHashingCosts()] Signed-off-by: Eric Biggers <ebiggers@google.com>
2022-12-04Increase checks for invalid HashingCostsJoe Richey
Signed-off-by: Joe Richey <joerichey@google.com> [ebiggers: moved the new checks from PassphraseHash to CheckValidity] Signed-off-by: Eric Biggers <ebiggers@google.com>
2022-12-04Add truncation_fixed field to HashingCostsJoe Richey
This allows us to fix the bug where Parallelism is inadvertantly truncated to 8 bits in a backwards compatible way. Signed-off-by: Joe Richey <joerichey@google.com>
2022-12-04Update file commentJoe Richey
We now create the `*pb.go` files via the makefile instead of though `go generate`. Signed-off-by: Joe Richey <joerichey@google.com>
2022-12-04Stop using deprecated package io/ioutilEric Biggers
Since Go 1.16 (which recently became the minimum supported Go version for this project), the package io/ioutil is deprecated in favor of equivalent functionality in the io and os packages. staticcheck warns about this. Address all the warnings by switching to the non-deprecated replacement functions.
2022-12-04pam_fscrypt: filter out irrelevant policies earlierEric Biggers
If a session is opened for a user twice and the second doesn't have the AUTHTOK data, pam_fscrypt prints an error message that says it failed to unlock a protector because AUTHTOK data is missing. This is misleading because the protector and its associated policies were already unlocked by the first session. To avoid this, move the check for whether the policy is provisioned or not into policiesUsingProtector(). Also do the same for CloseSession.
2022-10-19Make pam_fscrypt.so support the unlock_only optionEric Biggers
Now that it's been requested by users, bring back the "unlock_only" option, which was originally proposed as part of https://github.com/google/fscrypt/pull/281 but was dropped in the final version of that pull request. Resolves https://github.com/google/fscrypt/issues/357
2022-10-19Add support for AES_256_HCTR2 filenames encryptionEric Biggers
Support for AES_256_HCTR2 filenames encryption was added in kernel version 6.0. The kernel doesn't yet support AES_256_HCTR2 for contents encryption.
2022-08-27Ignore JSON whitespace in tests (#364)Joseph Richey
Follow up to #362 Protojson randomly inserts whitespace to indicate that the output is unstable, breaking out tests. To fix this, compact the output before comparison. Signed-off-by: Joe Richey <joerichey@google.com> Signed-off-by: Joe Richey <joerichey@google.com>
2022-08-23fsync set policy ioctlsMarcel Lauhoff
Split policyIoctl into setPolicyIoctl and getPolicyIoctl. Add a os.Sync() call to setPolicyIoctl. Policy ioctls are not necessary durable on return. For example, on ext4 (ref: fs/ext4/crypto.c: ext4_set_context) they are not. This may lead to a filesystem containing fscrypt metadata (in .fscrypt), but without the policy applied on an encrypted directory. Example: Snapshotting a mounted ext4 filesystem on Ceph RBD right after setting the policy. While subject to timing, with high probability the snapshot will not have the policy set. Calling fsync fixes this. Signed-off-by: Marcel Lauhoff <marcel.lauhoff@suse.com>