Kenny Levinsen
8813671486
man: Mention assistance from other contributors
3 years ago
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.
3 years ago
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.
3 years ago
Kenny Levinsen
ad214dc3fe
client: Only unlink if on the idle list
3 years ago
Kenny Levinsen
34d0c87ea8
ci: ASan smoketest on FreeBSD
3 years ago
Kenny Levinsen
d53b3a87ec
ci: ASan all build steps on arch
3 years ago
Kenny Levinsen
5d4036e9bd
Move list removal to seat/client destroy
3 years ago
Kenny Levinsen
5b8117f3d4
client: Do not leak idle clients on exit
3 years ago
Kenny Levinsen
c9ce7c71aa
poller: Remember to remove sources from list
3 years ago
Kenny Levinsen
704d1ccd0b
server: Remember to remove seat from list
3 years ago
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.
3 years ago
Kenny Levinsen
8610ec4aac
Remove unused list implementation
3 years ago
Kenny Levinsen
d17632fadd
poller: Convert to linked_list
3 years ago
Kenny Levinsen
bbfb770c73
linked_list: linked_list_take should concat lists
3 years ago
Kenny Levinsen
d75b617faf
server: Convert seat list to linked_list
3 years ago
Kenny Levinsen
7d88315fea
poller: Make event sources opaque
3 years ago
Kenny Levinsen
8e1bf10d9d
seatd: Explicit cast -1 to unsigned gid_t
Silences a warning on some architectures.
3 years ago
Kenny Levinsen
c9503ef35d
seatd: Slight error handling cleanup
3 years ago
Kenny Levinsen
e86c9ec2b7
seatd: Remove unused device_closed msg body
3 years ago
Kenny Levinsen
c36cc962e6
linked_list: Implement linked_list_take
3 years ago
Kenny Levinsen
5470c48113
seat: Destroy all clients on teardown
3 years ago
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.
3 years ago
Kenny Levinsen
1ae6c3b3dd
libseat: Check euid before using builtin
3 years ago
Kenny Levinsen
52fe75d5a4
libseat: Remove pointless check
3 years ago
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.
3 years ago
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.
3 years ago
Kenny Levinsen
69d57aaf33
libseat: Assert that listener is non-NULL
3 years ago
Kenny Levinsen
de96b3938b
Bump version to 0.2.0
3 years ago
Kenny Levinsen
6e6903829e
logind: Merge PropertiesChanged handlers
3 years ago
Kenny Levinsen
74eee486fa
libseat: Expand logging in all backends
3 years ago
Kenny Levinsen
1e6d4f451f
libseat: Only print backend attempts for matches
3 years ago
Kenny Levinsen
27c1914625
terminal: Explain FreeBSD current_vt behavior
3 years ago
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.
3 years ago
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.
3 years ago
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.
3 years ago
Kenny Levinsen
4ae4793b25
simpletest: Set log level to debug
3 years ago
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).
3 years ago
Simon Ser
48b9bf4707
Nuke LIBSEAT_LOGLEVEL
This will be replaced with a libseat API to set the log level.
3 years ago
Simon Ser
47d4b43f1a
Introduce libseat_set_log_handler
This allows libseat users to register a custom logging function.
3 years ago
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.
3 years ago
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.
3 years ago
Kenny Levinsen
26aff21058
logind: Set session type from env
3 years ago
Kenny Levinsen
8ab3fc03aa
logind: Remove session type check
3 years ago
Kenny Levinsen
24c66d8c08
logind: Remove useless check
3 years ago
Kenny Levinsen
ff44c56ef9
meson: Set license to MIT
3 years ago
Kenny Levinsen
f5bc8ab12b
seatd: Use path-based chmod/chown
The fd variants do not seem to work for sockets
3 years ago
Kenny Levinsen
24e2fc7861
ci: Install scdoc for alpine and archlinux
3 years ago
Kenny Levinsen
b312fbfb5e
man: Add simple seatd(1) page
3 years ago
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.
3 years ago
Kenny Levinsen
e57e3e22b9
contrib: Add example systemd service
3 years ago