2009/12/22 Daniel Veillard <veillard@xxxxxxxxxx>: > On Tue, Dec 22, 2009 at 02:57:56PM +0100, Matthias Bolte wrote: >> All other stateful drivers are linked directly to libvirtd >> instead of libvirt.so. Link the secret driver to libvirtd too. >> >> * daemon/Makefile.am: link the secret driver to libvirtd >> * src/Makefile.am: don't link the secret driver to libvirt.so >> * src/libvirt_private.syms: remove the secretRegister symbol >> --- >> daemon/Makefile.am | 2 ++ >> src/Makefile.am | 3 ++- >> src/libvirt_private.syms | 2 -- >> 3 files changed, 4 insertions(+), 3 deletions(-) >> >> diff --git a/daemon/Makefile.am b/daemon/Makefile.am >> index ab3f238..f6b6a3a 100644 >> --- a/daemon/Makefile.am >> +++ b/daemon/Makefile.am >> @@ -110,6 +110,8 @@ endif >> if WITH_NODE_DEVICES >> libvirtd_LDADD += ../src/libvirt_driver_nodedev.la >> endif >> + >> + libvirtd_LDADD += ../src/libvirt_driver_secret.la >> endif > > Hum, I think there is a missing > if WITH_SECRETS > > endif > > around that block, isn't it ? Yes it is, and it's also missing in libvirtd.c. >> libvirtd_LDADD += ../src/libvirt.la >> diff --git a/src/Makefile.am b/src/Makefile.am >> index 42108c0..526d985 100644 >> --- a/src/Makefile.am >> +++ b/src/Makefile.am >> @@ -598,7 +598,8 @@ if WITH_DRIVER_MODULES >> mod_LTLIBRARIES += libvirt_driver_secret.la >> else >> noinst_LTLIBRARIES += libvirt_driver_secret.la >> -libvirt_la_LIBADD += libvirt_driver_secret.la >> +# Stateful, so linked to daemon instead >> +#libvirt_la_LIBADD += libvirt_driver_secret.la >> endif >> libvirt_driver_secret_la_CFLAGS = \ >> -I@top_srcdir@/src/conf >> diff --git a/src/libvirt_private.syms b/src/libvirt_private.syms >> index f90f269..31c944c 100644 >> --- a/src/libvirt_private.syms >> +++ b/src/libvirt_private.syms >> @@ -456,8 +456,6 @@ virSecretDefParseString; >> virSecretDefParseFile; >> virSecretDefFormat; >> >> -# secret_driver.h >> -secretRegister; >> >> # security.h >> virSecurityDriverVerify; >> -- >> 1.6.0.4 >> >> -- >> Libvir-list mailing list >> Libvir-list@xxxxxxxxxx >> https://www.redhat.com/mailman/listinfo/libvir-list > > Daniel > Version 2 of the patch is attached. Matthias
From 99bb354d69bf0c61886f763842499d7d01d97f95 Mon Sep 17 00:00:00 2001 From: Matthias Bolte <matthias.bolte@xxxxxxxxxxxxxx> Date: Tue, 22 Dec 2009 14:50:50 +0100 Subject: [PATCH] The secret driver is stateful, link it directly to libvirtd All other stateful drivers are linked directly to libvirtd instead of libvirt.so. Link the secret driver to libvirtd too. * daemon/Makefile.am: link the secret driver to libvirtd * daemon/libvirtd.c: add #ifdef WITH_SECRETS blocks * src/Makefile.am: don't link the secret driver to libvirt.so * src/libvirt_private.syms: remove the secretRegister symbol --- daemon/Makefile.am | 4 ++++ daemon/libvirtd.c | 4 ++++ src/Makefile.am | 3 ++- src/libvirt_private.syms | 2 -- 4 files changed, 10 insertions(+), 3 deletions(-) diff --git a/daemon/Makefile.am b/daemon/Makefile.am index ab3f238..958a4f6 100644 --- a/daemon/Makefile.am +++ b/daemon/Makefile.am @@ -110,6 +110,10 @@ endif if WITH_NODE_DEVICES libvirtd_LDADD += ../src/libvirt_driver_nodedev.la endif + +if WITH_SECRETS + libvirtd_LDADD += ../src/libvirt_driver_secret.la +endif endif libvirtd_LDADD += ../src/libvirt.la diff --git a/daemon/libvirtd.c b/daemon/libvirtd.c index 281a46a..c53ef0a 100644 --- a/daemon/libvirtd.c +++ b/daemon/libvirtd.c @@ -93,8 +93,10 @@ #ifdef WITH_NODE_DEVICES #include "node_device/node_device_driver.h" #endif +#ifdef WITH_SECRETS #include "secret/secret_driver.h" #endif +#endif #ifdef __sun @@ -880,7 +882,9 @@ static struct qemud_server *qemudInitialize(void) { #if defined(WITH_NODE_DEVICES) nodedevRegister(); #endif +#ifdef WITH_SECRETS secretRegister(); +#endif #ifdef WITH_QEMU qemuRegister(); #endif diff --git a/src/Makefile.am b/src/Makefile.am index 42108c0..526d985 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -598,7 +598,8 @@ if WITH_DRIVER_MODULES mod_LTLIBRARIES += libvirt_driver_secret.la else noinst_LTLIBRARIES += libvirt_driver_secret.la -libvirt_la_LIBADD += libvirt_driver_secret.la +# Stateful, so linked to daemon instead +#libvirt_la_LIBADD += libvirt_driver_secret.la endif libvirt_driver_secret_la_CFLAGS = \ -I@top_srcdir@/src/conf diff --git a/src/libvirt_private.syms b/src/libvirt_private.syms index f90f269..31c944c 100644 --- a/src/libvirt_private.syms +++ b/src/libvirt_private.syms @@ -456,8 +456,6 @@ virSecretDefParseString; virSecretDefParseFile; virSecretDefFormat; -# secret_driver.h -secretRegister; # security.h virSecurityDriverVerify; -- 1.6.0.4
-- Libvir-list mailing list Libvir-list@xxxxxxxxxx https://www.redhat.com/mailman/listinfo/libvir-list