15 lines
255 B
Go
15 lines
255 B
Go
//go:build linux
|
|
|
|
package isolation
|
|
|
|
import (
|
|
"os"
|
|
"syscall"
|
|
)
|
|
|
|
func rootOwnedPythonMetadata(info os.FileInfo) bool {
|
|
s, ok := info.Sys().(*syscall.Stat_t)
|
|
return ok && s.Uid == 0
|
|
}
|
|
func canWritePythonMetadataCache() bool { return os.Geteuid() == 0 }
|