Kenny Levinsen
8813671486
man: Mention assistance from other contributors
2020-09-07 23:54:52 +02:00
Kenny Levinsen
047d8b284c
libseat: Handle SERVER_ERROR correctly
...
The connection buffer position was erroneously rewinded before reading
the protocol message when the message was a SERVER_ERROR.
2020-09-07 23:35:24 +02:00
Isaac Freund
1867f29d42
meson: fix manpage generation for cross builds
...
We want to use the scdoc of the host system not the target system, so
pass the `native: true` parameter to meson.
2020-09-01 21:32:36 +02:00
Kenny Levinsen
ad214dc3fe
client: Only unlink if on the idle list
2020-09-01 02:47:03 +02:00
Kenny Levinsen
34d0c87ea8
ci: ASan smoketest on FreeBSD
2020-09-01 02:27:05 +02:00
Kenny Levinsen
d53b3a87ec
ci: ASan all build steps on arch
2020-09-01 02:26:53 +02:00
Kenny Levinsen
5d4036e9bd
Move list removal to seat/client destroy
2020-09-01 00:33:20 +02:00
Kenny Levinsen
5b8117f3d4
client: Do not leak idle clients on exit
2020-08-31 23:13:16 +02:00
Kenny Levinsen
c9ce7c71aa
poller: Remember to remove sources from list
2020-08-31 22:08:59 +02:00
Kenny Levinsen
704d1ccd0b
server: Remember to remove seat from list
2020-08-31 22:04:32 +02:00
Kenny Levinsen
aef19fe383
test: Add test_run and test_assert macros
...
test_run and test_assert replaces regular assert with better logging
which include the currently running test name. The tests can now also be
built without DEBUG.
2020-08-31 14:40:58 +02:00
Kenny Levinsen
8610ec4aac
Remove unused list implementation
2020-08-31 14:14:39 +02:00
Kenny Levinsen
d17632fadd
poller: Convert to linked_list
2020-08-31 14:09:59 +02:00
Kenny Levinsen
bbfb770c73
linked_list: linked_list_take should concat lists
2020-08-31 14:09:59 +02:00
Kenny Levinsen
d75b617faf
server: Convert seat list to linked_list
2020-08-31 14:09:59 +02:00
Kenny Levinsen
7d88315fea
poller: Make event sources opaque
2020-08-31 01:33:41 +02:00
Kenny Levinsen
8e1bf10d9d
seatd: Explicit cast -1 to unsigned gid_t
...
Silences a warning on some architectures.
2020-08-30 23:16:47 +02:00
Kenny Levinsen
c9503ef35d
seatd: Slight error handling cleanup
2020-08-30 03:26:52 +02:00
Kenny Levinsen
e86c9ec2b7
seatd: Remove unused device_closed msg body
2020-08-30 03:26:32 +02:00
Kenny Levinsen
c36cc962e6
linked_list: Implement linked_list_take
2020-08-30 00:05:19 +02:00
Kenny Levinsen
5470c48113
seat: Destroy all clients on teardown
2020-08-29 23:49:22 +02:00
Kenny Levinsen
b7b28f0628
protocol: Add note to remove device_closed msg
...
The content of this message is unused, so it should be converted to a
content-less message.
2020-08-29 23:12:18 +02:00
Kenny Levinsen
1ae6c3b3dd
libseat: Check euid before using builtin
2020-08-29 23:01:56 +02:00
Kenny Levinsen
52fe75d5a4
libseat: Remove pointless check
2020-08-29 22:55:17 +02:00
Kenny Levinsen
98506d2ba4
libseat: Keep track of error state
...
Store if an error has occurred and return -1 with ENOTCONN from all
future calls, avoiding attempts to use a broken connection.
2020-08-29 22:45:01 +02:00
Kenny Levinsen
8b4d139873
libseat: Improve logging with seatd conn helpers
...
Add helpers around connection access to have all logging centralized and
reduce code duplication. Improve existing helpers to further reduce code
duplication.
The seatd backend should have much better logging after this.
2020-08-29 20:56:42 +02:00
Kenny Levinsen
69d57aaf33
libseat: Assert that listener is non-NULL
2020-08-29 20:29:35 +02:00
Kenny Levinsen
de96b3938b
Bump version to 0.2.0
2020-08-28 23:09:14 +02:00
Kenny Levinsen
6e6903829e
logind: Merge PropertiesChanged handlers
2020-08-28 22:55:25 +02:00
Kenny Levinsen
74eee486fa
libseat: Expand logging in all backends
2020-08-28 22:55:10 +02:00
Kenny Levinsen
1e6d4f451f
libseat: Only print backend attempts for matches
2020-08-28 22:40:10 +02:00
Kenny Levinsen
27c1914625
terminal: Explain FreeBSD current_vt behavior
2020-08-28 17:46:13 +02:00
Kenny Levinsen
dbdce8a54b
terminal: Construct TTY paths correctly on FreeBSD
...
FreeBSD TTY paths are contructed in the kernel using the %r formatter,
which in this case ends up being a base 32 encoding.
The base 32 implementation is taken more or less directly from wlroots
commit fc6c0ca12e94.
2020-08-28 17:46:13 +02:00
Kenny Levinsen
60a8e809b2
terminal: FreeBSD VT num is 1 higher than tty num
...
This was causing all VT and TTY changes to be applied to the wrong TTY.
2020-08-28 02:54:14 +02:00
Kenny Levinsen
8e0b58f90d
terminal: Set K_RAW and term raw mode on FreeBSD
...
Taken from X11, weston and consolekit2 ports for FreeBSD.
Setting just K_CODE as done before makes input seemingly have no ill
effects, but it is still buffered and possibly send to the terminal
after application exit if stdin is never drained. Setting raw mode
appears to be needed to solve that issue.
A K_OFF-like VT keyboard setting like Linux has would seem more
appropriate, but that is not currently available to us on FreeBSD.
2020-08-28 02:54:14 +02:00
Kenny Levinsen
4ae4793b25
simpletest: Set log level to debug
2020-08-28 01:26:39 +02:00
Simon Ser
07ceeeebe0
Introduce libseat_set_log_level
...
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-28 01:21:57 +02:00
Simon Ser
48b9bf4707
Nuke LIBSEAT_LOGLEVEL
...
This will be replaced with a libseat API to set the log level.
2020-08-28 01:21:57 +02:00
Simon Ser
47d4b43f1a
Introduce libseat_set_log_handler
...
This allows libseat users to register a custom logging function.
2020-08-28 01:21:57 +02:00
Simon Ser
a254fe3692
Rename enum log_level to libseat_log_level
...
This is preparatory work for exposing a public function to set libseat's
log handler.
2020-08-28 01:21:57 +02:00
Kenny Levinsen
ab4b961492
libseat: Remove useless logind fallbacks
...
The logind code is based on the wlroots implementation, which in turn
contained copy-paste code from Mutter that serves no purpose here.
2020-08-24 02:55:14 +02:00
Kenny Levinsen
26aff21058
logind: Set session type from env
2020-08-23 20:13:05 +02:00
Kenny Levinsen
8ab3fc03aa
logind: Remove session type check
2020-08-23 20:12:51 +02:00
Kenny Levinsen
24c66d8c08
logind: Remove useless check
2020-08-23 20:12:29 +02:00
Kenny Levinsen
ff44c56ef9
meson: Set license to MIT
2020-08-22 21:47:00 +02:00
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