2021-08-23 09:14:53 -04:00
|
|
|
//go:build !windows
|
2014-11-13 15:00:04 -05:00
|
|
|
// +build !windows
|
|
|
|
|
2018-02-05 16:05:59 -05:00
|
|
|
package system // import "github.com/docker/docker/pkg/system"
|
2014-11-13 15:00:04 -05:00
|
|
|
|
|
|
|
import (
|
2017-05-23 10:22:32 -04:00
|
|
|
"golang.org/x/sys/unix"
|
2014-11-13 15:00:04 -05:00
|
|
|
)
|
|
|
|
|
2015-07-28 12:13:12 -04:00
|
|
|
// Umask sets current process's file mode creation mask to newmask
|
2016-04-09 09:18:15 -04:00
|
|
|
// and returns oldmask.
|
2014-11-13 15:00:04 -05:00
|
|
|
func Umask(newmask int) (oldmask int, err error) {
|
2017-05-23 10:22:32 -04:00
|
|
|
return unix.Umask(newmask), nil
|
2014-11-13 15:00:04 -05:00
|
|
|
}
|