summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGravatar Christian Hesse <mail@eworm.de>2022-04-04 13:53:22 +0200
committerGravatar Christian Hesse <mail@eworm.de>2022-04-04 13:53:22 +0200
commiteccaef432b7369bf39468c5065c9aab892c81c01 (patch)
treeea608e31c626574bc4b206b8eb1e7b206e8e036b
parenta94962c502c5ca88b5546b34d0416af40cf8af44 (diff)
downloadpacredir-eccaef432b7369bf39468c5065c9aab892c81c01.tar.gz
pacredir-eccaef432b7369bf39468c5065c9aab892c81c01.tar.zst
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
-rw-r--r--Makefile1
-rw-r--r--systemd/pacredir.service2
-rw-r--r--systemd/sysusers.conf1
3 files changed, 3 insertions, 1 deletions
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"