fix darwin
This commit is contained in:
parent
2316271bf9
commit
a0828c98ab
3 changed files with 46 additions and 13 deletions
|
|
@ -492,19 +492,6 @@ func (a *Agent) GetWMIInfo() map[string]interface{} {
|
|||
return wmiInfo
|
||||
}
|
||||
|
||||
func tmpNoExec() bool {
|
||||
var stat syscall.Statfs_t
|
||||
var noexec bool
|
||||
|
||||
tmpdir := os.TempDir()
|
||||
if err := syscall.Statfs(tmpdir, &stat); err == nil {
|
||||
if stat.Flags&syscall.MS_NOEXEC != 0 {
|
||||
noexec = true
|
||||
}
|
||||
}
|
||||
return noexec
|
||||
}
|
||||
|
||||
func createNixTmpFile() (*os.File, error) {
|
||||
var f *os.File
|
||||
noexec := tmpNoExec()
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue