init: Add some missing pledges
Some checks failed
continuous-integration/drone/push Build is failing

This commit is contained in:
apio 2023-08-14 11:08:19 +02:00
parent ba3e32917e
commit db3151d93b
Signed by: apio
GPG Key ID: B8A7D06E42258954

View File

@ -339,7 +339,7 @@ Result<int> sysinit()
stdout = fopen("/dev/console", "w"); stdout = fopen("/dev/console", "w");
stderr = 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_tmpfs();
mount_shmfs(); mount_shmfs();
@ -356,12 +356,10 @@ Result<int> sysinit()
if (signal(SIGTERM, sigterm_handler) == SIG_ERR) do_log("[init] failed to register handler for SIGTERM\n"); 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"); 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"); start_services("/etc/init");
TRY(os::Security::pledge("stdio rpath wpath proc exec", nullptr));
while (1) while (1)
{ {
int status; int status;