13 lines
459 B
Go
13 lines
459 B
Go
//go:build !windows
|
|
|
|
package main
|
|
|
|
import "syscall"
|
|
|
|
// openNoFollow is the O_NOFOLLOW flag handed to os.OpenFile and the safeOpen*/
|
|
// safeWrite* helpers: the final path component must never be followed through
|
|
// a symlink planted in a server directory. The targets this daemon builds for
|
|
// (linux, darwin, the BSDs) define it in syscall; windows does not and gets a
|
|
// dedicated stub - see opennofollow_windows.go.
|
|
const openNoFollow = syscall.O_NOFOLLOW
|