1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-31 09:58:11 +00:00
serenity/Userland/Libraries/LibCore
sin-ack 5b95850e28 SystemServer+LibCore: Allow service to request multiple sockets
SystemServer only allowed a single socket to be created for a service
before this.  Now, SystemServer will allow any amount of sockets.  The
sockets can be defined like so:

[SomeService]
Socket=/tmp/portal/socket1,/tmp/portal/socket2,/tmp/portal/socket3
SocketPermissions=660,600

The last item in SocketPermissions is applied to the remainder of the
sockets in the Socket= line, so multiple sockets can have the same
permissions without having to repeat them.

Defining multiple sockets is not allowed for socket-activated services
at the moment, and wouldn't make much sense anyway.

This patch also makes socket takeovers more robust by removing the
assumption that the socket will always be passed in fd 3.  Now, the
SOCKET_TAKEOVER environment variable carries information about which
endpoint corresponds to which socket, like so:

SOCKET_TAKEOVER=/tmp/portal/socket1:3 /tmp/portal/socket2:4

and LocalServer/LocalService will parse this automatically and select
the correct one.  The old behavior of getting the default socket is
preserved so long as the service only requests a single socket in
SystemServer.ini.
2021-04-15 21:04:49 +02:00
..
Account.cpp Everywhere: Remove klog(), dbg() and purge all LogStream usage :^) 2021-03-12 17:29:37 +01:00
Account.h LibCore: Always fail Account authentication on missing shadow entry 2021-01-21 11:34:39 +01:00
AnonymousBuffer.cpp LibCore: Don't leak file descriptor inside AnonymousBuffer on Linux 2021-04-13 21:52:34 +02:00
AnonymousBuffer.h AK+Everywhere: Make StdLibExtras templates less wrapper-y 2021-04-10 21:01:31 +02:00
ArgsParser.cpp LibCore: Add String variant for ArgsParser::add_positional_argument 2021-03-07 11:00:36 +01:00
ArgsParser.h LibCore: Add String variant for ArgsParser::add_positional_argument 2021-03-07 11:00:36 +01:00
CMakeLists.txt AK+LibCore: Remove empty files 2021-03-12 17:38:17 +01:00
Command.cpp Everywhere: Remove klog(), dbg() and purge all LogStream usage :^) 2021-03-12 17:29:37 +01:00
Command.h Libraries: Move to Userland/Libraries/ 2021-01-12 12:17:46 +01:00
ConfigFile.cpp Libraries: Move to Userland/Libraries/ 2021-01-12 12:17:46 +01:00
ConfigFile.h Libraries: Move to Userland/Libraries/ 2021-01-12 12:17:46 +01:00
DateTime.cpp Everywhere: Remove klog(), dbg() and purge all LogStream usage :^) 2021-03-12 17:29:37 +01:00
DateTime.h Everywhere: Remove klog(), dbg() and purge all LogStream usage :^) 2021-03-12 17:29:37 +01:00
DirIterator.cpp Everywhere: Remove klog(), dbg() and purge all LogStream usage :^) 2021-03-12 17:29:37 +01:00
DirIterator.h Libraries: Move to Userland/Libraries/ 2021-01-12 12:17:46 +01:00
ElapsedTimer.cpp Everywhere: Rename ASSERT => VERIFY 2021-02-23 20:56:54 +01:00
ElapsedTimer.h Libraries: Move to Userland/Libraries/ 2021-01-12 12:17:46 +01:00
Event.cpp Libraries: Move to Userland/Libraries/ 2021-01-12 12:17:46 +01:00
Event.h Libraries: Move to Userland/Libraries/ 2021-01-12 12:17:46 +01:00
EventLoop.cpp LibCore: Use dbgln_if in EventLoop.cpp 2021-04-14 10:54:56 +02:00
EventLoop.h Libraries: Move to Userland/Libraries/ 2021-01-12 12:17:46 +01:00
File.cpp LibCore: Add Core::File is_device() helpers 2021-03-30 11:29:52 +02:00
File.h LibCore: Add Core::File is_device() helpers 2021-03-30 11:29:52 +02:00
FileStream.h Everywhere: Rename ASSERT => VERIFY 2021-02-23 20:56:54 +01:00
FileWatcher.cpp Everywhere: Remove klog(), dbg() and purge all LogStream usage :^) 2021-03-12 17:29:37 +01:00
FileWatcher.h LibCore: Added FileWatcher, a binding for the watch_file syscall 2021-02-11 13:13:32 +01:00
Forward.h LibCore+LibIPC: Add Core::AnonymousBuffer, an IPC-friendly buffer class 2021-01-16 17:20:24 +01:00
GetPassword.cpp Everywhere: Remove klog(), dbg() and purge all LogStream usage :^) 2021-03-12 17:29:37 +01:00
GetPassword.h Libraries: Move to Userland/Libraries/ 2021-01-12 12:17:46 +01:00
IODevice.cpp LibCore: Save errno before it gets clobbered in Core::IODevice::write() 2021-04-10 22:31:29 +02:00
IODevice.h Libraries: Move to Userland/Libraries/ 2021-01-12 12:17:46 +01:00
IODeviceStreamReader.h Everywhere: Rename ASSERT => VERIFY 2021-02-23 20:56:54 +01:00
LocalServer.cpp SystemServer+LibCore: Allow service to request multiple sockets 2021-04-15 21:04:49 +02:00
LocalServer.h SystemServer+LibCore: Allow service to request multiple sockets 2021-04-15 21:04:49 +02:00
LocalSocket.cpp SystemServer+LibCore: Allow service to request multiple sockets 2021-04-15 21:04:49 +02:00
LocalSocket.h SystemServer+LibCore: Allow service to request multiple sockets 2021-04-15 21:04:49 +02:00
MimeData.cpp Libraries: Move to Userland/Libraries/ 2021-01-12 12:17:46 +01:00
MimeData.h Libraries: Move to Userland/Libraries/ 2021-01-12 12:17:46 +01:00
NetworkJob.cpp Everywhere: Rename ASSERT => VERIFY 2021-02-23 20:56:54 +01:00
NetworkJob.h Everywhere: Replace a bundle of dbg with dbgln. 2021-01-22 22:14:30 +01:00
NetworkResponse.cpp Libraries: Move to Userland/Libraries/ 2021-01-12 12:17:46 +01:00
NetworkResponse.h Libraries: Move to Userland/Libraries/ 2021-01-12 12:17:46 +01:00
Notifier.cpp Libraries: Move to Userland/Libraries/ 2021-01-12 12:17:46 +01:00
Notifier.h Libraries: Move to Userland/Libraries/ 2021-01-12 12:17:46 +01:00
Object.cpp LibCore: Add a way to install an event filter on a Core::Object 2021-03-28 11:19:18 +02:00
Object.h AK+Everywhere: Make StdLibExtras templates less wrapper-y 2021-04-10 21:01:31 +02:00
ProcessStatisticsReader.cpp Kernel+LibCore: Note whether a process is kernel mode in /proc/all 2021-04-06 17:55:47 +02:00
ProcessStatisticsReader.h Kernel+LibCore: Note whether a process is kernel mode in /proc/all 2021-04-06 17:55:47 +02:00
Property.cpp Libraries: Move to Userland/Libraries/ 2021-01-12 12:17:46 +01:00
Property.h Libraries: Move to Userland/Libraries/ 2021-01-12 12:17:46 +01:00
Socket.cpp Everywhere: Rename ASSERT => VERIFY 2021-02-23 20:56:54 +01:00
Socket.h Everywhere: Rename ASSERT => VERIFY 2021-02-23 20:56:54 +01:00
SocketAddress.h Everywhere: Remove klog(), dbg() and purge all LogStream usage :^) 2021-03-12 17:29:37 +01:00
StandardPaths.cpp Libraries: Move to Userland/Libraries/ 2021-01-12 12:17:46 +01:00
StandardPaths.h Libraries: Move to Userland/Libraries/ 2021-01-12 12:17:46 +01:00
SyscallUtils.h Everywhere: Remove klog(), dbg() and purge all LogStream usage :^) 2021-03-12 17:29:37 +01:00
TCPServer.cpp Everywhere: Remove klog(), dbg() and purge all LogStream usage :^) 2021-03-12 17:29:37 +01:00
TCPServer.h Libraries: Move to Userland/Libraries/ 2021-01-12 12:17:46 +01:00
TCPSocket.cpp Libraries: Move to Userland/Libraries/ 2021-01-12 12:17:46 +01:00
TCPSocket.h Libraries: Move to Userland/Libraries/ 2021-01-12 12:17:46 +01:00
Timer.cpp Libraries: Move to Userland/Libraries/ 2021-01-12 12:17:46 +01:00
Timer.h LibCore: Add Timer::create_repeating convenience method 2021-03-28 20:42:21 +02:00
UDPServer.cpp Everywhere: Remove klog(), dbg() and purge all LogStream usage :^) 2021-03-12 17:29:37 +01:00
UDPServer.h LibCore: Expose UDPServer::fd() and make the constructor protected 2021-02-15 09:14:42 +01:00
UDPSocket.cpp Libraries: Move to Userland/Libraries/ 2021-01-12 12:17:46 +01:00
UDPSocket.h Libraries: Move to Userland/Libraries/ 2021-01-12 12:17:46 +01:00