1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-31 20:28:11 +00:00

ConfigServer: Unveil "/etc/passwd"

This is needed to use functions like `getpwuid()`.
This commit is contained in:
Lucas CHOLLET 2023-01-07 18:36:46 -05:00 committed by Andreas Kling
parent fb79fc0ba6
commit cd0b7656fa

View file

@ -13,6 +13,7 @@
ErrorOr<int> serenity_main(Main::Arguments)
{
TRY(Core::System::pledge("stdio accept rpath wpath cpath"));
TRY(Core::System::unveil("/etc/passwd"sv, "r"sv));
TRY(Core::System::unveil(Core::StandardPaths::config_directory(), "rwc"sv));
TRY(Core::System::unveil(Core::StandardPaths::home_directory(), "rwc"sv));
TRY(Core::System::unveil(nullptr, nullptr));