internal/validate: relocate from app

These are free of the dispatcher from internal/app. This change relocates them into their own package.

Signed-off-by: Ophestra <cat@gensokyo.uk>
This commit is contained in:
2025-10-29 03:40:09 +09:00
parent 65342d588f
commit 274686d10d
12 changed files with 80 additions and 65 deletions

View File

@@ -16,6 +16,7 @@ import (
"hakurei.app/container/fhs"
"hakurei.app/container/seccomp"
"hakurei.app/hst"
"hakurei.app/internal/validate"
"hakurei.app/message"
"hakurei.app/system"
"hakurei.app/system/acl"
@@ -243,7 +244,7 @@ func (s *spFilesystemOp) toSystem(state *outcomeStateSys) error {
continue
}
if ok, err := deepContainsH(p[0], hidePaths[i]); err != nil {
if ok, err := validate.DeepContainsH(p[0], hidePaths[i]); err != nil {
return &hst.AppError{Step: "determine path hiding outcome", Err: err}
} else if ok {
hidePathMatch[i] = true