Commit graph

267 commits

Author SHA1 Message Date
Kenny Levinsen
f5bc8ab12b seatd: Use path-based chmod/chown
The fd variants do not seem to work for sockets
2020-08-08 15:27:43 +02:00
Kenny Levinsen
24e2fc7861 ci: Install scdoc for alpine and archlinux 2020-08-08 14:59:50 +02:00
Kenny Levinsen
b312fbfb5e man: Add simple seatd(1) page 2020-08-08 14:54:25 +02:00
Isaac Freund
48e712ffd9 build: check for libelogind before libsystemd
elogind provides a libsystemd wrapper which is packaged by some distros.
For whatever reason using this wrapper instead of libelogind directly
causes compiler warnings to pop up. Checking for libelogind first
ensures that this wrapper is not used.
2020-08-08 14:46:14 +02:00
Kenny Levinsen
e57e3e22b9 contrib: Add example systemd service 2020-08-07 16:06:00 +02:00
Kenny Levinsen
a98e0c4ce9 seatd: Add command-line arguments 2020-08-07 15:50:27 +02:00
Kenny Levinsen
420f973004 ci: Run unittests on all platforms 2020-08-06 13:25:00 +02:00
Kenny Levinsen
b496efa2f9 linked_list: Add unittest 2020-08-06 13:23:51 +02:00
Kenny Levinsen
7d2668e360 logind: Allow SwitchTo for all seats 2020-08-06 02:25:24 +02:00
Kenny Levinsen
0fd525e85e logind: close_device always returned error
Error handling was broken in close_device, always returning -1.

Use the return value, and add a few errno assignments while we're at it.
2020-08-06 02:25:24 +02:00
Kenny Levinsen
304489c30d libseat: Fix doc typo 2020-08-05 23:41:55 +02:00
Kenny Levinsen
3586530d81 libseat: Rename libseat_impl to seat_impl 2020-08-05 23:41:55 +02:00
Kenny Levinsen
493cc2a97d log: Remove libseat prefixes 2020-08-05 23:41:55 +02:00
Kenny Levinsen
563a932659 Remove pointless compiler.h 2020-08-05 23:20:50 +02:00
Kenny Levinsen
86efc98a5e linked_list: Assert initialized list in linked_list_empty 2020-08-04 14:25:07 +02:00
Kenny Levinsen
a844d77c21 seat: Fix device double-remove 2020-08-04 02:38:05 +02:00
Kenny Levinsen
68d95e66b3 seatd: Unlink default seatd socket on startup 2020-08-04 01:44:27 +02:00
Kenny Levinsen
55cbe043e2 server: Gracefully shut down on error 2020-08-04 01:43:55 +02:00
Kenny Levinsen
db36f0dfe8 client: Sanitize shutdown/kill mechanism 2020-08-04 01:43:24 +02:00
Kenny Levinsen
a8204ebcea client: Tidying 2020-08-03 21:22:59 +02:00
Kenny Levinsen
afc3fa4b11 seat: Enable VT process switching when switching away 2020-08-03 21:21:34 +02:00
Kenny Levinsen
98a4a4ff67 seat: Add VT cleanup on switch to empty VT
VTs were being cleaned up the active client of a VT went away, or if we
were acking a kernel VT switch request. However, no cleanup was done if
the user had reqested a session switch to a different VT.

Duplicate the VT cleanup to the VT switch condition.
2020-08-03 02:55:07 +02:00
Kenny Levinsen
250adee852 libseat: Use LIBSEAT_LOGLEVEL instead of SEATD_LOGLEVEL 2020-08-03 02:49:07 +02:00
Kenny Levinsen
e25688fed6 libseat: Convert clients to linked_list 2020-08-03 02:49:04 +02:00
Kenny Levinsen
fc7116ffad seat: Convert client list to linked list 2020-08-03 02:48:39 +02:00
Kenny Levinsen
9b7a12d90a seat: Convert device list to linked list 2020-08-03 02:16:21 +02:00
Kenny Levinsen
4afe674e54 linked_list: Initial implementation 2020-08-03 02:13:47 +02:00
Kenny Levinsen
c35b2d2d88 server: Stack-allocate the server 2020-08-03 02:13:47 +02:00
Kenny Levinsen
d68c5feaee poller: Inline the poller into the server struct 2020-08-03 02:13:22 +02:00
Kenny Levinsen
3f3bdd41dd poller: Remove unnecessary poll_impl abstraction 2020-08-03 01:15:20 +02:00
Kenny Levinsen
4f4a17a2bd libseat: Remove unused stdarg.h import 2020-08-03 00:57:34 +02:00
Kenny Levinsen
3a5c17f911 compiler: Rename erroneous header-guard 2020-08-03 00:57:20 +02:00
Kenny Levinsen
9d2e63d090 terminal: Remove unused prototypes 2020-08-03 00:56:38 +02:00
Kenny Levinsen
6d031426aa list: Make list_concat argument const 2020-08-03 00:56:27 +02:00
Kenny Levinsen
a003e92600 client: Prefix notification methods with 'send' 2020-08-03 00:56:10 +02:00
Kenny Levinsen
3e301b8e70 libseat: Use symbol file instead of -fvisibility 2020-08-03 00:54:55 +02:00
Kenny Levinsen
b2cbe576d1 seat: Deactivate devices before sending disable
Previously, seatd would not deactivate devices until the client had
acked the disable. In once instance, this lead to libinput spending
significant time checking and closing each input device.

As a workaround, mimick logind's behavior of deactivating devices first.
The original behavior can be reintroduced if the client-side problem is
fixed.

Closes: https://todo.sr.ht/~kennylevinsen/seatd/5
2020-08-02 21:46:13 +02:00
Kenny Levinsen
5b4d00d6cf list: Add list_pop_back 2020-08-02 21:46:13 +02:00
Kenny Levinsen
b751481e5c seat: Open/close tty on activation/deactivation
The VT and KD ioctl's are picky about the tty fd used. In order to
satisfy these, and to improve state cleanup, we now only and store the
current tty when opening a client, and use this fd to perform teardown
later. The presence of the fd is also used to signal that teardown is
needed.
2020-08-02 21:46:10 +02:00
Kenny Levinsen
b731b18e0a terminal: Correctly set K_ON on keyboard enable 2020-08-02 17:47:34 +02:00
Kenny Levinsen
eace556aa8 log: Fix inverted loglevel check 2020-08-02 17:46:46 +02:00
Kenny Levinsen
ce6ab30d5a seat: Fix seat_device->fd assert 2020-08-01 23:13:54 +02:00
Kenny Levinsen
d26466bf3b Remove ALWAYS_INLINE
Didn't do what I wanted it to anyway.
2020-08-01 23:13:54 +02:00
Kenny Levinsen
2be0826959 connection: Shrink buffers from 1KB to 256B each 2020-08-01 23:13:44 +02:00
Kenny Levinsen
7252558689 Add platform support note to README 2020-08-01 17:18:53 +02:00
Kenny Levinsen
6f6f5de154 seatd: Perform clean server shutdown 2020-08-01 17:02:28 +02:00
Kenny Levinsen
957483fde5 ci: Add completion print to smoketest 2020-08-01 17:02:28 +02:00
Kenny Levinsen
9f5fcec874 ci: Add Alpine/FreeBSD builtin smoketest 2020-08-01 16:53:44 +02:00
Kenny Levinsen
509e64a341 simpletest: Take file to open as argument 2020-08-01 16:53:44 +02:00
Kenny Levinsen
2462284dc5 ci: Add FreeBSD 2020-08-01 16:53:44 +02:00