1
0
Fork 0
mirror of https://github.com/Mic92/sops-nix.git synced 2024-12-14 11:57:52 +00:00

sops-install-secrets: check that both uid & gid are correct on mountpoints

This commit is contained in:
Jörg Thalheim 2023-11-03 15:15:06 +01:00 committed by Jörg Thalheim
parent c59da7ac29
commit 275b28593e

View file

@ -39,7 +39,7 @@ func SecureSymlinkChown(symlinkToCheck, expectedTarget string, owner, group int)
if err != nil {
return fmt.Errorf("cannot stat '%s': %w", symlinkToCheck, err)
}
if stat.Uid == uint32(owner) || stat.Gid == uint32(group) {
if stat.Uid == uint32(owner) && stat.Gid == uint32(group) {
return nil // already correct
}