garm/vendor/github.com/lxc/lxd/shared/util_unix.go
Gabriel Adrian Samfira bbbe67bf7c Vendor packages and add Makefile
* Vendors packages
  * Adds a Makefile that uses docker to build a static binary against musl
using alpine linux.

Signed-off-by: Gabriel Adrian Samfira <gsamfira@cloudbasesolutions.com>
2022-06-30 10:20:32 +00:00

15 lines
270 B
Go

//go:build !windows
package shared
import (
"os"
"syscall"
)
func GetOwnerMode(fInfo os.FileInfo) (os.FileMode, int, int) {
mode := fInfo.Mode()
uid := int(fInfo.Sys().(*syscall.Stat_t).Uid)
gid := int(fInfo.Sys().(*syscall.Stat_t).Gid)
return mode, uid, gid
}