summaryrefslogtreecommitdiff
path: root/src/charon-nm/nm
diff options
context:
space:
mode:
authorYves-Alexis Perez <corsac@debian.org>2013-08-25 15:37:26 +0200
committerYves-Alexis Perez <corsac@debian.org>2013-08-25 15:37:26 +0200
commit6b99c8d9cff7b3e8ae8f3204b99e7ea40f791349 (patch)
tree009fc492961e13860d2a4bc2de8caf2bbe2975e7 /src/charon-nm/nm
parentc83921a2b566aa9d55d8ccc7258f04fca6292ee6 (diff)
downloadvyos-strongswan-6b99c8d9cff7b3e8ae8f3204b99e7ea40f791349.tar.gz
vyos-strongswan-6b99c8d9cff7b3e8ae8f3204b99e7ea40f791349.zip
Imported Upstream version 5.1.0
Diffstat (limited to 'src/charon-nm/nm')
-rw-r--r--src/charon-nm/nm/nm_backend.c9
1 files changed, 8 insertions, 1 deletions
diff --git a/src/charon-nm/nm/nm_backend.c b/src/charon-nm/nm/nm_backend.c
index c18bf992a..f474dad60 100644
--- a/src/charon-nm/nm/nm_backend.c
+++ b/src/charon-nm/nm/nm_backend.c
@@ -116,7 +116,9 @@ static bool nm_backend_init()
{
nm_backend_t *this;
+#if !GLIB_CHECK_VERSION(2,36,0)
g_type_init ();
+#endif
#if !GLIB_CHECK_VERSION(2,23,0)
if (!g_thread_supported())
@@ -142,7 +144,12 @@ static bool nm_backend_init()
}
/* bypass file permissions to read from users ssh-agent */
- charon->caps->keep(charon->caps, CAP_DAC_OVERRIDE);
+ if (!lib->caps->keep(lib->caps, CAP_DAC_OVERRIDE))
+ {
+ DBG1(DBG_CFG, "NM backend requires CAP_DAC_OVERRIDE capability");
+ nm_backend_deinit();
+ return FALSE;
+ }
lib->processor->queue_job(lib->processor,
(job_t*)callback_job_create_with_prio((callback_job_cb_t)run, this,