aboutsummaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
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>
2022-08-18Merge pull request #362 from google/fix-cli-tests-2Joseph Richey
cli-tests: account for protojson whitespace randomization
2022-08-17cli-tests: account for protojson whitespace randomizationEric Biggers
Annoyingly, for JSON formatting protojson randomly selects a spacing method (one space or two spaces) depending on a hash of some sections of the Go binary, to discourage depending on its output being stable. This breaks some checks in the CLI tests of the contents of fscrypt.conf and the output of 'fscrypt status'. As there doesn't appear to be a straightforward alternative currently, for now just update the tests to take into consideration the possible extra space.
2022-04-16Try to detect process being forked during PAM transactionEric Biggers
Update https://github.com/google/fscrypt/issues/350
2022-04-09Merge pull request #354 from google/staticcheck-fixJoseph Richey
Upgrade dependencies to latest version
2022-04-08Merge pull request #355 from google/supported-filesystemsJoseph Richey
Add lustre to allowed filesystems and update documentation
2022-04-08Re-run 'make format' with latest version of gofmtEric Biggers
2022-04-08Switch to google.golang.org/protobuf/protoEric Biggers
github.com/golang/protobuf/proto has been deprecated in favor of google.golang.org/protobuf/proto, so migrate to the non-deprecated one.
2022-04-08Add lustre to allowed filesystems and update documentationEric Biggers
2022-04-08Use Go 1.18 in all other CI stepsJoe Richey
Signed-off-by: Joe Richey <joerichey@google.com>
2022-04-08Regenerate go.mod and go.sum with go 1.16Joe Richey
Signed-off-by: Joe Richey <joerichey@google.com>
2022-04-08Upgrade honnef.co/go/tools to latest versionEric Biggers
The version of 'staticcheck' (part of honnef.co/go/tools) we were pinning is incompatible with Go 1.18, as per https://github.com/dominikh/go-tools/issues/1165. To allow 'make lint' to work with Go 1.18 and later, upgrade honnef.co/go/tools to the latest version. This requires that several other modules be upgraded too.
2022-04-08Remove unnecessary uses of fmt.Sprintf()Eric Biggers
The latest version of 'staticcheck' warns about these.
2022-04-08Merge pull request #353 from google/go-versionJoseph Richey
Bump up required Go version to 1.16
2022-04-08Bump up required Go version to 1.16Eric Biggers
Bump up the required Go version to 1.16 so that we can assume that Go modules are enabled by default. Go 1.16 is the latest end-of-life release, so this makes it so that we support the latest end-of-life release (1.16), the current maintainance release (1.17), the current release (1.18), and future releases. This the same approach we took when we last bumped up the required Go version. Also update the ci.yml file to test with these versions.
2022-02-23v0.3.3v0.3.3Eric Biggers
2022-02-23Merge pull request #346 from google/fixesEric Biggers
Metadata validation and other security improvements
2022-02-23pam_fscrypt: ignore system usersEric Biggers
pam_fscrypt should never need to do anything for system users, so detect them early so that we can avoid wasting any resources looking for their login protector.
2022-02-23pam_fscrypt: log errors getting protector in policiesUsingProtector()Eric Biggers
If the error is anything other than ErrNotSetup, it might be helpful to know what is going on.