aboutsummaryrefslogtreecommitdiff
path: root/seatd/seatd.c
AgeCommit message (Collapse)Author
2022-02-26seatd: Change default log-level to infoKenny Levinsen
2022-02-26seatd: Remove runtime socket path configurationKenny Levinsen
Configurable socket paths exist mainly to facilitate multiple parallel seatd instances. However, the only valid use-case for running multiple instances of seatd is testing during development, which can just as well be done by changing SEATD_DEFAULTPATH at compile-time for test builds. Remove the command-line argument in seatd for runtime configuration of socket path, hardcode the socket path in seatd-launch, and change seatd unlink/chmod/chown code to not run when started by seatd-launch. This means that seatd-launch will now fail to start seatd if another seatd instance is already running. The unlink code still runs when seatd is started normally to assist in system crash recovery, but this may be removed later if we deem it unnecessary.
2022-02-26seatd: Handle socket unlink errorsKenny Levinsen
This ensures early failure and better error messages.
2022-02-26seatd: Command-line argument for loglevelKenny Levinsen
SEATD_LOGLEVEL was used to set the loglevel despite already having getopt in place. Remove the environment variable and make a command-line argument for it instead.
2022-02-21seatd: Fix usage renderingKenny Levinsen
2022-02-21seatd: Ensure socket gets unlinked on errorKenny Levinsen
2022-02-21seatd: Remove SOCK_PATH and improve cleanupKenny Levinsen
SOCK_PATH is made redundant by the -s command-line argument added in a98e0c4ce90347d37370f2debcbed8ae9678a990. Support was originally left behind for short-term compatibility, but it should be fine to remove. Previous socket cleanup is changed to run unconditionally. The cleanup now fails if the existing file is not a socket.
2021-08-08seatd: Use path in chmod/chown operationsKenny Levinsen
c8b3a22d4ef0f69c3d22f0ec1170b89c93ef1dc3 snuck in a change which converts chown/chmod to fchown/fchmod using the socket fd. This appears to succeed under Linux, but fails with EINVAL on FreeBSD. As the error handling in this area was flawed, CI failed to catch the regression. Partially revert c8b3a22d4ef0f69c3d22f0ec1170b89c93ef1dc3 to fix the regression on FreeBSD.
2021-08-08seatd: Improve socket permission error handlingKenny Levinsen
chmod/chown errors were logged, but did not result in failure opening the seatd socket. This meant that errors would not get caught by CI.
2021-08-06seatd: Only set UID/GID when specifiedKenny Levinsen
The UID/GID defaulted to 0, which results in trying to chown to root when a UID or GID isn't requested. Instead, deafult to -1 so that the unspecified values are left intact.
2021-08-06seatd: s6-style readiness notification supportKenny Levinsen
This adds the ability to specify the number of an fd that is inherited by the process as open. Once seatd is read to serve requests, it will write a single newline and close the fd.
2021-03-02Normalize log texts a bitKenny Levinsen
2020-09-22meson: Make default seatd socket path configurableKenny Levinsen
FreeBSD and Linux have different preferred socket locations. Expose an option to set the location, and implement simple auto-logic for linux/freebsd.
2020-09-22seatd: Log on exitKenny Levinsen
2020-08-28Introduce libseat_set_log_levelSimon Ser
The default level is SILENT. log_init no longer takes an initial log level (so that calls to libseat_set_log_level prior to log_init work correctly).
2020-08-28Rename enum log_level to libseat_log_levelSimon Ser
This is preparatory work for exposing a public function to set libseat's log handler.
2020-08-08seatd: Use path-based chmod/chownKenny Levinsen
The fd variants do not seem to work for sockets
2020-08-07seatd: Add command-line argumentsKenny Levinsen
2020-08-05log: Remove libseat prefixesKenny Levinsen
2020-08-04seatd: Unlink default seatd socket on startupKenny Levinsen
2020-08-03server: Stack-allocate the serverKenny Levinsen
2020-08-03poller: Inline the poller into the server structKenny Levinsen
2020-08-01seatd: Perform clean server shutdownKenny Levinsen
2020-07-31Initial implementation of seatd and libseatKenny Levinsen