summaryrefslogtreecommitdiff
path: root/Userland/Services/SystemServer
AgeCommit message (Collapse)Author
2021-12-19SystemServer: Fixed grammatical error "a charm"Jonta
2021-12-16SystemServer: Use more LibCore syscall wrappers :^)Andreas Kling
2021-12-16SystemServer: Port to LibMain :^)Andreas Kling
2021-12-12Kernel+SystemServer: Add /dev/ttyDaniel Bertalan
This file refers to the controlling terminal associated with the current process. It's specified by POSIX, and is used by ports like openssh to interface with the terminal even if the standard input/output is redirected to somewhere else. Our implementation leverages ProcFS's existing facilities to create process-specific symbolic links. In our setup, `/dev/tty` is a symbolic link to `/proc/self/tty`, which itself is a symlink to the appropriate `/dev/pts` entry. If no TTY is attached, `/dev/tty` is left dangling.
2021-11-30Kernel: Register Virtio console ports with device managementJelle Raaijmakers
Previously, Virtio console ports would not show up in `/sys/dev/char/`. Also adds support to `SystemServer` to create more than one console port device in `/dev/` in the multiport case.
2021-11-21Everywhere: Fix spelling of "offsetted"Andreas Kling
This word is actually pretty awkward in context, but this patch merely fixes the spelling instead of finding a better word.
2021-11-21SystemServer+kcov-example: Make /dev/kcov0 available againBen Wiederhake
Apparently this device entry got lost while converting to DevTmpFS.
2021-11-11Everywhere: Pass AK::StringView by valueAndreas Kling
2021-10-25SystemServer: Rename 'BootModes' config option to 'SystemModes'Ben Wiederhake
2021-10-25Kernel+SystemServer: Change bootmode to system_modeBen Wiederhake
'bootmode' now only controls which set of services are started by SystemServer, so it is more appropriate to rename it to system_mode, and no longer validate it in the Kernel.
2021-10-17SystemServer: Add per user mode (--user)Peter Elliott
System server running in user mode will form the basis of a "session" for login purposes in serenity.
2021-10-13SystemServer: Avoid uninitialized memoryBen Wiederhake
2021-09-08Kernel+SystemServer: Simplify the DevTmpFS designLiav A
We are no longer have a separate Inode object class for the pts directory. With a small exception to this, all chmod and chown code is now at one place. It's now possible to create any name of a sub-directory in the filesystem.
2021-09-08SystemServer: Don't rely on fstab to specify where to mount the ProcFSLiav A
For now, just hardcode the mounting in SystemServer code.
2021-09-08SystemServer: Traverse sub-directories in /sys/devLiav A
While traversing in both /sys/dev/char and /sys/dev/block, SystemServer populates the DevFS (mounted normally in /dev) with the corresponding device nodes. This is a very crude implementation of populating DevFS device nodes, before we have a full-fledged udev-like daemon to take care of this task. Also, we don't populate DiskPartition device nodes yet, because that requires more sophisticated mechanism to figure out which DiskPartition is related to which StorageDevice.
2021-09-08Kernel+SystemServer: Defer creation of device nodes to userspaceLiav A
Don't create these device nodes in the Kernel, so we essentially enforce userspace (SystemServer) to take control of this operation and to decide how to create these device nodes. This makes the DevFS to resemble linux devtmpfs, and allows us to remove a bunch of unneeded overriding implementations of device name creation in the Kernel.
2021-08-22Everywhere: Rename get in ConfigFile::get_for_{lib,app,system} to opennetworkException
This patch brings the ConfigFile helpers for opening lib, app and system configs more inline with the regular ConfigFile::open functions.
2021-08-12SystemServer: Generalize chown_all_framebuffer_devices functionLiav A
Instead of neatly searching for all framebuffer device nodes and changing ownership of them, let's generalize this function so we can apply the same pattern on tty nodes.
2021-08-10SystemServer: Change group ownership on all framebuffer devicesLiav A
WindowServer was not able to utilize any other framebuffer device in the /dev directory due to wrong group ownership of other framebuffer devices. Therefore we need to ensure that when SystemServer starts, it checks all directory entries in /dev, searching for framebuffer devices, and then apply the correct ownership for them.
2021-08-07SystemServer: Handle missing service executable gracefullyBrian Gianforcaro
I use the `configure-components` functionality locally during development. There are a few services (SpiceAgent) which aren't marked as required components, and hence aren't built in all configurations, but we still try to launch them in all configurations. Instead of letting the forked SystemServer process crash, lets gracefully handle the situation of a missing binary and provide a message to the user.
2021-08-01Services: Remove unused header includesBrian Gianforcaro
2021-06-29SystemServer+Meta: Use the new SysFSLiav A
We make SystemServer to mount the new SysFS in /sys.
2021-06-17Everywhere: Add component declarationsGunnar Beutner
This adds component declarations so that users can select to not build certain parts of the OS.
2021-06-17SystemServer: Improve error message when execv() failsGunnar Beutner
Previously perror() would just tell us that the file specified for execv() doesn't exist.
2021-05-16Kernel/Graphics + SystemServer: Support text mode properlyLiav A
As we removed the support of VBE modesetting that was done by GRUB early on boot, we need to determine if we can modeset the resolution with our drivers, and if not, we should enable text mode and ensure that SystemServer knows about it too. Also, SystemServer should first check if there's a framebuffer device node, which is an indication that text mode was not even if it was requested. Then, if it doesn't find it, it should check what boot_mode argument the user specified (in case it's self-test). This way if we try to use bochs-display device (which is not VGA compatible) and request a text mode, it will not honor the request and will continue with graphical mode. Also try to print critical messages with mininum memory allocations possible. In LibVT, We make the implementation flexible for kernel-specific methods that are implemented in ConsoleImpl class.
2021-05-13SystemServer: Stop creating the /tmp/rpc directoryAndreas Kling
This is no longer needed.
2021-05-12LibCore+Everywhere: Move OpenMode out of IODeviceAli Mohammad Pur
...and make it an enum class so people don't omit "OpenMode".
2021-05-07Services: Convert StringBuilder::appendf() => AK::FormatAndreas Kling
2021-05-01Kernel: Expose minor device numbers for keyboard and mouseValtteri Koskivuori
A fix for two FIXMEs, and paving the way for multi-keyboard/mouse support, I guess.
2021-04-22Everything: Move to SPDX license identifiers in all files.Brian Gianforcaro
SPDX License Identifiers are a more compact / standardized way of representing file license information. See: https://spdx.dev/resources/use/#identifiers This was done with the `ambr` search and replace tool. ambr --no-parent-ignore --key-from-file --rep-from-file key.txt rep.txt *
2021-04-15SystemServer+LibCore: Allow service to request multiple socketssin-ack
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-11LibC: Move S_* defines into <fcntl.h>Gunnar Beutner
According to the Single UNIX Specification, Version 2 that's where those macros should be defined. This fixes the libiconv port. This also fixes some (but not all) build errors for the diffutils and nano ports.
2021-03-29SystemServer: Call endgrent() after we're finished looking up groupsAndreas Kling
2021-03-29SystemServer: dynamically fetch device group IDsIdan Horowitz
Fixes a couple of FIXMEs that were complaining about the harcoded group IDs.
2021-03-29SystemServer: chown all available TTY devices to the tty groupIdan Horowitz
Since we have 6 TTYs available 2 of the 6 were not being chowned and as such they were not available to the tty group.
2021-03-28LibCoreDump+CrashDaemon: Compress coredumpsIdan Horowitz
Most coredumps contain large amounts of consecutive null bytes and as such are a prime candidate for compression. This commit makes CrashDaemon compress files once the kernel finishes emitting them, as well as adds the functionality needed in LibCoreDump to then parse them.
2021-02-26Everywhere: Remove a bunch of redundant 'AK::' namespace prefixesLinus Groh
This is basically just for consistency, it's quite strange to see multiple AK container types next to each other, some with and some without the namespace prefix - we're 'using AK::Foo;' a lot and should leverage that. :^)
2021-02-23Everywhere: Rename ASSERT => VERIFYAndreas Kling
(...and ASSERT_NOT_REACHED => VERIFY_NOT_REACHED) Since all of these checks are done in release builds as well, let's rename them to VERIFY to prevent confusion, as everyone is used to assertions being compiled out in release. We can introduce a new ASSERT macro that is specifically for debug checks, but I'm doing this wholesale conversion first since we've accumulated thousands of these already, and it's not immediately obvious which ones are suitable for ASSERT.
2021-02-08Everywhere: Replace dbgln<flag>(...) with dbgln_if(flag, ...)AnotherTest
Replacement made by `find Kernel Userland -name '*.h' -o -name '*.cpp' | sed -i -Ee 's/dbgln\b<(\w+)>\(/dbgln_if(\1, /g'`
2021-01-25Everywhere: Debug macros instead of constexpr.asynts
This was done with the following script: find . \( -name '*.cpp' -o -name '*.h' -o -name '*.in' \) -not -path './Toolchain/*' -not -path './Build/*' -exec sed -i -E 's/dbgln<debug_([a-z_]+)>/dbgln<\U\1_DEBUG>/' {} \; find . \( -name '*.cpp' -o -name '*.h' -o -name '*.in' \) -not -path './Toolchain/*' -not -path './Build/*' -exec sed -i -E 's/if constexpr \(debug_([a-z0-9_]+)/if constexpr \(\U\1_DEBUG/' {} \;
2021-01-24SystemServer: Do not crash if device files are not presentJean-Baptiste Boric
2021-01-23SystemServer: Mask off the set-uid bit in SocketPermissionsAndreas Kling
2021-01-22Everywhere: Replace a bundle of dbg with dbgln.asynts
These changes are arbitrarily divided into multiple commits to make it easier to find potentially introduced bugs with git bisect.
2021-01-16Everywhere: Convert a handful of String::format() => formatted()Andreas Kling
2021-01-12LibC+Everywhere: Remove open_with_path_length() in favor of open()Andreas Kling
This API was a mostly gratuitous deviation from POSIX that gave up some portability in exchange for avoiding the occasional strlen(). I don't think that was actually achieving anything valuable, so let's just chill out and have the same open() API as everyone else. :^)
2021-01-12Services: Move to Userland/Services/Andreas Kling