From aae5cfb69948fddef556f8f5b9f80a444f9c6125 Mon Sep 17 00:00:00 2001 From: "Daniel P. Berrange" Date: Tue, 31 Jul 2012 10:57:10 +0100 Subject: [PATCH] Don't link nwfilter or secrets driver to libvirt.so The nwfilter and secrets drivers are both stateful and are already linked directly to libvirtd. Linking them to libvirt.so is thus wrong, likewise exporting their symbols in libvirt.so is wrong --- src/Makefile.am | 11 ++++------- src/libvirt_nwfilter.syms | 12 ------------ src/libvirt_private.syms | 31 ------------------------------- tests/Makefile.am | 5 +++-- 4 files changed, 7 insertions(+), 52 deletions(-) delete mode 100644 src/libvirt_nwfilter.syms diff --git a/src/Makefile.am b/src/Makefile.am index a5c4c6c6d3..44350c8624 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -1165,8 +1165,9 @@ if WITH_NWFILTER if WITH_DRIVER_MODULES mod_LTLIBRARIES += libvirt_driver_nwfilter.la else -libvirt_la_BUILT_LIBADD += libvirt_driver_nwfilter.la noinst_LTLIBRARIES += libvirt_driver_nwfilter.la +# Stateful, so linked to daemon instead +#libvirt_la_BUILT_LIBADD += libvirt_driver_nwfilter.la endif libvirt_driver_nwfilter_la_CFLAGS = $(LIBPCAP_CFLAGS) \ -I$(top_srcdir)/src/conf $(LIBNL_CFLAGS) $(AM_CFLAGS) @@ -1182,7 +1183,8 @@ endif libvirt_driver_security_la_SOURCES = $(SECURITY_DRIVER_SOURCES) noinst_LTLIBRARIES += libvirt_driver_security.la -libvirt_la_BUILT_LIBADD += libvirt_driver_security.la +# Stateful, so linked to daemon instead +#libvirt_la_BUILT_LIBADD += libvirt_driver_security.la libvirt_driver_security_la_CFLAGS = \ -I$(top_srcdir)/src/conf $(AM_CFLAGS) libvirt_driver_security_la_LDFLAGS = $(AM_LDFLAGS) @@ -1320,10 +1322,6 @@ if WITH_LIBVIRTD USED_SYM_FILES += libvirt_daemon.syms endif -if WITH_NWFILTER -USED_SYM_FILES += libvirt_nwfilter.syms -endif - if WITH_OPENVZ USED_SYM_FILES += libvirt_openvz.syms endif @@ -1347,7 +1345,6 @@ EXTRA_DIST += \ libvirt_daemon.syms \ libvirt_linux.syms \ libvirt_esx.syms \ - libvirt_nwfilter.syms \ libvirt_openvz.syms \ libvirt_qemu.syms \ libvirt_sasl.syms \ diff --git a/src/libvirt_nwfilter.syms b/src/libvirt_nwfilter.syms deleted file mode 100644 index 23dfa154e4..0000000000 --- a/src/libvirt_nwfilter.syms +++ /dev/null @@ -1,12 +0,0 @@ -# -# These symbols are dependent on WITH_NWFILTER. -# - - -# nwfilter_gentech_driver.h -virNWFilterInstantiateFilter; -virNWFilterTeardownFilter; - - -# nwfilter_learnipaddr.h -virNWFilterLookupLearnReq; diff --git a/src/libvirt_private.syms b/src/libvirt_private.syms index 83ca99fcbb..ac392fec03 100644 --- a/src/libvirt_private.syms +++ b/src/libvirt_private.syms @@ -962,37 +962,6 @@ virSecretUsageTypeTypeFromString; virSecretUsageTypeTypeToString; -# security_driver.h -virSecurityDriverLookup; - - -# security_manager.h -virSecurityManagerClearSocketLabel; -virSecurityManagerFree; -virSecurityManagerGenLabel; -virSecurityManagerGetDOI; -virSecurityManagerGetModel; -virSecurityManagerGetProcessLabel; -virSecurityManagerNew; -virSecurityManagerNewStack; -virSecurityManagerNewDAC; -virSecurityManagerReleaseLabel; -virSecurityManagerReserveLabel; -virSecurityManagerRestoreImageLabel; -virSecurityManagerRestoreAllLabel; -virSecurityManagerRestoreHostdevLabel; -virSecurityManagerRestoreSavedStateLabel; -virSecurityManagerSetAllLabel; -virSecurityManagerSetDaemonSocketLabel; -virSecurityManagerSetImageFDLabel; -virSecurityManagerSetImageLabel; -virSecurityManagerSetHostdevLabel; -virSecurityManagerSetProcessLabel; -virSecurityManagerSetSavedStateLabel; -virSecurityManagerSetSocketLabel; -virSecurityManagerVerify; -virSecurityManagerGetMountOptions; - # sexpr.h sexpr_append; sexpr_cons; diff --git a/tests/Makefile.am b/tests/Makefile.am index a46648047e..b931cea54e 100644 --- a/tests/Makefile.am +++ b/tests/Makefile.am @@ -294,7 +294,8 @@ endif if WITH_QEMU -qemu_LDADDS = ../src/libvirt_driver_qemu_impl.la +qemu_LDADDS = ../src/libvirt_driver_qemu_impl.la \ + ../src/libvirt_driver_security.la if WITH_NETWORK qemu_LDADDS += ../src/libvirt_driver_network_impl.la endif @@ -519,7 +520,7 @@ virauthconfigtest_LDADD = $(LDADDS) seclabeltest_SOURCES = \ seclabeltest.c -seclabeltest_LDADD = $(LDADDS) +seclabeltest_LDADD = $(LDADDS) ../src/libvirt_driver_security.la virbuftest_SOURCES = \ virbuftest.c testutils.h testutils.c -- GitLab