//go:build unix && !linux package host import ( "golang.org/x/sys/unix" "os" ) func openRegistryDescriptor(parent int, name string) (int, error) { return unix.Openat(parent, name, unix.O_RDONLY|unix.O_NOFOLLOW|unix.O_NONBLOCK|unix.O_CLOEXEC, 0) } func chownRegistryDescriptor(f *os.File, uid, gid int) error { return f.Chown(uid, gid) }