Everywhere: Replace hardcoded anon's uid in unveil path with %uid

This commit is contained in:
Lucas CHOLLET 2022-08-07 18:19:42 +02:00 committed by Linus Groh
parent 26e85dabb0
commit bee5bcda73
Notes: sideshowbarker 2024-07-17 08:15:44 +09:00
13 changed files with 13 additions and 13 deletions

View file

@ -34,7 +34,7 @@ ErrorOr<int> serenity_main(Main::Arguments arguments)
TRY(Core::System::unveil("/res", "r"));
TRY(Core::System::unveil("/usr/share/man", "r"));
TRY(Core::System::unveil("/tmp/portal/filesystemaccess", "rw"));
TRY(Core::System::unveil("/tmp/user/100/portal/launch", "rw"));
TRY(Core::System::unveil("/tmp/user/%uid/portal/launch", "rw"));
TRY(Core::System::unveil("/tmp/portal/webcontent", "rw"));
TRY(Core::System::unveil(nullptr, nullptr));

View file

@ -28,7 +28,7 @@ ErrorOr<int> serenity_main(Main::Arguments arguments)
TRY(Core::System::unveil("/etc", "r"));
TRY(Core::System::unveil("/tmp/portal/webcontent", "rw"));
TRY(Core::System::unveil("/tmp/portal/lookup", "rw"));
TRY(Core::System::unveil("/tmp/user/100/portal/launch", "rw"));
TRY(Core::System::unveil("/tmp/user/%uid/portal/launch", "rw"));
TRY(Core::System::unveil(nullptr, nullptr));
TRY(Desktop::Launcher::add_allowed_url(URL::create_with_file_protocol("/bin/MailSettings")));

View file

@ -432,7 +432,7 @@ ErrorOr<int> serenity_main(Main::Arguments arguments)
TRY(Core::System::unveil("/bin/TerminalSettings", "x"));
TRY(Core::System::unveil("/bin/utmpupdate", "x"));
TRY(Core::System::unveil("/etc/FileIconProvider.ini", "r"));
TRY(Core::System::unveil("/tmp/user/100/portal/launch", "rw"));
TRY(Core::System::unveil("/tmp/user/%uid/portal/launch", "rw"));
TRY(Core::System::unveil("/tmp/portal/config", "rw"));
TRY(Core::System::unveil(nullptr, nullptr));

View file

@ -32,7 +32,7 @@ ErrorOr<int> serenity_main(Main::Arguments arguments)
parser.parse(arguments);
TRY(Core::System::unveil("/res", "r"));
TRY(Core::System::unveil("/tmp/user/100/portal/launch", "rw"));
TRY(Core::System::unveil("/tmp/user/%uid/portal/launch", "rw"));
TRY(Core::System::unveil("/tmp/portal/webcontent", "rw"));
TRY(Core::System::unveil("/tmp/portal/filesystemaccess", "rw"));
TRY(Core::System::unveil(nullptr, nullptr));

View file

