mirror of
https://github.com/SerenityOS/serenity.git
synced 2026-11-07 04:29:30 -10:00
Userland: Always enter jail mode in Browser and Assistant
These programs are capable of running other programs, so we should restrict them from potentially running SUID programs, which was never a functionality we supported for those programs anyway.
This commit is contained in:
1 parent
dd59fe35c7
commit
816f2efb4e
2 files changed
+4
No files matched your search
@@ -148,6 +148,8 @@ ErrorOr<int> serenity_main(Main::Arguments arguments)
|
||||
{
|
||||
TRY(Core::System::pledge("stdio recvfd sendfd rpath cpath unix proc exec thread map_fixed"));
|
||||
|
||||
TRY(Core::System::enter_jail_mode());
|
||||
|
||||
Core::LockFile lockfile("/tmp/lock/assistant.lock");
|
||||
|
||||
if (!lockfile.is_held()) {
|
||||
|
||||
@@ -180,6 +180,8 @@ ErrorOr<int> serenity_main(Main::Arguments arguments)
|
||||
TRY(Core::System::unveil("/bin/Browser", "x"));
|
||||
TRY(Core::System::unveil(nullptr, nullptr));
|
||||
|
||||
TRY(Core::System::enter_jail_mode());
|
||||
|
||||
WebView::ChromeProcess chrome_process;
|
||||
if (TRY(chrome_process.connect(specified_urls, new_window)) == WebView::ChromeProcess::ProcessDisposition::ExitProcess) {
|
||||
outln("Opening in existing process");
|
||||
|
||||
Reference in new issue
Block a user