[libvirt] [PATCH 11/29] secret: introduce virtsecretd daemon

Daniel P. Berrangé posted 29 patches 6 years, 7 months ago
There is a newer version of this series
[libvirt] [PATCH 11/29] secret: introduce virtsecretd daemon
Posted by Daniel P. Berrangé 6 years, 7 months ago
The virtsecretd daemon will be responsible for providing the secret API
driver functionality. The secret driver is still loaded by the main
libvirtd daemon at this stage, so virtsecretd must not be running at
the same time.

Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
---
 .gitignore                 |  1 +
 libvirt.spec.in            |  1 +
 src/secret/Makefile.inc.am | 14 ++++++++++++++
 3 files changed, 16 insertions(+)

diff --git a/.gitignore b/.gitignore
index 727bfdb6ec..29473c4889 100644
--- a/.gitignore
+++ b/.gitignore
@@ -164,6 +164,7 @@
 /src/virt-aa-helper
 /src/virtlockd
 /src/virtlogd
+/src/virtsecretd
 /src/virt-guest-shutdown.target
 /tests/*.log
 /tests/*.pid
diff --git a/libvirt.spec.in b/libvirt.spec.in
index d54f58f1d4..e2c4bbef5d 100644
--- a/libvirt.spec.in
+++ b/libvirt.spec.in
@@ -1602,6 +1602,7 @@ exit 0
 %{_libdir}/%{name}/connection-driver/libvirt_driver_nwfilter.so
 
 %files daemon-driver-secret
+%attr(0755, root, root) %{_sbindir}/virtsecretd
 %{_libdir}/%{name}/connection-driver/libvirt_driver_secret.so
 
 %files daemon-driver-storage
diff --git a/src/secret/Makefile.inc.am b/src/secret/Makefile.inc.am
index 7a1c8f8e1a..88a8b80658 100644
--- a/src/secret/Makefile.inc.am
+++ b/src/secret/Makefile.inc.am
@@ -37,4 +37,18 @@ libvirt_driver_secret_la_LIBADD = \
 	$(NULL)
 libvirt_driver_secret_la_LDFLAGS = $(AM_LDFLAGS_MOD_NOUNDEF)
 libvirt_driver_secret_la_SOURCES = $(SECRET_DRIVER_SOURCES)
+
+sbin_PROGRAMS += virtsecretd
+
+virtsecretd_SOURCES = $(REMOTE_DAEMON_SOURCES)
+virtsecretd_CFLAGS = \
+	$(REMOTE_DAEMON_CFLAGS) \
+	-DSOCK_NAME="\"virtsecretd-sock\"" \
+	-DSOCK_NAME_RO="\"virtsecretd-sock-ro\"" \
+	-DSOCK_NAME_ADMIN="\"virtsecretd-admin-sock\"" \
+	-DDAEMON_NAME="\"virtsecretd\"" \
+	-DMODULE_NAME="\"secret\"" \
+	$(NULL)
+virtsecretd_LDFLAGS = $(REMOTE_DAEMON_LDFLAGS)
+virtsecretd_LDADD = $(REMOTE_DAEMON_LDADD)
 endif WITH_SECRETS
-- 
2.21.0

--
libvir-list mailing list
libvir-list@redhat.com
https://www.redhat.com/mailman/listinfo/libvir-list