summaryrefslogtreecommitdiff
path: root/p11-kit/Makefile.am
diff options
context:
space:
mode:
authorDaiki Ueno <dueno@redhat.com>2018-06-20 10:43:24 +0200
committerDaiki Ueno <ueno@gnu.org>2018-06-20 13:19:23 +0200
commit53a7e915b2694bc1957d98493a7aee9abfa3c6c5 (patch)
tree82d4bdce9a6d8559a698cd40fda4bb96990489c7 /p11-kit/Makefile.am
parentd4a4039f97b2e1f67d09d7cd8c05fb2dd129b23c (diff)
server: Enable socket activation through systemd
This enables socket activation of "p11-kit server" through systemd. The feature provided is essentially the same as commit a4fb2bb5 (reverted), but implemented with "p11-kit server" and libsystemd API instead of wrapping "p11-kit remote" in the unit file. Note that, while it exposes all tokens through the socket, it doesn't increase attack surface beyond the PKCS#11 binary interface provided by p11-kit-proxy.so, because the service is per-user.
Diffstat (limited to 'p11-kit/Makefile.am')
-rw-r--r--p11-kit/Makefile.am22
1 files changed, 22 insertions, 0 deletions
diff --git a/p11-kit/Makefile.am b/p11-kit/Makefile.am
index 155ef3b..6b9a8a9 100644
--- a/p11-kit/Makefile.am
+++ b/p11-kit/Makefile.am
@@ -253,8 +253,30 @@ p11_kit_server_LDADD = \
libp11-tool.la \
libp11-common.la \
libp11-kit.la \
+ $(LIBSYSTEMD_LIBS) \
$(NULL)
+p11_kit_server_CFLAGS = \
+ $(COMMON_CFLAGS) \
+ $(LIBSYSTEMD_CFLAGS) \
+ $(NULL)
+
+if WITH_SYSTEMD
+p11-kit/p11-kit-server.service: p11-kit/p11-kit-server.service.in
+ $(AM_V_GEN)rm -f $@-t $@ && \
+ sed 's|@bindir[@]|$(bindir)|g' $< > $@-t && \
+ mv -f $@-t $@
+
+CLEANFILES += p11-kit/p11-kit-server.service
+
+systemduserunit_DATA = \
+ p11-kit/p11-kit-server.socket \
+ p11-kit/p11-kit-server.service \
+ $(NULL)
+endif
+
+EXTRA_DIST += p11-kit/p11-kit-server.socket p11-kit/p11-kit-server.service.in
+
# Tests ----------------------------------------------------------------
p11_kit_LIBS = \