Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( ErrEmpty = errors.New("namespace path must not be empty") ErrAbsolute = errors.New("namespace path must be relative") ErrEscape = errors.New("namespace path must not escape root") ErrEmptyPart = errors.New("namespace path contains an empty segment") ErrPathConflict = errors.New("namespace path conflicts by case-folded key") // ErrDangling marks a symlink (or path) whose target does not exist. It is // distinct from ErrEscape so callers can warn (dangling) rather than block // (escape). ErrDangling = errors.New("symlink target does not exist") )
Functions ¶
func CheckSymlinkWithinRoot ¶
CheckSymlinkWithinRoot resolves path through symlinks and verifies the real target stays within root. It returns typed errors so callers can react precisely: ErrEscape (target outside root — block), ErrDangling (target missing — warn), or a wrapped IO error. errors.Is works against the sentinels.
func DetectCaseConflicts ¶
func VerifyWithinRoot ¶
VerifyWithinRoot re-validates, at use time, that target resolves to a real path inside root. It closes the TOCTOU window between an earlier scan-time check and a later materialization (hydrate/worktree) by re-resolving symlinks immediately before use. Returns ErrEscape when target escapes root.
Types ¶
Click to show internal directories.
Click to hide internal directories.