cmd/fpkg: call app in-process
Wrapping fortify is slow, painful and error-prone. Start apps in-process instead. Signed-off-by: Ophestra <cat@gensokyo.uk>
This commit is contained in:
@@ -1,12 +1,23 @@
|
||||
package internal
|
||||
|
||||
import "path"
|
||||
import (
|
||||
"log"
|
||||
"path"
|
||||
|
||||
var (
|
||||
Fsu = compPoison
|
||||
Fortify = compPoison
|
||||
"git.gensokyo.uk/security/fortify/internal/fmsg"
|
||||
)
|
||||
|
||||
func Path(p string) (string, bool) {
|
||||
return p, p != compPoison && p != "" && path.IsAbs(p)
|
||||
var (
|
||||
fsu = compPoison
|
||||
)
|
||||
|
||||
func MustFsuPath() string {
|
||||
if name, ok := checkPath(fsu); ok {
|
||||
return name
|
||||
}
|
||||
fmsg.BeforeExit()
|
||||
log.Fatal("invalid fsu path, this program is compiled incorrectly")
|
||||
return compPoison
|
||||
}
|
||||
|
||||
func checkPath(p string) (string, bool) { return p, p != compPoison && p != "" && path.IsAbs(p) }
|
||||
|
||||
Reference in New Issue
Block a user