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 b0c28d2313..f7519efe2f 100644 --- a/daemon/Makefile.am +++ b/daemon/Makefile.am @@ -205,7 +205,6 @@ libvirtd_LDADD += \ libvirtd_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 6b4db22937..ec2b4f631c 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -1310,16 +1310,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) @@ -2574,8 +2569,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 @@ -2889,6 +2882,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 a181c4cf7f..da14a2449c 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