From eccaef432b7369bf39468c5065c9aab892c81c01 Mon Sep 17 00:00:00 2001 From: Christian Hesse Date: Mon, 4 Apr 2022 13:53:22 +0200 Subject: create a system user for pacredir Missing configuration in /etc/nsswitch.conf was problematic before... Looks looks handling of dynamic users became even worse with dbus 1.14.0 - so let's create a regular system user. Addresses #1 --- Makefile | 1 + systemd/pacredir.service | 2 +- systemd/sysusers.conf | 1 + 3 files changed, 3 insertions(+), 1 deletion(-) create mode 100644 systemd/sysusers.conf diff --git a/Makefile b/Makefile index c3a48b9..ee40d06 100644 --- a/Makefile +++ b/Makefile @@ -60,6 +60,7 @@ install-bin: pacredir avahi/pacserve.service $(INSTALL) -D -m0644 avahi/pacserve.service $(DESTDIR)/etc/avahi/services/pacserve.service $(INSTALL) -D -m0644 systemd/pacredir.service $(DESTDIR)$(PREFIX)/lib/systemd/system/pacredir.service $(INSTALL) -D -m0644 systemd/pacserve.service $(DESTDIR)$(PREFIX)/lib/systemd/system/pacserve.service + $(INSTALL) -D -m0644 systemd/sysusers.conf $(DESTDIR)$(PREFIX)/lib/sysusers.d/pacredir.conf $(INSTALL) -D -m0644 systemd/tmpfiles.conf $(DESTDIR)$(PREFIX)/lib/tmpfiles.d/pacredir.conf $(INSTALL) -D -m0644 initcpio/hooks/pacredir $(DESTDIR)$(PREFIX)/lib/initcpio/hooks/pacredir $(INSTALL) -D -m0644 initcpio/install/pacredir $(DESTDIR)$(PREFIX)/lib/initcpio/install/pacredir diff --git a/systemd/pacredir.service b/systemd/pacredir.service index 555ab49..7184730 100644 --- a/systemd/pacredir.service +++ b/systemd/pacredir.service @@ -15,7 +15,7 @@ Documentation=https://github.com/eworm-de/pacredir#pacredir Type=notify ExecStart=/usr/bin/pacredir ExecReload=/usr/bin/kill -HUP $MAINPID -DynamicUser=on +User=pacredir ProtectSystem=full ProtectHome=on PrivateDevices=on diff --git a/systemd/sysusers.conf b/systemd/sysusers.conf new file mode 100644 index 0000000..cd2e81c --- /dev/null +++ b/systemd/sysusers.conf @@ -0,0 +1 @@ +u pacredir - "redirect pacman requests" -- cgit v1.2.3-54-g00ecf