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
commit cd0b7656fa
Notes: sideshowbarker 2024-07-17 00:56:36 +09:00

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));