aboutsummaryrefslogtreecommitdiffhomepage
path: root/main.go
diff options
context:
space:
mode:
authorOphestra <cat@gensokyo.uk>2025-01-18 12:23:07 +0900
committerOphestra <cat@gensokyo.uk>2025-01-18 12:33:33 +0900
commitb31d055e2087f95cb6172a67d8339a16d72987d3 (patch)
tree1280043963f9e0b3c6b86aa8e43afbacd71c56d0 /main.go
parent7baca66a56f67fa5722b689cbff747eac12b857e (diff)
proc/priv/init: early init check
Signed-off-by: Ophestra <cat@gensokyo.uk>
Diffstat (limited to 'main.go')
-rw-r--r--main.go3
1 files changed, 3 insertions, 0 deletions
diff --git a/main.go b/main.go
index bb93f8f1..e6e856b6 100644
--- a/main.go
+++ b/main.go
@@ -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