summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLucas CHOLLET <lucas.chollet@free.fr>2022-07-24 15:28:42 +0200
committerLinus Groh <mail@linusgroh.de>2022-08-14 21:52:35 +0100
commite8115bfdb17a4792f50402ce22884910ee7de2ea (patch)
tree23a6f6fa896e61da93775933c6a9df239651cedd
parente9e94ef3cc1836c88f263e272eaff5b693741a8f (diff)
downloadserenity-e8115bfdb17a4792f50402ce22884910ee7de2ea.zip
Base: Launch FileSystemAccessServer at session start-up
-rw-r--r--Base/etc/SystemServer.ini10
-rw-r--r--Base/home/anon/.config/SystemServer.ini9
-rw-r--r--Userland/Applications/3DFileViewer/main.cpp2
-rw-r--r--Userland/Applications/Browser/main.cpp2
-rw-r--r--Userland/Applications/Help/main.cpp2
-rw-r--r--Userland/Applications/HexEditor/main.cpp2
-rw-r--r--Userland/Applications/PDFViewer/main.cpp2
-rw-r--r--Userland/Applications/PixelPaint/main.cpp2
-rw-r--r--Userland/Applications/TextEditor/main.cpp2
-rw-r--r--Userland/Applications/ThemeEditor/main.cpp2
-rw-r--r--Userland/Games/Chess/main.cpp2
-rw-r--r--Userland/Libraries/LibFileSystemAccessClient/Client.h2
12 files changed, 19 insertions, 20 deletions
diff --git a/Base/etc/SystemServer.ini b/Base/etc/SystemServer.ini
index 07d1e6adfd..ef22b9225d 100644
--- a/Base/etc/SystemServer.ini
+++ b/Base/etc/SystemServer.ini
@@ -1,13 +1,3 @@
-[FileSystemAccessServer]
-Socket=/tmp/portal/filesystemaccess
-SocketPermissions=660
-Lazy=true
-Priority=low
-User=anon
-SystemModes=text,graphical
-MultiInstance=true
-AcceptSocketConnections=true
-
[ImageDecoder]
Socket=/tmp/portal/image
SocketPermissions=600
diff --git a/Base/home/anon/.config/SystemServer.ini b/Base/home/anon/.config/SystemServer.ini
index d08653245a..b6f8060949 100644
--- a/Base/home/anon/.config/SystemServer.ini
+++ b/Base/home/anon/.config/SystemServer.ini
@@ -28,6 +28,15 @@ SystemModes=text,graphical
MultiInstance=true
AcceptSocketConnections=true
+[FileSystemAccessServer]
+Socket=/tmp/user/%uid/portal/filesystemaccess
+SocketPermissions=660
+Lazy=true
+Priority=low
+SystemModes=text,graphical
+MultiInstance=true
+AcceptSocketConnections=true
+
[LaunchServer]
Socket=/tmp/user/%uid/portal/launch
SocketPermissions=600
diff --git a/Userland/Applications/3DFileViewer/main.cpp b/Userland/Applications/3DFileViewer/main.cpp
index 49b0a7babb..431894dc97 100644
--- a/Userland/Applications/3DFileViewer/main.cpp
+++ b/Userland/Applications/3DFileViewer/main.cpp
@@ -360,7 +360,7 @@ ErrorOr<int> serenity_main(Main::Arguments arguments)
TRY(Core::System::pledge("stdio thread recvfd sendfd rpath unix prot_exec"));
- TRY(Core::System::unveil("/tmp/portal/filesystemaccess", "rw"));
+ TRY(Core::System::unveil("/tmp/user/%uid/portal/filesystemaccess", "rw"));
TRY(Core::System::unveil("/home/anon/Documents/3D Models", "r"));
TRY(Core::System::unveil("/res", "r"));
TRY(Core::System::unveil("/usr/lib", "r"));
diff --git a/Userland/Applications/Browser/main.cpp b/Userland/Applications/Browser/main.cpp
index 2af157d710..988ac7f0f2 100644
--- a/Userland/Applications/Browser/main.cpp
+++ b/Userland/Applications/Browser/main.cpp
@@ -84,7 +84,7 @@ ErrorOr<int> serenity_main(Main::Arguments arguments)
TRY(Core::System::unveil("/res", "r"));
TRY(Core::System::unveil("/etc/passwd", "r"));
TRY(Core::System::unveil("/etc/timezone", "r"));
- TRY(Core::System::unveil("/tmp/portal/filesystemaccess", "rw"));
+ TRY(Core::System::unveil("/tmp/user/%uid/portal/filesystemaccess", "rw"));
TRY(Core::System::unveil("/tmp/portal/image", "rw"));
TRY(Core::System::unveil("/tmp/user/%uid/portal/webcontent", "rw"));
TRY(Core::System::unveil("/tmp/user/%uid/portal/request", "rw"));
diff --git a/Userland/Applications/Help/main.cpp b/Userland/Applications/Help/main.cpp
index 26ae9de146..fbf4f83c54 100644
--- a/Userland/Applications/Help/main.cpp
+++ b/Userland/Applications/Help/main.cpp
@@ -33,7 +33,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/%uid/portal/filesystemaccess", "rw"));
TRY(Core::System::unveil("/tmp/user/%uid/portal/launch", "rw"));
TRY(Core::System::unveil("/tmp/user/%uid/portal/webcontent", "rw"));
TRY(Core::System::unveil(nullptr, nullptr));
diff --git a/Userland/Applications/HexEditor/main.cpp b/Userland/Applications/HexEditor/main.cpp
index 63c77a1c08..d5c08380cd 100644
--- a/Userland/Applications/HexEditor/main.cpp
+++ b/Userland/Applications/HexEditor/main.cpp
@@ -40,7 +40,7 @@ ErrorOr<int> serenity_main(Main::Arguments arguments)
};
TRY(Core::System::unveil("/res", "r"));
- TRY(Core::System::unveil("/tmp/portal/filesystemaccess", "rw"));
+ TRY(Core::System::unveil("/tmp/user/%uid/portal/filesystemaccess", "rw"));
TRY(Core::System::unveil(nullptr, nullptr));
hex_editor_widget->initialize_menubar(*window);
diff --git a/Userland/Applications/PDFViewer/main.cpp b/Userland/Applications/PDFViewer/main.cpp
index 73cd91fb5e..67f9dda8dc 100644
--- a/Userland/Applications/PDFViewer/main.cpp
+++ b/Userland/Applications/PDFViewer/main.cpp
@@ -35,7 +35,7 @@ ErrorOr<int> serenity_main(Main::Arguments arguments)
TRY(Core::System::pledge("stdio recvfd sendfd rpath unix"));
TRY(Core::System::unveil("/res", "r"));
- TRY(Core::System::unveil("/tmp/portal/filesystemaccess", "rw"));
+ TRY(Core::System::unveil("/tmp/user/%uid/portal/filesystemaccess", "rw"));
TRY(Core::System::unveil(nullptr, nullptr));
auto pdf_viewer_widget = TRY(window->try_set_main_widget<PDFViewerWidget>());
diff --git a/Userland/Applications/PixelPaint/main.cpp b/Userland/Applications/PixelPaint/main.cpp
index fffe3a79ab..d3eb61a4b5 100644
--- a/Userland/Applications/PixelPaint/main.cpp
+++ b/Userland/Applications/PixelPaint/main.cpp
@@ -33,7 +33,7 @@ ErrorOr<int> serenity_main(Main::Arguments arguments)
TRY(Core::System::unveil("/res", "r"));
TRY(Core::System::unveil("/tmp/portal/clipboard", "rw"));
- TRY(Core::System::unveil("/tmp/portal/filesystemaccess", "rw"));
+ TRY(Core::System::unveil("/tmp/user/%uid/portal/filesystemaccess", "rw"));
TRY(Core::System::unveil("/tmp/portal/image", "rw"));
TRY(Core::System::unveil("/etc/FileIconProvider.ini", "r"));
TRY(Core::System::unveil(nullptr, nullptr));
diff --git a/Userland/Applications/TextEditor/main.cpp b/Userland/Applications/TextEditor/main.cpp
index e8e56d6074..e1f4e73ace 100644
--- a/Userland/Applications/TextEditor/main.cpp
+++ b/Userland/Applications/TextEditor/main.cpp
@@ -34,7 +34,7 @@ ErrorOr<int> serenity_main(Main::Arguments arguments)
TRY(Core::System::unveil("/res", "r"));
TRY(Core::System::unveil("/tmp/user/%uid/portal/launch", "rw"));
TRY(Core::System::unveil("/tmp/user/%uid/portal/webcontent", "rw"));
- TRY(Core::System::unveil("/tmp/portal/filesystemaccess", "rw"));
+ TRY(Core::System::unveil("/tmp/user/%uid/portal/filesystemaccess", "rw"));
TRY(Core::System::unveil(nullptr, nullptr));
auto app_icon = GUI::Icon::default_icon("app-text-editor"sv);
diff --git a/Userland/Applications/ThemeEditor/main.cpp b/Userland/Applications/ThemeEditor/main.cpp
index b617b843ef..0714fc9e9e 100644
--- a/Userland/Applications/ThemeEditor/main.cpp
+++ b/Userland/Applications/ThemeEditor/main.cpp
@@ -39,7 +39,7 @@ ErrorOr<int> serenity_main(Main::Arguments arguments)
path = Core::File::absolute_path(file_to_edit);
TRY(Core::System::pledge("stdio recvfd sendfd thread rpath unix"));
- TRY(Core::System::unveil("/tmp/portal/filesystemaccess", "rw"));
+ TRY(Core::System::unveil("/tmp/user/%uid/portal/filesystemaccess", "rw"));
TRY(Core::System::unveil("/res", "r"));
TRY(Core::System::unveil(nullptr, nullptr));
diff --git a/Userland/Games/Chess/main.cpp b/Userland/Games/Chess/main.cpp
index 0a9ed2e49f..b1314e96c3 100644
--- a/Userland/Games/Chess/main.cpp
+++ b/Userland/Games/Chess/main.cpp
@@ -40,7 +40,7 @@ ErrorOr<int> serenity_main(Main::Arguments arguments)
TRY(Core::System::unveil("/bin/ChessEngine", "x"));
TRY(Core::System::unveil("/etc/passwd", "r"));
TRY(Core::System::unveil("/tmp/user/%uid/portal/launch", "rw"));
- TRY(Core::System::unveil("/tmp/portal/filesystemaccess", "rw"));
+ TRY(Core::System::unveil("/tmp/user/%uid/portal/filesystemaccess", "rw"));
TRY(Core::System::unveil(nullptr, nullptr));
auto size = Config::read_i32("Chess"sv, "Display"sv, "size"sv, 512);
diff --git a/Userland/Libraries/LibFileSystemAccessClient/Client.h b/Userland/Libraries/LibFileSystemAccessClient/Client.h
index c086ded70e..c62e51e453 100644
--- a/Userland/Libraries/LibFileSystemAccessClient/Client.h
+++ b/Userland/Libraries/LibFileSystemAccessClient/Client.h
@@ -23,7 +23,7 @@ using Result = ErrorOr<NonnullRefPtr<Core::File>>;
class Client final
: public IPC::ConnectionToServer<FileSystemAccessClientEndpoint, FileSystemAccessServerEndpoint>
, public FileSystemAccessClientEndpoint {
- IPC_CLIENT_CONNECTION(Client, "/tmp/portal/filesystemaccess"sv)
+ IPC_CLIENT_CONNECTION(Client, "/tmp/user/%uid/portal/filesystemaccess"sv)
public:
Result try_request_file_read_only_approved(GUI::Window* parent_window, String const& path);