From db3151d93b3298abaffb0259560cbed81d0bbac8 Mon Sep 17 00:00:00 2001 From: apio Date: Mon, 14 Aug 2023 11:08:19 +0200 Subject: [PATCH] init: Add some missing pledges --- apps/init.cpp | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/apps/init.cpp b/apps/init.cpp index 612822ca..d7bbefe0 100644 --- a/apps/init.cpp +++ b/apps/init.cpp @@ -339,7 +339,7 @@ Result sysinit() stdout = fopen("/dev/console", "w"); stderr = fopen("/dev/console", "w"); - TRY(os::Security::pledge("stdio rpath wpath cpath fattr host mount proc exec signal", nullptr)); + TRY(os::Security::pledge("stdio rpath wpath cpath fattr host mount proc exec signal id", nullptr)); mount_tmpfs(); mount_shmfs(); @@ -356,12 +356,10 @@ Result sysinit() if (signal(SIGTERM, sigterm_handler) == SIG_ERR) do_log("[init] failed to register handler for SIGTERM\n"); if (signal(SIGQUIT, sigquit_handler) == SIG_ERR) do_log("[init] failed to register handler for SIGQUIT\n"); - TRY(os::Security::pledge("stdio rpath wpath cpath proc exec", nullptr)); + TRY(os::Security::pledge("stdio rpath wpath cpath proc exec id", nullptr)); start_services("/etc/init"); - TRY(os::Security::pledge("stdio rpath wpath proc exec", nullptr)); - while (1) { int status;