Age | Commit message (Collapse) | Author |
|
|
|
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.
|
|
This ensures early failure and better error messages.
|
|
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.
|
|
|
|
|
|
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.
|
|
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.
|
|
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.
|
|
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.
|
|
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.
|
|
|
|
FreeBSD and Linux have different preferred socket locations. Expose an
option to set the location, and implement simple auto-logic for
linux/freebsd.
|
|
|
|
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).
|
|
This is preparatory work for exposing a public function to set libseat's
log handler.
|
|
The fd variants do not seem to work for sockets
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|