mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2024-07-11 12:25:52 +00:00
daemon: Move TLS initialization to virInitialize
My previous patch 74c7567133
introduced a regression by removing TLS initialization from client.
This commit is contained in:
parent
b1643dc15c
commit
eaddec976e
@ -1516,7 +1516,6 @@ int main(int argc, char **argv) {
|
|||||||
virHookCall(VIR_HOOK_DRIVER_DAEMON, "-", VIR_HOOK_DAEMON_OP_START,
|
virHookCall(VIR_HOOK_DRIVER_DAEMON, "-", VIR_HOOK_DAEMON_OP_START,
|
||||||
0, "start", NULL);
|
0, "start", NULL);
|
||||||
|
|
||||||
virNetTLSInit();
|
|
||||||
if (daemonSetupNetworking(srv, config,
|
if (daemonSetupNetworking(srv, config,
|
||||||
sock_file, sock_file_ro,
|
sock_file, sock_file_ro,
|
||||||
ipsock, privileged) < 0) {
|
ipsock, privileged) < 0) {
|
||||||
@ -1555,7 +1554,6 @@ cleanup:
|
|||||||
virNetServerProgramFree(qemuProgram);
|
virNetServerProgramFree(qemuProgram);
|
||||||
virNetServerClose(srv);
|
virNetServerClose(srv);
|
||||||
virNetServerFree(srv);
|
virNetServerFree(srv);
|
||||||
virNetTLSDeinit();
|
|
||||||
if (statuswrite != -1) {
|
if (statuswrite != -1) {
|
||||||
if (ret != 0) {
|
if (ret != 0) {
|
||||||
/* Tell parent of daemon what failed */
|
/* Tell parent of daemon what failed */
|
||||||
|
@ -40,6 +40,7 @@
|
|||||||
#include "memory.h"
|
#include "memory.h"
|
||||||
#include "configmake.h"
|
#include "configmake.h"
|
||||||
#include "intprops.h"
|
#include "intprops.h"
|
||||||
|
#include "rpc/virnettlscontext.h"
|
||||||
|
|
||||||
#ifndef WITH_DRIVER_MODULES
|
#ifndef WITH_DRIVER_MODULES
|
||||||
# ifdef WITH_TEST
|
# ifdef WITH_TEST
|
||||||
@ -413,6 +414,8 @@ virInitialize(void)
|
|||||||
|
|
||||||
virLogSetFromEnv();
|
virLogSetFromEnv();
|
||||||
|
|
||||||
|
virNetTLSInit();
|
||||||
|
|
||||||
VIR_DEBUG("register drivers");
|
VIR_DEBUG("register drivers");
|
||||||
|
|
||||||
#if HAVE_WINSOCK2_H
|
#if HAVE_WINSOCK2_H
|
||||||
|
@ -1410,11 +1410,3 @@ void virNetTLSInit(void)
|
|||||||
{
|
{
|
||||||
gnutls_global_init();
|
gnutls_global_init();
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
|
||||||
* See virNetTLSInit
|
|
||||||
*/
|
|
||||||
void virNetTLSDeinit(void)
|
|
||||||
{
|
|
||||||
gnutls_global_deinit();
|
|
||||||
}
|
|
||||||
|
@ -31,7 +31,6 @@ typedef virNetTLSSession *virNetTLSSessionPtr;
|
|||||||
|
|
||||||
|
|
||||||
void virNetTLSInit(void);
|
void virNetTLSInit(void);
|
||||||
void virNetTLSDeinit(void);
|
|
||||||
|
|
||||||
virNetTLSContextPtr virNetTLSContextNewServerPath(const char *pkipath,
|
virNetTLSContextPtr virNetTLSContextNewServerPath(const char *pkipath,
|
||||||
bool tryUserPkiPath,
|
bool tryUserPkiPath,
|
||||||
|
Loading…
Reference in New Issue
Block a user