Files
podman/vendor/github.com/containers/common/pkg/umask/umask_unix.go
Valentin Rothberg ff2e6291a5 vendor c/common
Update the recent events-log changes to fix the build error.

[NO NEW TESTS NEEDED] since there's no functional change.

Signed-off-by: Valentin Rothberg <vrothberg@redhat.com>
2022-04-21 13:43:58 +02:00

22 lines
339 B
Go

//go:build linux || darwin
// +build linux darwin
package umask
import (
"syscall"
"github.com/sirupsen/logrus"
)
func Check() {
oldUmask := syscall.Umask(0o022) //nolint
if (oldUmask & ^0o022) != 0 {
logrus.Debugf("umask value too restrictive. Forcing it to 022")
}
}
func Set(value int) int {
return syscall.Umask(value)
}