1
0
Fork 0
mirror of https://github.com/moby/moby.git synced 2022-11-09 12:21:53 -05:00

libnetwork: sandbox.updateDNS(): use const for file permissions

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
This commit is contained in:
Sebastiaan van Stijn 2022-10-02 01:02:22 +02:00
parent f0be4d126d
commit 60ace31be0
No known key found for this signature in database
GPG key ID: 76698F39D527CE8C

View file

@ -20,8 +20,8 @@ import (
const (
defaultPrefix = "/var/lib/docker/network/files"
dirPerm = 0755
filePerm = 0644
dirPerm = 0o755
filePerm = 0o644
)
func (sb *sandbox) startResolver(restore bool) {
@ -332,7 +332,7 @@ func (sb *sandbox) updateDNS(ipv6Enabled bool) error {
if err != nil {
return err
}
err = os.WriteFile(sb.config.resolvConfPath, newRC.Content, 0644) //nolint:gosec // gosec complains about perms here, which must be 0644 in this case
err = os.WriteFile(sb.config.resolvConfPath, newRC.Content, filePerm)
if err != nil {
return err
}