aboutsummaryrefslogtreecommitdiffhomepage
path: root/cmd/fsu
diff options
context:
space:
mode:
Diffstat (limited to 'cmd/fsu')
-rw-r--r--cmd/fsu/main.go10
1 files changed, 2 insertions, 8 deletions
diff --git a/cmd/fsu/main.go b/cmd/fsu/main.go
index 2412a0e6..1f90a390 100644
--- a/cmd/fsu/main.go
+++ b/cmd/fsu/main.go
@@ -24,7 +24,6 @@ const (
var (
Fmain = compPoison
- Fshim = compPoison
)
func main() {
@@ -41,17 +40,12 @@ func main() {
log.Fatal("this program must not be started by root")
}
- var fmain, fshim string
+ var fmain string
if p, ok := checkPath(Fmain); !ok {
log.Fatal("invalid fortify path, this copy of fsu is not compiled correctly")
} else {
fmain = p
}
- if p, ok := checkPath(Fshim); !ok {
- log.Fatal("invalid fshim path, this copy of fsu is not compiled correctly")
- } else {
- fshim = p
- }
pexe := path.Join("/proc", strconv.Itoa(os.Getppid()), "exe")
if p, err := os.Readlink(pexe); err != nil {
@@ -142,7 +136,7 @@ func main() {
if _, _, errno := syscall.AllThreadsSyscall(syscall.SYS_PRCTL, PR_SET_NO_NEW_PRIVS, 1, 0); errno != 0 {
log.Fatalf("cannot set no_new_privs flag: %s", errno.Error())
}
- if err := syscall.Exec(fshim, []string{"fshim"}, []string{envShim + "=" + shimSetupFd}); err != nil {
+ if err := syscall.Exec(fmain, []string{"fortify", "shim"}, []string{envShim + "=" + shimSetupFd}); err != nil {
log.Fatalf("cannot start shim: %v", err)
}