diff --git a/configure.ac b/configure.ac index 9c8d979..41804ae 100644 --- a/configure.ac +++ b/configure.ac @@ -60,6 +60,8 @@ AC_ARG_WITH([systemdsystemunitdir], [], [with_systemdsystemunitdir=$($PKG_CONFIG --variable=systemdsystemunitdir systemd)]) AS_IF([test "x$with_systemdsystemunitdir" != "xno"], [ + # StateDirectory was introduced in systemd 235 + PKG_CHECK_MODULES(SYSTEMD, systemd >= 235) AC_SUBST([systemdsystemunitdir], [$with_systemdsystemunitdir]) ]) AM_CONDITIONAL(HAVE_SYSTEMD, [test -n "$systemdsystemunitdir"]) diff --git a/data/fprintd.service.in b/data/fprintd.service.in index f2ebd98..9ea7a2a 100644 --- a/data/fprintd.service.in +++ b/data/fprintd.service.in @@ -11,7 +11,8 @@ ExecStart=@libexecdir@/fprintd ProtectSystem=strict ProtectKernelTunables=true ProtectControlGroups=true -ReadWritePaths=/var/lib/fprint +# This always corresponds to /var/lib/fprint +StateDirectory=fprint ProtectHome=true PrivateTmp=true