capabilities: CAP_CHOWN might be required by many plugins opening UNIX sockets
[strongswan.git] / src / libcharon / plugins / load_tester / load_tester_plugin.c
index 6fee2bf..a32a2a4 100644 (file)
@@ -269,6 +269,12 @@ plugin_t *load_tester_plugin_create()
                return NULL;
        }
 
+       if (!lib->caps->keep(lib->caps, CAP_CHOWN))
+       {       /* required to chown(2) control socket */
+               DBG1(DBG_CFG, "load-tester plugin requires CAP_CHOWN capability");
+               return NULL;
+       }
+
        INIT(this,
                .public = {
                        .plugin = {