agent: Keep CAP_DAC_OVERRIDE to connect to ssh-agent socket
[strongswan.git] / src / charon-nm / nm / nm_backend.c
index f474dad..ebebde2 100644 (file)
 #include <daemon.h>
 #include <processing/jobs/callback_job.h>
 
-#ifndef CAP_DAC_OVERRIDE
-#define CAP_DAC_OVERRIDE 1
-#endif
-
 typedef struct nm_backend_t nm_backend_t;
 
 /**
@@ -143,14 +139,6 @@ static bool nm_backend_init()
                return FALSE;
        }
 
-       /* bypass file permissions to read from users ssh-agent */
-       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,
                                NULL, (callback_job_cancel_t)cancel, JOB_PRIO_CRITICAL));