aboutsummaryrefslogtreecommitdiffhomepage
path: root/cmd/fsu
diff options
context:
space:
mode:
authorOphestra Umiker <cat@ophivana.moe>2024-11-04 12:32:14 +0900
committerOphestra Umiker <cat@ophivana.moe>2024-11-04 12:32:14 +0900
commit88abcbe0b2379b98fdf62a54432fd12aca752d3a (patch)
treef05056eca3b77702295e76e97fc0b0cdd1aeaa23 /cmd/fsu
parentaf15b1c048e97c092f7a5eeb30f20d13cd972486 (diff)
cmd/fsu: remove import of internal package
Signed-off-by: Ophestra Umiker <cat@ophivana.moe>
Diffstat (limited to 'cmd/fsu')
-rw-r--r--cmd/fsu/main.go11
1 files changed, 8 insertions, 3 deletions
diff --git a/cmd/fsu/main.go b/cmd/fsu/main.go
index 2d3ad8bf..76343e27 100644
--- a/cmd/fsu/main.go
+++ b/cmd/fsu/main.go
@@ -8,16 +8,17 @@ import (
"strconv"
"strings"
"syscall"
-
- "git.ophivana.moe/security/fortify/internal"
)
const (
+ compPoison = "INVALIDINVALIDINVALIDINVALIDINVALID"
fsuConfFile = "/etc/fsurc"
envShim = "FORTIFY_SHIM"
envAID = "FORTIFY_APP_ID"
)
+var Fmain = compPoison
+
func main() {
log.SetFlags(0)
log.SetPrefix("fsu: ")
@@ -33,7 +34,7 @@ func main() {
}
var fmain string
- if p, ok := internal.Path(internal.Fmain); !ok {
+ if p, ok := checkPath(Fmain); !ok {
log.Fatal("invalid fortify path, this copy of fsu is not compiled correctly")
} else {
fmain = p
@@ -137,3 +138,7 @@ func parseConfig(p string, puid int) (fid int, ok bool) {
return -1, false
}
}
+
+func checkPath(p string) (string, bool) {
+ return p, p != compPoison && p != "" && path.IsAbs(p)
+}