The libvirt_driver_remote.la static library is linked into the libvirt.so dynamic library, providing both the generic RPC layer code and the remote protocol client driver. The libvirtd daemon the itself links to libvirt_driver_remote.la, in order to get access to the generic RPC layer code and the XDR functions for the remote driver. This means we get multiple copies of the same code in libvirtd, one direct and one indirect via libvirt.so. The same mistake affects the lockd plugin. The libvirtd daemon should instead just link aganist the generic RPC layer code that's in libvirt.so. This is easily doable if we add exports for the few symbols we've previously missed, and wildcard export xdr_* to expose the auto-generated XDR marshallers. Signed-off-by: Daniel P. Berrangé <berrange@xxxxxxxxxx> --- daemon/Makefile.am | 1 - src/Makefile.am | 12 +++++------- src/libvirt_remote.syms | 11 ++++++++++- 3 files changed, 15 insertions(+), 9 deletions(-) diff --git a/daemon/Makefile.am b/daemon/Makefile.am index efd5ff19f5..9c1dfcfac6 100644 --- a/daemon/Makefile.am +++ b/daemon/Makefile.am @@ -176,7 +176,6 @@ libvirtd_LDADD += \ ../src/libvirt_driver_admin.la \ ../src/libvirt-lxc.la \ ../src/libvirt-qemu.la \ - ../src/libvirt_driver_remote.la \ $(NULL) libvirtd_LDADD += ../src/libvirt.la diff --git a/src/Makefile.am b/src/Makefile.am index 0c8afcc150..ce0081cd4d 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -1316,16 +1316,11 @@ if WITH_REMOTE noinst_LTLIBRARIES += libvirt_driver_remote.la libvirt_la_BUILT_LIBADD += libvirt_driver_remote.la libvirt_driver_remote_la_CFLAGS = \ - $(GNUTLS_CFLAGS) \ $(XDR_CFLAGS) \ -I$(srcdir)/conf \ -I$(srcdir)/rpc \ $(AM_CFLAGS) libvirt_driver_remote_la_LDFLAGS = $(AM_LDFLAGS) -libvirt_driver_remote_la_LIBADD = $(GNUTLS_LIBS) \ - libvirt-net-rpc-client.la \ - libvirt-net-rpc-server.la \ - libvirt-net-rpc.la libvirt_driver_remote_la_SOURCES = $(REMOTE_DRIVER_SOURCES) BUILT_SOURCES += $(REMOTE_DRIVER_GENERATED) @@ -2601,8 +2596,6 @@ lockd_la_CFLAGS = -I$(srcdir)/conf \ $(AM_CFLAGS) lockd_la_LDFLAGS = -module -avoid-version $(AM_LDFLAGS) lockd_la_LIBADD = ../gnulib/lib/libgnu.la \ - libvirt-net-rpc.la \ - libvirt-net-rpc-client.la \ $(NULL) augeas_DATA += locking/libvirt_lockd.aug if WITH_DTRACE_PROBES @@ -2918,6 +2911,11 @@ noinst_LTLIBRARIES += \ libvirt-net-rpc-server.la \ libvirt-net-rpc-client.la +libvirt_la_BUILT_LIBADD += \ + libvirt-net-rpc.la \ + libvirt-net-rpc-server.la \ + libvirt-net-rpc-client.la + EXTRA_DIST += \ dtrace2systemtap.pl \ rpc/gendispatch.pl \ diff --git a/src/libvirt_remote.syms b/src/libvirt_remote.syms index b75cbb99b2..736848273a 100644 --- a/src/libvirt_remote.syms +++ b/src/libvirt_remote.syms @@ -5,6 +5,9 @@ # Keep this file sorted by header name, then by symbols with each header. # +# Generated files +xdr_*; + # rpc/virnetclient.h virNetClientAddProgram; virNetClientAddStream; @@ -80,6 +83,7 @@ virNetDaemonUpdateServices; # rpc/virnetmessage.h +virNetMessageAddFD; virNetMessageClear; virNetMessageClearPayload; virNetMessageDecodeHeader; @@ -96,7 +100,6 @@ virNetMessageNew; virNetMessageQueuePush; virNetMessageQueueServe; virNetMessageSaveError; -xdr_virNetMessageError; # rpc/virnetserver.h @@ -104,12 +107,14 @@ virNetServerAddClient; virNetServerAddProgram; virNetServerAddService; virNetServerClose; +virNetServerGetClient; virNetServerGetClients; virNetServerGetCurrentClients; virNetServerGetCurrentUnauthClients; virNetServerGetMaxClients; virNetServerGetMaxUnauthClients; virNetServerGetName; +virNetServerGetThreadPoolParameters; virNetServerHasClients; virNetServerNew; virNetServerNewPostExecRestart; @@ -117,6 +122,8 @@ virNetServerNextClientID; virNetServerPreExecRestart; virNetServerProcessClients; virNetServerSetClientAuthenticated; +virNetServerSetClientLimits; +virNetServerSetThreadPoolParameters; virNetServerStart; virNetServerUpdateServices; @@ -128,11 +135,13 @@ virNetServerClientCloseLocked; virNetServerClientDelayedClose; virNetServerClientGetAuth; virNetServerClientGetFD; +virNetServerClientGetID; virNetServerClientGetIdentity; virNetServerClientGetInfo; virNetServerClientGetPrivateData; virNetServerClientGetReadonly; virNetServerClientGetSELinuxContext; +virNetServerClientGetTimestamp; virNetServerClientGetTransport; virNetServerClientGetUNIXIdentity; virNetServerClientImmediateClose; -- 2.14.3 -- libvir-list mailing list libvir-list@xxxxxxxxxx https://www.redhat.com/mailman/listinfo/libvir-list