proc/priv/init: early init check
All checks were successful
Build / Create distribution (push) Successful in 1m39s
Test / Run NixOS test (push) Successful in 3m45s

Signed-off-by: Ophestra <cat@gensokyo.uk>
This commit is contained in:
2025-01-18 12:23:07 +09:00
parent 7baca66a56
commit b31d055e20
4 changed files with 30 additions and 15 deletions

View File

@@ -55,6 +55,9 @@ func (g *gl) Set(v string) error {
}
func main() {
// early init argv0 check, skips root check and duplicate PR_SET_DUMPABLE
init0.TryArgv0()
if err := internal.PR_SET_DUMPABLE__SUID_DUMP_DISABLE(); err != nil {
fmsg.Printf("cannot set SUID_DUMP_DISABLE: %s", err)
// not fatal: this program runs as the privileged user