Merge pull request #47498 from Dzejrou/lower-perm-fix

daemon: overlay2: remove world writable permission from the lower file
This commit is contained in:
Sebastiaan van Stijn 2024-03-06 13:09:30 +01:00 committed by GitHub
commit cb8c8e9631
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -406,7 +406,7 @@ func (d *Driver) create(id, parent string, opts *graphdriver.CreateOpts) (retErr
return err
}
if lower != "" {
if err := ioutils.AtomicWriteFile(path.Join(dir, lowerFile), []byte(lower), 0o666); err != nil {
if err := ioutils.AtomicWriteFile(path.Join(dir, lowerFile), []byte(lower), 0o644); err != nil {
return err
}
}