// Copyright 2018 The Go Authors. All rights reserved.// Use of this source code is governed by a BSD-style// license that can be found in the LICENSE file.packageuniximport("syscall""unsafe")// Unveil implements the unveil syscall.// For more information see unveil(2).// Note that the special case of blocking further// unveil calls is handled by UnveilBlock.funcUnveil(pathstring,flagsstring)error{pathPtr,err:=syscall.BytePtrFromString(path)iferr!=nil{returnerr}flagsPtr,err:=syscall.BytePtrFromString(flags)iferr!=nil{returnerr}_,_,e:=syscall.Syscall(SYS_UNVEIL,uintptr(unsafe.Pointer(pathPtr)),uintptr(unsafe.Pointer(flagsPtr)),0)ife!=0{returne}returnnil}// UnveilBlock blocks future unveil calls.// For more information see unveil(2).funcUnveilBlock()error{// Both pointers must be nil.varpathUnsafe,flagsUnsafeunsafe.Pointer_,_,e:=syscall.Syscall(SYS_UNVEIL,uintptr(pathUnsafe),uintptr(flagsUnsafe),0)ife!=0{returne}returnnil}