@ -38,7 +38,7 @@ ErrorOr<int> serenity_main(Main::Arguments arguments)
auto app = TRY(GUI::Application::try_create(arguments));
TRY(Core::System::unveil("/res", "r"));
TRY(Core::System::unveil("/tmp/user/100/portal/launch", "rw"));
TRY(Core::System::unveil("/tmp/user/%uid/portal/launch", "rw"));
TRY(Core::System::unveil(nullptr, nullptr));
if ((grid_rows > 0) ^ (grid_columns > 0)) {

View file

@ -45,7 +45,7 @@ ErrorOr<int> serenity_main(Main::Arguments arguments)
TRY(Core::System::pledge("stdio rpath recvfd sendfd"));
TRY(Core::System::unveil("/res", "r"));
TRY(Core::System::unveil("/tmp/user/100/portal/launch", "rw"));
TRY(Core::System::unveil("/tmp/user/%uid/portal/launch", "rw"));
TRY(Core::System::unveil(nullptr, nullptr));
size_t board_size = Config::read_i32("2048"sv, ""sv, "board_size"sv, 4);

View file

@ -39,7 +39,7 @@ ErrorOr<int> serenity_main(Main::Arguments arguments)
TRY(Core::System::unveil("/res", "r"));
TRY(Core::System::unveil("/bin/ChessEngine", "x"));
TRY(Core::System::unveil("/etc/passwd", "r"));
TRY(Core::System::unveil("/tmp/user/100/portal/launch", "rw"));
TRY(Core::System::unveil("/tmp/user/%uid/portal/launch", "rw"));
TRY(Core::System::unveil("/tmp/portal/filesystemaccess", "rw"));
TRY(Core::System::unveil(nullptr, nullptr));

View file

@ -31,7 +31,7 @@ ErrorOr<int> serenity_main(Main::Arguments arguments)
TRY(Core::System::pledge("stdio rpath recvfd sendfd"));
TRY(Core::System::unveil("/res", "r"));
TRY(Core::System::unveil("/tmp/user/100/portal/launch", "rw"));
TRY(Core::System::unveil("/tmp/user/%uid/portal/launch", "rw"));
TRY(Core::System::unveil(nullptr, nullptr));
u32 high_score = Config::read_i32("FlappyBug"sv, "Game"sv, "HighScore"sv, 0);

View file

@ -37,7 +37,7 @@ ErrorOr<int> serenity_main(Main::Arguments arguments)
TRY(Core::System::pledge("stdio rpath recvfd sendfd"));
TRY(Core::System::unveil("/res", "r"));
TRY(Core::System::unveil("/tmp/user/100/portal/launch", "rw"));
TRY(Core::System::unveil("/tmp/user/%uid/portal/launch", "rw"));
TRY(Core::System::unveil(nullptr, nullptr));
auto app_icon = TRY(GUI::Icon::try_create_default_icon("app-gameoflife"sv));

View file

@ -41,7 +41,7 @@ ErrorOr<int> serenity_main(Main::Arguments arguments)
TRY(Core::System::pledge("stdio recvfd sendfd rpath"));
TRY(Core::System::unveil("/res", "r"));
TRY(Core::System::unveil("/tmp/user/100/portal/launch", "rw"));
TRY(Core::System::unveil("/tmp/user/%uid/portal/launch", "rw"));
TRY(Core::System::unveil(nullptr, nullptr));
auto window = TRY(GUI::Window::try_create());

View file

@ -33,7 +33,7 @@ ErrorOr<int> serenity_main(Main::Arguments arguments)
TRY(Core::System::pledge("stdio rpath recvfd sendfd"));
TRY(Core::System::unveil("/res", "r"));
TRY(Core::System::unveil("/tmp/user/100/portal/launch", "rw"));
TRY(Core::System::unveil("/tmp/user/%uid/portal/launch", "rw"));
TRY(Core::System::unveil(nullptr, nullptr));
auto app_icon = TRY(GUI::Icon::try_create_default_icon("app-masterword"sv));

View file

@ -39,7 +39,7 @@ ErrorOr<int> serenity_main(Main::Arguments arguments)
TRY(Core::System::pledge("stdio rpath recvfd sendfd"));
TRY(Core::System::unveil("/res", "r"));
TRY(Core::System::unveil("/tmp/user/100/portal/launch", "rw"));
TRY(Core::System::unveil("/tmp/user/%uid/portal/launch", "rw"));
TRY(Core::System::unveil(nullptr, nullptr));
auto app_icon = TRY(GUI::Icon::try_create_default_icon("app-minesweeper"sv));

View file

@ -34,7 +34,7 @@ ErrorOr<int> serenity_main(Main::Arguments arguments)
TRY(Core::System::pledge("stdio rpath recvfd sendfd"));
TRY(Core::System::unveil("/res", "r"));
TRY(Core::System::unveil("/tmp/user/100/portal/launch", "rw"));
TRY(Core::System::unveil("/tmp/user/%uid/portal/launch", "rw"));
TRY(Core::System::unveil(nullptr, nullptr));
auto app_icon = TRY(GUI::Icon::try_create_default_icon("app-snake"sv));