diff options
| author | Ophestra Umiker <cat@ophivana.moe> | 2024-10-14 02:27:02 +0900 |
|---|---|---|
| committer | Ophestra Umiker <cat@ophivana.moe> | 2024-10-14 02:27:02 +0900 |
| commit | 1302bcede057538665a4eb626357409d8cb515e8 (patch) | |
| tree | c4cac4388ef7550c65cc69370175db35b79112d7 /main.go | |
| parent | 315c9b8849ae7ad764035dc6ceddc0bc35cb0c95 (diff) | |
init: custom init process inside sandbox
Bubblewrap as init is a bit awkward and don't support a few setup actions fortify will need, such as starting/supervising nscd.
Signed-off-by: Ophestra Umiker <cat@ophivana.moe>
Diffstat (limited to 'main.go')
| -rw-r--r-- | main.go | 6 |
1 files changed, 3 insertions, 3 deletions
@@ -8,6 +8,7 @@ import ( "git.ophivana.moe/cat/fortify/internal" "git.ophivana.moe/cat/fortify/internal/app" + init0 "git.ophivana.moe/cat/fortify/internal/init" "git.ophivana.moe/cat/fortify/internal/shim" "git.ophivana.moe/cat/fortify/internal/verbose" ) @@ -27,15 +28,14 @@ func main() { // linux/sched/coredump.h if _, _, errno := syscall.RawSyscall(syscall.SYS_PRCTL, syscall.PR_SET_DUMPABLE, 0, 0); errno != 0 { fmt.Printf("fortify: cannot set SUID_DUMP_DISABLE: %s", errno.Error()) - } else { - verbose.Println("prctl(PR_SET_DUMPABLE, SUID_DUMP_DISABLE) succeeded") } if internal.SdBootedV { verbose.Println("system booted with systemd as init system") } - // shim early exit + // shim/init early exit + init0.Try() shim.Try() // root check |
