]> git.apps.os.sepia.ceph.com Git - fscrypt.git/commit
Make all new metadata files owned by user when needed
authorEric Biggers <ebiggers@google.com>
Wed, 23 Feb 2022 20:35:04 +0000 (12:35 -0800)
committerEric Biggers <ebiggers@google.com>
Wed, 23 Feb 2022 20:35:04 +0000 (12:35 -0800)
commitd4ce0b892cbe68db9f90f4015342e6a9069b079c
tree9934a74b71590b5e4bcd0067391ffe3ec602a77a
parent85a747493ff368a72f511619ecd391016ecb933c
Make all new metadata files owned by user when needed

Since commit 4c7c6631cc5a ("Set owner of login protectors to correct
user"), login protectors are made owned by the user when root creates
one on a user's behalf.  That's good, but the same isn't true of other
files that get created at the same time:

- The policy protecting the directory
- The protector link file, if the policy is on a different filesystem
- The recovery protector, if the policy is on a different filesystem
- The recovery instructions file

In preparation for setting all metadata files to mode 0600, start making
all these files owned by the user in this scenario as well.
actions/policy.go
actions/policy_test.go
actions/protector.go
actions/protector_test.go
actions/recovery.go
cli-tests/t_encrypt_login.out
cli-tests/t_encrypt_login.sh
cmd/fscrypt/protector.go
filesystem/filesystem.go
filesystem/filesystem_test.go