aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGravatar Christian Kellner <christian@kellner.me>2020-01-26 13:15:40 +0100
committerGravatar Hummer12007 <hilobakho@gmail.com>2020-02-02 16:10:40 +0100
commit2fe7b1f99abedcc866989208ff95cf73314e321a (patch)
treebaa4fb40ae8a002b8e43a5253dd542192d13f81d
parent914a740ac5d0bfd268641a67ffc8cd2251101e62 (diff)
Use non-suid permissions when logind is used
When systemd-logind and its D-Bus API is used to actual change the brightness of devices the binary does not have to be suid, which is desired for security reasons. This is a cherry-pick of: 7504b58765cafae7f7628fe02204883a200a4b10 that was partially reverted by: 052e56ccd662fba25abd7780be5feb66a8e0710b. Signed-off-by: Antoine Damhet <antoine.damhet@lse.epita.fr>
-rw-r--r--Makefile10
1 files changed, 5 insertions, 5 deletions
diff --git a/Makefile b/Makefile
index 222ff4b..105f5d6 100644
--- a/Makefile
+++ b/Makefile
@@ -11,18 +11,18 @@ INSTALL_UDEV_RULES = 1
INSTALL_UDEV_1 = install_udev_rules
UDEVDIR ?= /lib/udev/rules.d
+MODE_0 = 4711
+MODE_1 = 0755
+MODE = ${MODE_${INSTALL_UDEV_RULES}}
+
ifdef ENABLE_SYSTEMD
CFLAGS += ${shell pkg-config --cflags libsystemd}
LDLIBS += ${shell pkg-config --libs libsystemd}
CPPFLAGS += -DENABLE_SYSTEMD
INSTALL_UDEV_RULES=0
+ MODE = 0755
endif
-MODE_0 = 4711
-MODE_1 = 0755
-MODE = ${MODE_${INSTALL_UDEV_RULES}}
-
-
all: brightnessctl brightnessctl.1
install: all ${INSTALL_UDEV_${INSTALL_UDEV_RULES}}