Blob Blame History Raw
diff -up nut-2.8.1/configure.ac.piddir-owner nut-2.8.1/configure.ac
--- nut-2.8.1/configure.ac.piddir-owner	2023-11-01 09:39:24.267596406 +0100
+++ nut-2.8.1/configure.ac	2023-11-01 10:00:35.425987029 +0100
@@ -4451,7 +4451,7 @@ AS_IF([test -n "$systemdtmpfilesdir"],
 
 # See also: https://github.com/networkupstools/nut/wiki/Technicalities:-Work-with-PID-and-state-file-paths#pidpath-altpidpath-statepath
 # State file (e.g. upsd to driver pipes) and PID file location for NUT:
-d @STATEPATH@ 0770 @RUN_AS_USER@ @RUN_AS_GROUP@ - -
+d @STATEPATH@ 0770 root @RUN_AS_GROUP@ - -
 # Default PIPEFN and LOCKFN locations per upssched.conf:
 d @STATEPATH@/upssched 0770 @RUN_AS_USER@ @RUN_AS_GROUP@ - -
 X @STATEPATH@
@@ -4461,7 +4461,7 @@ EOF
             [*/run|*/tmp|*/shm], [], dnl Do not intrude into system paths; TODO: add more if appropriate for some Linux distro
             [cat >> "${TOP_BUILDDIR}"/scripts/systemd/nut-common-tmpfiles.conf.in << EOF
 # Primarily used by upsmon and upslog, possibly running as root:
-d @PIDPATH@ 0770 @RUN_AS_USER@ @RUN_AS_GROUP@ - -
+d @PIDPATH@ 0770 root @RUN_AS_GROUP@ - -
 X @PIDPATH@
 EOF
 ])])
@@ -4469,14 +4469,14 @@ EOF
         [cat >> "${TOP_BUILDDIR}"/scripts/systemd/nut-common-tmpfiles.conf.in << EOF
 # Should be used as upsd and driver PID file location for NUT
 # (if ALTPIDPATH differs from STATEPATH):
-d @ALTPIDPATH@ 0770 @RUN_AS_USER@ @RUN_AS_GROUP@ - -
+d @ALTPIDPATH@ 0770 root @RUN_AS_GROUP@ - -
 X @ALTPIDPATH@
 EOF])
     dnl Generally added to support some forks
     AS_IF([test -n "$ALTSTATEPATH" && test "$STATEPATH" != "$ALTSTATEPATH" && test "$ALTSTATEPATH" != "$ALTPIDPATH" && test "$PIDPATH" != "$ALTSTATEPATH"],
         [cat >> "${TOP_BUILDDIR}"/scripts/systemd/nut-common-tmpfiles.conf.in << EOF
 # Some NUT variants also maintain an ALTSTATEPATH:
-d @ALTSTATEPATH@ 0770 @RUN_AS_USER@ @RUN_AS_GROUP@ - -
+d @ALTSTATEPATH@ 0770 root @RUN_AS_GROUP@ - -
 X @ALTSTATEPATH@
 EOF])
 ])
diff -up nut-2.8.1/scripts/systemd/nut-common-tmpfiles.conf.in.piddir-owner nut-2.8.1/scripts/systemd/nut-common-tmpfiles.conf.in
--- nut-2.8.1/scripts/systemd/nut-common-tmpfiles.conf.in.piddir-owner	2023-10-31 23:05:03.000000000 +0100
+++ nut-2.8.1/scripts/systemd/nut-common-tmpfiles.conf.in	2023-11-01 10:03:46.970845553 +0100
@@ -5,7 +5,7 @@
 
 # See also: https://github.com/networkupstools/nut/wiki/Technicalities:-Work-with-PID-and-state-file-paths#pidpath-altpidpath-statepath
 # State file (e.g. upsd to driver pipes) and PID file location for NUT:
-d @STATEPATH@ 0770 @RUN_AS_USER@ @RUN_AS_GROUP@ - -
+d @STATEPATH@ 0770 root @RUN_AS_GROUP@ - -
 # Default PIPEFN and LOCKFN locations per upssched.conf:
 d @STATEPATH@/upssched 0770 @RUN_AS_USER@ @RUN_AS_GROUP@ - -
 X @STATEPATH@