carlos / platform Public

Clone
git clone https://amadan.net/carlos/platform

Plain git — no account needed to clone.

Download

Download this file

1//go:build unix && !linux
2
3package host
4
5import (
6 "golang.org/x/sys/unix"
7 "os"
8)
9
10func openRegistryDescriptor(parent int, name string) (int, error) {
11 return unix.Openat(parent, name, unix.O_RDONLY|unix.O_NOFOLLOW|unix.O_NONBLOCK|unix.O_CLOEXEC, 0)
12}
13
14func chownRegistryDescriptor(f *os.File, uid, gid int) error {
15 return f.Chown(uid, gid)
16}
17