Since version 243, systemd-logind supports setting the brightness of an
"leds" or "backlight" kernel class device [1]. This method call requires
no privileges to call, but a caller can only change the brightness on
sessions that are currently active, and they must own the session.
Using systemd/elogind for unprivileged brightness changes is a nice
feature to have since it allows to changes brightness without giving
explicit permissions to users via groups or setting SUID bit.
[1] https://github.com/systemd/systemd/commit/2a66c2a1eda48433cb7f4ac6e9b9abcf4bd41bf3
Fix #45: Add --with-udev[=PATH] to configure, disables classic SUID root
This patch adds support for installing the 90-backlight.rules to gain
privileges to the kernel sysfs files. By default the classic SUID root
mode is used and the rules file is not installed.
Signed-off-by: Joachim Nilsson <troglobit@gmail.com>
This patch adds a standard configure script and converts the Makefile to
automake. This adresses PR #30, but in a more generic way, and also
eliminates the hard coded CC variable, enabling building with clang or
even a cross compiler.
Note: this is more a proof of concept and does not include the man page
generation. Another pull request addresses that.
Signed-off-by: Joachim Nilsson <troglobit@gmail.com>