libcharon: Use lib->ns instead of charon->name
authorTobias Brunner <tobias@strongswan.org>
Wed, 22 Jan 2014 14:18:58 +0000 (15:18 +0100)
committerTobias Brunner <tobias@strongswan.org>
Wed, 12 Feb 2014 13:34:32 +0000 (14:34 +0100)
72 files changed:
src/libcharon/daemon.c
src/libcharon/network/receiver.c
src/libcharon/network/sender.c
src/libcharon/plugins/android_log/android_log_logger.c
src/libcharon/plugins/certexpire/certexpire_export.c
src/libcharon/plugins/coupling/coupling_validator.c
src/libcharon/plugins/dhcp/dhcp_socket.c
src/libcharon/plugins/dnscert/dnscert_plugin.c
src/libcharon/plugins/duplicheck/duplicheck_notify.c
src/libcharon/plugins/duplicheck/duplicheck_plugin.c
src/libcharon/plugins/eap_aka/eap_aka_server.c
src/libcharon/plugins/eap_aka_3gpp2/eap_aka_3gpp2_card.c
src/libcharon/plugins/eap_dynamic/eap_dynamic.c
src/libcharon/plugins/eap_gtc/eap_gtc.c
src/libcharon/plugins/eap_peap/eap_peap.c
src/libcharon/plugins/eap_peap/eap_peap_server.c
src/libcharon/plugins/eap_radius/eap_radius.c
src/libcharon/plugins/eap_radius/eap_radius_accounting.c
src/libcharon/plugins/eap_radius/eap_radius_dae.c
src/libcharon/plugins/eap_radius/eap_radius_forward.c
src/libcharon/plugins/eap_radius/eap_radius_plugin.c
src/libcharon/plugins/eap_radius/eap_radius_xauth.c
src/libcharon/plugins/eap_sim/eap_sim_server.c
src/libcharon/plugins/eap_simaka_sql/eap_simaka_sql_plugin.c
src/libcharon/plugins/eap_tls/eap_tls.c
src/libcharon/plugins/eap_tnc/eap_tnc.c
src/libcharon/plugins/eap_ttls/eap_ttls.c
src/libcharon/plugins/eap_ttls/eap_ttls_server.c
src/libcharon/plugins/error_notify/error_notify_socket.c
src/libcharon/plugins/ha/ha_attribute.c
src/libcharon/plugins/ha/ha_plugin.c
src/libcharon/plugins/ha/ha_segments.c
src/libcharon/plugins/ipseckey/ipseckey_plugin.c
src/libcharon/plugins/kernel_libipsec/kernel_libipsec_plugin.c
src/libcharon/plugins/led/led_listener.c
src/libcharon/plugins/load_tester/load_tester_config.c
src/libcharon/plugins/load_tester/load_tester_control.c
src/libcharon/plugins/load_tester/load_tester_creds.c
src/libcharon/plugins/load_tester/load_tester_listener.c
src/libcharon/plugins/load_tester/load_tester_plugin.c
src/libcharon/plugins/lookip/lookip_socket.c
src/libcharon/plugins/radattr/radattr_listener.c
src/libcharon/plugins/socket_default/socket_default_socket.c
src/libcharon/plugins/socket_dynamic/socket_dynamic_socket.c
src/libcharon/plugins/sql/sql_logger.c
src/libcharon/plugins/sql/sql_plugin.c
src/libcharon/plugins/stroke/stroke_control.c
src/libcharon/plugins/stroke/stroke_cred.c
src/libcharon/plugins/stroke/stroke_socket.c
src/libcharon/plugins/systime_fix/systime_fix_plugin.c
src/libcharon/plugins/tnc_ifmap/tnc_ifmap_listener.c
src/libcharon/plugins/tnc_ifmap/tnc_ifmap_soap.c
src/libcharon/plugins/tnc_pdp/tnc_pdp.c
src/libcharon/plugins/tnc_pdp/tnc_pdp_connections.c
src/libcharon/plugins/updown/updown_plugin.c
src/libcharon/plugins/whitelist/whitelist_control.c
src/libcharon/plugins/whitelist/whitelist_listener.c
src/libcharon/plugins/xauth_eap/xauth_eap.c
src/libcharon/plugins/xauth_pam/xauth_pam.c
src/libcharon/plugins/xauth_pam/xauth_pam_listener.c
src/libcharon/plugins/xauth_pam/xauth_pam_plugin.c
src/libcharon/sa/ike_sa.c
src/libcharon/sa/ike_sa_manager.c
src/libcharon/sa/ikev1/task_manager_v1.c
src/libcharon/sa/ikev1/tasks/aggressive_mode.c
src/libcharon/sa/ikev1/tasks/isakmp_vendor.c
src/libcharon/sa/ikev1/tasks/quick_mode.c
src/libcharon/sa/ikev2/task_manager_v2.c
src/libcharon/sa/ikev2/tasks/child_create.c
src/libcharon/sa/ikev2/tasks/ike_auth.c
src/libcharon/sa/ikev2/tasks/ike_cert_pre.c
src/libcharon/sa/ikev2/tasks/ike_vendor.c

index 5e3ae72..682b0ee 100644 (file)
@@ -181,7 +181,7 @@ static void handle_syslog_identifier(private_daemon_t *this)
        char *identifier;
 
        identifier = lib->settings->get_str(lib->settings, "%s.syslog.identifier",
-                                                                               NULL, charon->name);
+                                                                               NULL, lib->ns);
        if (identifier)
        {       /* set identifier, which is prepended to each log line */
                if (!this->syslog_identifier ||
@@ -292,15 +292,15 @@ static void load_sys_logger(private_daemon_t *this, char *facility,
        sys_logger = add_sys_logger(this, facility, current_loggers);
        sys_logger->set_options(sys_logger,
                                lib->settings->get_bool(lib->settings, "%s.syslog.%s.ike_name",
-                                                                               FALSE, charon->name, facility));
+                                                                               FALSE, lib->ns, facility));
 
        def = lib->settings->get_int(lib->settings, "%s.syslog.%s.default", 1,
-                                                                charon->name, facility);
+                                                                lib->ns, facility);
        for (group = 0; group < DBG_MAX; group++)
        {
                sys_logger->set_level(sys_logger, group,
                                lib->settings->get_int(lib->settings, "%s.syslog.%s.%N", def,
-                                                       charon->name, facility, debug_lower_names, group));
+                                                       lib->ns, facility, debug_lower_names, group));
        }
        charon->bus->add_logger(charon->bus, &sys_logger->logger);
 }
@@ -318,25 +318,25 @@ static void load_file_logger(private_daemon_t *this, char *filename,
        char *time_format;
 
        time_format = lib->settings->get_str(lib->settings,
-                                       "%s.filelog.%s.time_format", NULL, charon->name, filename);
+                                               "%s.filelog.%s.time_format", NULL, lib->ns, filename);
        ike_name = lib->settings->get_bool(lib->settings,
-                                       "%s.filelog.%s.ike_name", FALSE, charon->name, filename);
+                                               "%s.filelog.%s.ike_name", FALSE, lib->ns, filename);
        flush_line = lib->settings->get_bool(lib->settings,
-                                       "%s.filelog.%s.flush_line", FALSE, charon->name, filename);
+                                               "%s.filelog.%s.flush_line", FALSE, lib->ns, filename);
        append = lib->settings->get_bool(lib->settings,
-                                       "%s.filelog.%s.append", TRUE, charon->name, filename);
+                                               "%s.filelog.%s.append", TRUE, lib->ns, filename);
 
        file_logger = add_file_logger(this, filename, current_loggers);
        file_logger->set_options(file_logger, time_format, ike_name);
        file_logger->open(file_logger, flush_line, append);
 
        def = lib->settings->get_int(lib->settings, "%s.filelog.%s.default", 1,
-                                                                charon->name, filename);
+                                                                lib->ns, filename);
        for (group = 0; group < DBG_MAX; group++)
        {
                file_logger->set_level(file_logger, group,
                                lib->settings->get_int(lib->settings, "%s.filelog.%s.%N", def,
-                                                       charon->name, filename, debug_lower_names, group));
+                                                       lib->ns, filename, debug_lower_names, group));
        }
        charon->bus->add_logger(charon->bus, &file_logger->logger);
 }
@@ -353,7 +353,7 @@ METHOD(daemon_t, load_loggers, void,
        current_loggers = this->loggers;
        this->loggers = linked_list_create();
        enumerator = lib->settings->create_section_enumerator(lib->settings,
-                                                                                                       "%s.syslog", charon->name);
+                                                                                                               "%s.syslog", lib->ns);
        while (enumerator->enumerate(enumerator, &target))
        {
                load_sys_logger(this, target, current_loggers);
@@ -361,7 +361,7 @@ METHOD(daemon_t, load_loggers, void,
        enumerator->destroy(enumerator);
 
        enumerator = lib->settings->create_section_enumerator(lib->settings,
-                                                                                                       "%s.filelog", charon->name);
+                                                                                                               "%s.filelog", lib->ns);
        while (enumerator->enumerate(enumerator, &target))
        {
                load_file_logger(this, target, current_loggers);
@@ -483,7 +483,7 @@ METHOD(daemon_t, start, void,
        /* start the engine, go multithreaded */
        lib->processor->set_threads(lib->processor,
                                                lib->settings->get_int(lib->settings, "%s.threads",
-                                                                                          DEFAULT_THREADS, charon->name));
+                                                                                          DEFAULT_THREADS, lib->ns));
 }
 
 
@@ -525,7 +525,7 @@ METHOD(daemon_t, initialize, bool,
                                PLUGIN_DEPENDS(RNG, RNG_STRONG),
                                PLUGIN_DEPENDS(CUSTOM, "socket"),
        };
-       lib->plugins->add_static_features(lib->plugins, charon->name, features,
+       lib->plugins->add_static_features(lib->plugins, lib->ns, features,
                                                                          countof(features), TRUE);
 
        /* load plugins, further infrastructure may need it */
index 2209f19..8dfb47b 100644 (file)
@@ -633,27 +633,27 @@ receiver_t *receiver_create()
        );
 
        if (lib->settings->get_bool(lib->settings,
-                               "%s.dos_protection", TRUE, charon->name))
+                                                               "%s.dos_protection", TRUE, lib->ns))
        {
                this->cookie_threshold = lib->settings->get_int(lib->settings,
-                               "%s.cookie_threshold", COOKIE_THRESHOLD_DEFAULT, charon->name);
+                                       "%s.cookie_threshold", COOKIE_THRESHOLD_DEFAULT, lib->ns);
                this->block_threshold = lib->settings->get_int(lib->settings,
-                               "%s.block_threshold", BLOCK_THRESHOLD_DEFAULT, charon->name);
+                                       "%s.block_threshold", BLOCK_THRESHOLD_DEFAULT, lib->ns);
        }
        this->init_limit_job_load = lib->settings->get_int(lib->settings,
-                               "%s.init_limit_job_load", 0, charon->name);
+                                       "%s.init_limit_job_load", 0, lib->ns);
        this->init_limit_half_open = lib->settings->get_int(lib->settings,
-                               "%s.init_limit_half_open", 0, charon->name);
+                                       "%s.init_limit_half_open", 0, lib->ns);
        this->receive_delay = lib->settings->get_int(lib->settings,
-                               "%s.receive_delay", 0, charon->name);
+                                       "%s.receive_delay", 0, lib->ns);
        this->receive_delay_type = lib->settings->get_int(lib->settings,
-                               "%s.receive_delay_type", 0, charon->name),
+                                       "%s.receive_delay_type", 0, lib->ns),
        this->receive_delay_request = lib->settings->get_bool(lib->settings,
-                               "%s.receive_delay_request", TRUE, charon->name),
+                                       "%s.receive_delay_request", TRUE, lib->ns),
        this->receive_delay_response = lib->settings->get_bool(lib->settings,
-                               "%s.receive_delay_response", TRUE, charon->name),
+                                       "%s.receive_delay_response", TRUE, lib->ns),
        this->initiator_only = lib->settings->get_bool(lib->settings,
-                               "%s.initiator_only", FALSE, charon->name),
+                                       "%s.initiator_only", FALSE, lib->ns),
 
        this->hasher = lib->crypto->create_hasher(lib->crypto, HASH_SHA1);
        if (!this->hasher)
index dd8efc1..bed4f35 100644 (file)
@@ -204,13 +204,13 @@ sender_t * sender_create()
                .got = condvar_create(CONDVAR_TYPE_DEFAULT),
                .sent = condvar_create(CONDVAR_TYPE_DEFAULT),
                .send_delay = lib->settings->get_int(lib->settings,
-                                                               "%s.send_delay", 0, charon->name),
+                                                                       "%s.send_delay", 0, lib->ns),
                .send_delay_type = lib->settings->get_int(lib->settings,
-                                                               "%s.send_delay_type", 0, charon->name),
+                                                                       "%s.send_delay_type", 0, lib->ns),
                .send_delay_request = lib->settings->get_bool(lib->settings,
-                                                               "%s.send_delay_request", TRUE, charon->name),
+                                                                       "%s.send_delay_request", TRUE, lib->ns),
                .send_delay_response = lib->settings->get_bool(lib->settings,
-                                                               "%s.send_delay_response", TRUE, charon->name),
+                                                                       "%s.send_delay_response", TRUE, lib->ns),
        );
 
        lib->processor->queue_job(lib->processor,
index 48bcaa5..99eb66b 100644 (file)
@@ -100,7 +100,7 @@ android_log_logger_t *android_log_logger_create()
                },
                .mutex = mutex_create(MUTEX_TYPE_DEFAULT),
                .level = lib->settings->get_int(lib->settings,
-                                                       "%s.plugins.android_log.loglevel", 1, charon->name),
+                                                               "%s.plugins.android_log.loglevel", 1, lib->ns),
        );
 
        return &this->public;
index f1205cf..4aa8490 100644 (file)
@@ -430,31 +430,31 @@ certexpire_export_t *certexpire_export_create()
                                                                   (hashtable_equals_t)equals, 32),
                .mutex = mutex_create(MUTEX_TYPE_DEFAULT),
                .local_path = lib->settings->get_str(lib->settings,
-                                                               "%s.plugins.certexpire.csv.local",
-                                                               NULL, charon->name),
+                                                                       "%s.plugins.certexpire.csv.local",
+                                                                       NULL, lib->ns),
                .remote_path = lib->settings->get_str(lib->settings,
-                                                               "%s.plugins.certexpire.csv.remote",
-                                                               NULL, charon->name),
+                                                                       "%s.plugins.certexpire.csv.remote",
+                                                                       NULL, lib->ns),
                .separator = lib->settings->get_str(lib->settings,
-                                                               "%s.plugins.certexpire.csv.separator",
-                                                               ",", charon->name),
+                                                                       "%s.plugins.certexpire.csv.separator",
+                                                                       ",", lib->ns),
                .format = lib->settings->get_str(lib->settings,
-                                                               "%s.plugins.certexpire.csv.format",
-                                                               "%d:%m:%Y", charon->name),
+                                                                       "%s.plugins.certexpire.csv.format",
+                                                                       "%d:%m:%Y", lib->ns),
                .fixed_fields = lib->settings->get_bool(lib->settings,
-                                                               "%s.plugins.certexpire.csv.fixed_fields",
-                                                               TRUE, charon->name),
+                                                                       "%s.plugins.certexpire.csv.fixed_fields",
+                                                                       TRUE, lib->ns),
                .empty_string = lib->settings->get_str(lib->settings,
-                                                               "%s.plugins.certexpire.csv.empty_string",
-                                                               "", charon->name),
+                                                                       "%s.plugins.certexpire.csv.empty_string",
+                                                                       "", lib->ns),
                .force = lib->settings->get_bool(lib->settings,
-                                                               "%s.plugins.certexpire.csv.force",
-                                                               TRUE, charon->name),
+                                                                       "%s.plugins.certexpire.csv.force",
+                                                                       TRUE, lib->ns),
        );
 
        cron = lib->settings->get_str(lib->settings,
                                                                  "%s.plugins.certexpire.csv.cron",
-                                                                 NULL, charon->name);
+                                                                 NULL, lib->ns);
        if (cron)
        {
                this->cron = certexpire_cron_create(cron,
index 958bd2b..fc35462 100644 (file)
@@ -214,12 +214,11 @@ coupling_validator_t *coupling_validator_create()
                .mutex = mutex_create(MUTEX_TYPE_DEFAULT),
                .max_couplings = lib->settings->get_int(lib->settings,
                                                                                                "%s.plugins.coupling.max", 1,
-                                                                                               charon->name),
+                                                                                               lib->ns),
        );
 
        hash = lib->settings->get_str(lib->settings,
-                                                                 "%s.plugins.coupling.hash", "sha1",
-                                                                 charon->name);
+                                                                 "%s.plugins.coupling.hash", "sha1", lib->ns);
        this->hasher = lib->crypto->create_hasher(lib->crypto,
                                                        enum_from_name(hash_algorithm_short_names, hash));
        if (!this->hasher)
@@ -230,8 +229,7 @@ coupling_validator_t *coupling_validator_create()
        }
 
        path = lib->settings->get_str(lib->settings,
-                                                                 "%s.plugins.coupling.file", NULL,
-                                                                 charon->name);
+                                                                 "%s.plugins.coupling.file", NULL, lib->ns);
        if (!path)
        {
                DBG1(DBG_CFG, "coupling file path unspecified");
index ac594c8..b8c1b40 100644 (file)
@@ -734,15 +734,15 @@ dhcp_socket_t *dhcp_socket_create()
        }
        this->identity_lease = lib->settings->get_bool(lib->settings,
                                                                "%s.plugins.dhcp.identity_lease", FALSE,
-                                                               charon->name);
+                                                               lib->ns);
        this->force_dst = lib->settings->get_str(lib->settings,
                                                                "%s.plugins.dhcp.force_server_address", FALSE,
-                                                               charon->name);
+                                                               lib->ns);
        this->dst = host_create_from_string(lib->settings->get_str(lib->settings,
                                                                "%s.plugins.dhcp.server", "255.255.255.255",
-                                                               charon->name), DHCP_SERVER_PORT);
+                                                               lib->ns), DHCP_SERVER_PORT);
        iface = lib->settings->get_str(lib->settings, "%s.plugins.dhcp.interface",
-                       NULL, charon->name);
+                                                                  NULL, lib->ns);
        if (!this->dst)
        {
                DBG1(DBG_CFG, "configured DHCP server address invalid");
index 713bc9e..1b93480 100644 (file)
@@ -74,7 +74,7 @@ METHOD(plugin_t, reload, bool,
        private_dnscert_plugin_t *this)
 {
        bool enabled = lib->settings->get_bool(lib->settings,
-                                                       "%s.plugins.dnscert.enable", FALSE, charon->name);
+                                                               "%s.plugins.dnscert.enable", FALSE, lib->ns);
 
        if (enabled != this->enabled)
        {
index e3a4e17..f77b48b 100644 (file)
@@ -130,7 +130,7 @@ duplicheck_notify_t *duplicheck_notify_create()
 
        uri = lib->settings->get_str(lib->settings,
                                        "%s.plugins.duplicheck.socket", "unix://" DUPLICHECK_SOCKET,
-                                       charon->name);
+                                       lib->ns);
        this->service = lib->streams->create_service(lib->streams, uri, 3);
        if (!this->service)
        {
index 4d018db..689c795 100644 (file)
@@ -93,7 +93,7 @@ plugin_t *duplicheck_plugin_create()
        private_duplicheck_plugin_t *this;
 
        if (!lib->settings->get_bool(lib->settings,
-                                                       "%s.plugins.duplicheck.enable", TRUE, charon->name))
+                                                                "%s.plugins.duplicheck.enable", TRUE, lib->ns))
        {
                return NULL;
        }
index b760838..eba7af8 100644 (file)
@@ -721,7 +721,7 @@ eap_aka_server_t *eap_aka_server_create(identification_t *server,
        this->permanent = peer->clone(peer);
        this->use_reauth = this->use_pseudonym = this->use_permanent =
                lib->settings->get_bool(lib->settings,
-                                       "%s.plugins.eap-aka.request_identity", TRUE, charon->name);
+                                               "%s.plugins.eap-aka.request_identity", TRUE, lib->ns);
 
        /* generate a non-zero identifier */
        do {
index 1bfc39e..a71dae7 100644 (file)
@@ -177,7 +177,7 @@ eap_aka_3gpp2_card_t *eap_aka_3gpp2_card_create(eap_aka_3gpp2_functions_t *f)
 #else /* !SEQ_CHECK */
                                                                        FALSE,
 #endif /* SEQ_CHECK */
-                                                                       charon->name),
+                                                                       lib->ns),
        );
 
        eap_aka_3gpp2_get_sqn(this->sqn, 0);
index d24cbd1..3216446 100644 (file)
@@ -377,14 +377,14 @@ eap_dynamic_t *eap_dynamic_create(identification_t *server,
                .server = server->clone(server),
                .types = linked_list_create(),
                .prefer_peer = lib->settings->get_bool(lib->settings,
-                                       "%s.plugins.eap-dynamic.prefer_peer", FALSE, charon->name),
+                                               "%s.plugins.eap-dynamic.prefer_peer", FALSE, lib->ns),
        );
 
        /* get all supported EAP methods */
        get_supported_eap_types(this);
        /* move preferred methods to the front */
        preferred = lib->settings->get_str(lib->settings,
-                                       "%s.plugins.eap-dynamic.preferred", NULL, charon->name);
+                                               "%s.plugins.eap-dynamic.preferred", NULL, lib->ns);
        if (preferred)
        {
                handle_preferred_eap_types(this, preferred);
index 2f64f32..e751b51 100644 (file)
@@ -149,7 +149,7 @@ METHOD(eap_method_t, process_server, status_t,
        /* get XAuth backend to use for credential verification. Default to PAM
         * to support legacy EAP-GTC configurations */
        backend = lib->settings->get_str(lib->settings,
-                                                       "%s.plugins.eap-gtc.backend", "pam", charon->name);
+                                                               "%s.plugins.eap-gtc.backend", "pam", lib->ns);
        xauth = charon->xauth->create_instance(charon->xauth, backend, XAUTH_SERVER,
                                                                                   this->server, this->peer);
        if (!xauth)
index 8aba703..c24dd57 100644 (file)
@@ -157,18 +157,18 @@ static eap_peap_t *eap_peap_create(private_eap_peap_t * this,
 
        if (is_server && !lib->settings->get_bool(lib->settings,
                                                                "%s.plugins.eap-peap.request_peer_auth", FALSE,
-                                                               charon->name))
+                                                               lib->ns))
        {
                peer = NULL;
        }
        frag_size = lib->settings->get_int(lib->settings,
                                        "%s.plugins.eap-peap.fragment_size", MAX_FRAGMENT_LEN,
-                                       charon->name);
+                                       lib->ns);
        max_msg_count = lib->settings->get_int(lib->settings,
                                        "%s.plugins.eap-peap.max_message_count", MAX_MESSAGE_COUNT,
-                                       charon->name);
+                                       lib->ns);
        include_length = lib->settings->get_bool(lib->settings,
-                                       "%s.plugins.eap-peap.include_length", FALSE, charon->name);
+                                       "%s.plugins.eap-peap.include_length", FALSE, lib->ns);
        tls = tls_create(is_server, server, peer, TLS_PURPOSE_EAP_PEAP,
                                         application, NULL);
        this->tls_eap = tls_eap_create(EAP_PEAP, tls, frag_size, max_msg_count,
index 5237cb6..33b01e9 100644 (file)
@@ -92,7 +92,7 @@ static status_t start_phase2_auth(private_eap_peap_server_t *this)
 
        eap_type_str = lib->settings->get_str(lib->settings,
                                                        "%s.plugins.eap-peap.phase2_method", "mschapv2",
-                                                       charon->name);
+                                                       lib->ns);
        type = eap_type_from_string(eap_type_str);
        if (type == 0)
        {
@@ -129,7 +129,7 @@ static status_t start_phase2_auth(private_eap_peap_server_t *this)
 static status_t start_phase2_tnc(private_eap_peap_server_t *this)
 {
        if (this->start_phase2_tnc && lib->settings->get_bool(lib->settings,
-                                               "%s.plugins.eap-peap.phase2_tnc", FALSE, charon->name))
+                                               "%s.plugins.eap-peap.phase2_tnc", FALSE, lib->ns))
        {
                DBG1(DBG_IKE, "phase2 method %N selected", eap_type_names, EAP_TNC);
                this->ph2_method = charon->eap->create_instance(charon->eap, EAP_TNC,
@@ -274,7 +274,7 @@ METHOD(tls_application_t, process, status_t,
 
                /* Start Phase 2 of EAP-PEAP authentication */
                if (lib->settings->get_bool(lib->settings,
-                               "%s.plugins.eap-peap.request_peer_auth", FALSE, charon->name))
+                                       "%s.plugins.eap-peap.request_peer_auth", FALSE, lib->ns))
                {
                        return start_phase2_tnc(this);
                }
@@ -425,7 +425,7 @@ eap_peap_server_t *eap_peap_server_create(identification_t *server,
                .start_phase2_tnc = TRUE,
                .start_phase2_id = lib->settings->get_bool(lib->settings,
                                                                                "%s.plugins.eap-peap.phase2_piggyback",
-                                                                               FALSE, charon->name),
+                                                                               FALSE, lib->ns),
                .phase2_result = EAP_FAILURE,
                .avp = eap_peap_avp_create(TRUE),
        );
index 6087a52..6719497 100644 (file)
@@ -188,7 +188,7 @@ void eap_radius_build_attributes(radius_message_t *request)
                }
                if (lib->settings->get_bool(lib->settings,
                                                                        "%s.plugins.eap-radius.station_id_with_port",
-                                                                       TRUE, charon->name))
+                                                                       TRUE, lib->ns))
                {
                        station_id_fmt = "%#H";
                }
@@ -573,12 +573,12 @@ static void process_cfg_attributes(radius_message_t *msg)
 void eap_radius_process_attributes(radius_message_t *message)
 {
        if (lib->settings->get_bool(lib->settings,
-                                       "%s.plugins.eap-radius.class_group", FALSE, charon->name))
+                                               "%s.plugins.eap-radius.class_group", FALSE, lib->ns))
        {
                process_class(message);
        }
        if (lib->settings->get_bool(lib->settings,
-                                       "%s.plugins.eap-radius.filter_id", FALSE, charon->name))
+                                               "%s.plugins.eap-radius.filter_id", FALSE, lib->ns))
        {
                process_filter_id(message);
        }
@@ -720,10 +720,10 @@ eap_radius_t *eap_radius_create(identification_t *server, identification_t *peer
                .type = EAP_RADIUS,
                .eap_start = lib->settings->get_bool(lib->settings,
                                                                        "%s.plugins.eap-radius.eap_start", FALSE,
-                                                                       charon->name),
+                                                                       lib->ns),
                .id_prefix = lib->settings->get_str(lib->settings,
                                                                        "%s.plugins.eap-radius.id_prefix", "",
-                                                                       charon->name),
+                                                                       lib->ns),
        );
        this->client = eap_radius_create_client();
        if (!this->client)
index afb661e..8c780e7 100644 (file)
@@ -712,7 +712,7 @@ eap_radius_accounting_t *eap_radius_accounting_create()
                .mutex = mutex_create(MUTEX_TYPE_DEFAULT),
        );
        if (lib->settings->get_bool(lib->settings,
-                       "%s.plugins.eap-radius.station_id_with_port", TRUE, charon->name))
+                               "%s.plugins.eap-radius.station_id_with_port", TRUE, lib->ns))
        {
                this->station_id_fmt = "%#H";
        }
@@ -721,14 +721,14 @@ eap_radius_accounting_t *eap_radius_accounting_create()
                this->station_id_fmt = "%H";
        }
        if (lib->settings->get_bool(lib->settings,
-                                       "%s.plugins.eap-radius.accounting", FALSE, charon->name))
+                                                       "%s.plugins.eap-radius.accounting", FALSE, lib->ns))
        {
                singleton = this;
                charon->bus->add_listener(charon->bus, &this->public.listener);
        }
        this->acct_req_vip = lib->settings->get_bool(lib->settings,
                                                        "%s.plugins.eap-radius.accounting_requires_vip",
-                                                       FALSE, charon->name);
+                                                       FALSE, lib->ns);
 
        return &this->public;
 }
index f22ddc5..a0bf99e 100644 (file)
@@ -452,11 +452,11 @@ static bool open_socket(private_eap_radius_dae_t *this)
 
        host = host_create_from_string(
                                lib->settings->get_str(lib->settings,
-                                               "%s.plugins.eap-radius.dae.listen", "0.0.0.0",
-                                               charon->name),
+                                                       "%s.plugins.eap-radius.dae.listen", "0.0.0.0",
+                                                       lib->ns),
                                lib->settings->get_int(lib->settings,
-                                               "%s.plugins.eap-radius.dae.port", RADIUS_DAE_PORT,
-                                               charon->name));
+                                                       "%s.plugins.eap-radius.dae.port", RADIUS_DAE_PORT,
+                                                       lib->ns));
        if (!host)
        {
                DBG1(DBG_CFG, "invalid RADIUS DAE listen address");
@@ -504,7 +504,7 @@ eap_radius_dae_t *eap_radius_dae_create(eap_radius_accounting_t *accounting)
                .secret = {
                        .ptr = lib->settings->get_str(lib->settings,
                                                                        "%s.plugins.eap-radius.dae.secret", NULL,
-                                                                       charon->name),
+                                                                       lib->ns),
                },
                .hasher = lib->crypto->create_hasher(lib->crypto, HASH_MD5),
                .signer = lib->crypto->create_signer(lib->crypto, AUTH_HMAC_MD5_128),
index 3e80e89..b873e1d 100644 (file)
@@ -438,10 +438,10 @@ eap_radius_forward_t *eap_radius_forward_create()
                },
                .from_attr = parse_selector(lib->settings->get_str(lib->settings,
                                                        "%s.plugins.eap-radius.forward.ike_to_radius", "",
-                                                       charon->name)),
+                                                       lib->ns)),
                .to_attr = parse_selector(lib->settings->get_str(lib->settings,
                                                        "%s.plugins.eap-radius.forward.radius_to_ike", "",
-                                                       charon->name)),
+                                                       lib->ns)),
                .from = hashtable_create((hashtable_hash_t)hash,
                                                (hashtable_equals_t)equals, 8),
                .to = hashtable_create((hashtable_hash_t)hash,
index 90a4ef6..1a48c07 100644 (file)
@@ -100,23 +100,23 @@ static void load_configs(private_eap_radius_plugin_t *this)
        int auth_port, acct_port, sockets, preference;
 
        address = lib->settings->get_str(lib->settings,
-                                       "%s.plugins.eap-radius.server", NULL, charon->name);
+                                                               "%s.plugins.eap-radius.server", NULL, lib->ns);
        if (address)
        {       /* legacy configuration */
                secret = lib->settings->get_str(lib->settings,
-                                       "%s.plugins.eap-radius.secret", NULL, charon->name);
+                                                               "%s.plugins.eap-radius.secret", NULL, lib->ns);
                if (!secret)
                {
                        DBG1(DBG_CFG, "no RADIUS secret defined");
                        return;
                }
                nas_identifier = lib->settings->get_str(lib->settings,
-                                       "%s.plugins.eap-radius.nas_identifier", "strongSwan",
-                                       charon->name);
+                                               "%s.plugins.eap-radius.nas_identifier", "strongSwan",
+                                               lib->ns);
                auth_port = lib->settings->get_int(lib->settings,
-                                       "%s.plugins.eap-radius.port", AUTH_PORT, charon->name);
+                                               "%s.plugins.eap-radius.port", AUTH_PORT, lib->ns);
                sockets = lib->settings->get_int(lib->settings,
-                                       "%s.plugins.eap-radius.sockets", 1, charon->name);
+                                               "%s.plugins.eap-radius.sockets", 1, lib->ns);
                config = radius_config_create(address, address, auth_port, ACCT_PORT,
                                                                          nas_identifier, secret, sockets, 0);
                if (!config)
@@ -129,12 +129,12 @@ static void load_configs(private_eap_radius_plugin_t *this)
        }
 
        enumerator = lib->settings->create_section_enumerator(lib->settings,
-                                                               "%s.plugins.eap-radius.servers", charon->name);
+                                                                       "%s.plugins.eap-radius.servers", lib->ns);
        while (enumerator->enumerate(enumerator, &section))
        {
                address = lib->settings->get_str(lib->settings,
                                                        "%s.plugins.eap-radius.servers.%s.address", NULL,
-                                                       charon->name, section);
+                                                       lib->ns, section);
                if (!address)
                {
                        DBG1(DBG_CFG, "RADIUS server '%s' misses address, skipped", section);
@@ -142,7 +142,7 @@ static void load_configs(private_eap_radius_plugin_t *this)
                }
                secret = lib->settings->get_str(lib->settings,
                                                        "%s.plugins.eap-radius.servers.%s.secret", NULL,
-                                                       charon->name, section);
+                                                       lib->ns, section);
                if (!secret)
                {
                        DBG1(DBG_CFG, "RADIUS server '%s' misses secret, skipped", section);
@@ -150,22 +150,22 @@ static void load_configs(private_eap_radius_plugin_t *this)
                }
                nas_identifier = lib->settings->get_str(lib->settings,
                                "%s.plugins.eap-radius.servers.%s.nas_identifier", "strongSwan",
-                               charon->name, section);
+                               lib->ns, section);
                auth_port = lib->settings->get_int(lib->settings,
                        "%s.plugins.eap-radius.servers.%s.auth_port",
                                lib->settings->get_int(lib->settings,
                                        "%s.plugins.eap-radius.servers.%s.port",
-                                       AUTH_PORT, charon->name, section),
-                       charon->name, section);
+                                       AUTH_PORT, lib->ns, section),
+                       lib->ns, section);
                acct_port = lib->settings->get_int(lib->settings,
                                "%s.plugins.eap-radius.servers.%s.acct_port", ACCT_PORT,
-                               charon->name, section);
+                               lib->ns, section);
                sockets = lib->settings->get_int(lib->settings,
                                "%s.plugins.eap-radius.servers.%s.sockets", 1,
-                               charon->name, section);
+                               lib->ns, section);
                preference = lib->settings->get_int(lib->settings,
                                "%s.plugins.eap-radius.servers.%s.preference", 0,
-                               charon->name, section);
+                               lib->ns, section);
                config = radius_config_create(section, address, auth_port, acct_port,
                                                                nas_identifier, secret, sockets, preference);
                if (!config)
@@ -203,7 +203,7 @@ static bool plugin_cb(private_eap_radius_plugin_t *this,
                load_configs(this);
 
                if (lib->settings->get_bool(lib->settings,
-                                       "%s.plugins.eap-radius.dae.enable", FALSE, charon->name))
+                                               "%s.plugins.eap-radius.dae.enable", FALSE, lib->ns))
                {
                        this->dae = eap_radius_dae_create(this->accounting);
                }
@@ -368,7 +368,7 @@ void eap_radius_handle_timeout(ike_sa_id_t *id)
 
        if (lib->settings->get_bool(lib->settings,
                                                                "%s.plugins.eap-radius.close_all_on_timeout",
-                                                               FALSE, charon->name))
+                                                               FALSE, lib->ns))
        {
                DBG1(DBG_CFG, "deleting all IKE_SAs after RADIUS timeout");
                lib->processor->queue_job(lib->processor,
index e66bbf3..d00f6bb 100644 (file)
@@ -256,7 +256,7 @@ static bool parse_rounds(private_eap_radius_xauth_t *this, char *profile)
        }
 
        enumerator = lib->settings->create_key_value_enumerator(lib->settings,
-                                       "%s.plugins.eap-radius.xauth.%s", charon->name, profile);
+                                                       "%s.plugins.eap-radius.xauth.%s", lib->ns, profile);
        while (enumerator->enumerate(enumerator, &type, &message))
        {
                bool invalid = TRUE;
index 334e2df..f22266b 100644 (file)
@@ -635,7 +635,7 @@ eap_sim_server_t *eap_sim_server_create(identification_t *server,
        this->use_reauth = this->use_pseudonym = this->use_permanent =
                lib->settings->get_bool(lib->settings,
                                                                "%s.plugins.eap-sim.request_identity", TRUE,
-                                                               charon->name);
+                                                               lib->ns);
 
        /* generate a non-zero identifier */
        do {
index 6bcc58e..1763218 100644 (file)
@@ -66,7 +66,7 @@ static bool load_db(private_eap_simaka_sql_t *this,
 
                uri = lib->settings->get_str(lib->settings,
                                                                         "%s.plugins.eap-simaka-sql.database", NULL,
-                                                                        charon->name);
+                                                                        lib->ns);
                if (!uri)
                {
                        DBG1(DBG_CFG, "eap-simaka-sql database URI missing");
@@ -80,7 +80,7 @@ static bool load_db(private_eap_simaka_sql_t *this,
                }
                remove_used = lib->settings->get_bool(lib->settings,
                                                                "%s.plugins.eap-simaka-sql.remove_used", FALSE,
-                                                               charon->name);
+                                                               lib->ns);
 
                this->provider = eap_simaka_sql_provider_create(this->db, remove_used);
                this->card = eap_simaka_sql_card_create(this->db, remove_used);
index 48e3875..dffbaf2 100644 (file)
@@ -145,12 +145,12 @@ static eap_tls_t *eap_tls_create(identification_t *server,
 
        frag_size = lib->settings->get_int(lib->settings,
                                        "%s.plugins.eap-tls.fragment_size", MAX_FRAGMENT_LEN,
-                                       charon->name);
+                                       lib->ns);
        max_msg_count = lib->settings->get_int(lib->settings,
                                        "%s.plugins.eap-tls.max_message_count", MAX_MESSAGE_COUNT,
-                                       charon->name);
+                                       lib->ns);
        include_length = lib->settings->get_bool(lib->settings,
-                                       "%s.plugins.eap-tls.include_length", TRUE, charon->name);
+                                       "%s.plugins.eap-tls.include_length", TRUE, lib->ns);
        tls = tls_create(is_server, server, peer, TLS_PURPOSE_EAP_TLS, NULL, NULL);
        this->tls_eap = tls_eap_create(EAP_TLS, tls, frag_size, max_msg_count,
                                                                                                 include_length);
index f9ab742..2147c04 100644 (file)
@@ -273,10 +273,10 @@ static eap_tnc_t *eap_tnc_create(identification_t *server,
        );
 
        max_msg_count = lib->settings->get_int(lib->settings,
-                                       "%s.plugins.eap-tnc.max_message_count",
-                                       EAP_TNC_MAX_MESSAGE_COUNT, charon->name);
+                                               "%s.plugins.eap-tnc.max_message_count",
+                                               EAP_TNC_MAX_MESSAGE_COUNT, lib->ns);
        protocol = lib->settings->get_str(lib->settings,
-                                       "%s.plugins.eap-tnc.protocol", "tnccs-1.1", charon->name);
+                                               "%s.plugins.eap-tnc.protocol", "tnccs-1.1", lib->ns);
        if (strcaseeq(protocol, "tnccs-2.0"))
        {
                type = TNCCS_2_0;
index ebd1c54..703cd3f 100644 (file)
@@ -147,18 +147,18 @@ static eap_ttls_t *eap_ttls_create(identification_t *server,
        );
        if (is_server && !lib->settings->get_bool(lib->settings,
                                                                "%s.plugins.eap-ttls.request_peer_auth", FALSE,
-                                                               charon->name))
+                                                               lib->ns))
        {
                peer = NULL;
        }
        frag_size = lib->settings->get_int(lib->settings,
                                        "%s.plugins.eap-ttls.fragment_size", MAX_FRAGMENT_LEN,
-                                       charon->name);
+                                       lib->ns);
        max_msg_count = lib->settings->get_int(lib->settings,
                                        "%s.plugins.eap-ttls.max_message_count", MAX_MESSAGE_COUNT,
-                                       charon->name);
+                                       lib->ns);
        include_length = lib->settings->get_bool(lib->settings,
-                                       "%s.plugins.eap-ttls.include_length", TRUE, charon->name);
+                                       "%s.plugins.eap-ttls.include_length", TRUE, lib->ns);
        tls = tls_create(is_server, server, peer, TLS_PURPOSE_EAP_TTLS,
                                         application, NULL);
        this->tls_eap = tls_eap_create(EAP_TTLS, tls, frag_size, max_msg_count,
index eef8d66..88c2b88 100644 (file)
@@ -80,7 +80,7 @@ static status_t start_phase2_auth(private_eap_ttls_server_t *this)
 
        eap_type_str = lib->settings->get_str(lib->settings,
                                                                        "%s.plugins.eap-ttls.phase2_method", "md5",
-                                                                       charon->name);
+                                                                       lib->ns);
        type = eap_type_from_string(eap_type_str);
        if (type == 0)
        {
@@ -115,7 +115,7 @@ static status_t start_phase2_tnc(private_eap_ttls_server_t *this,
        eap_inner_method_t *inner_method;
 
        if (this->start_phase2_tnc && lib->settings->get_bool(lib->settings,
-                                               "%s.plugins.eap-ttls.phase2_tnc", FALSE, charon->name))
+                                                       "%s.plugins.eap-ttls.phase2_tnc", FALSE, lib->ns))
        {
                DBG1(DBG_IKE, "phase2 method %N selected", eap_type_names, EAP_TNC);
                this->method = charon->eap->create_instance(charon->eap, EAP_TNC,
@@ -242,7 +242,7 @@ METHOD(tls_application_t, process, status_t,
 
                /* Start Phase 2 of EAP-TTLS authentication */
                if (lib->settings->get_bool(lib->settings,
-                               "%s.plugins.eap-ttls.request_peer_auth", FALSE, charon->name))
+                                       "%s.plugins.eap-ttls.request_peer_auth", FALSE, lib->ns))
                {
                        return start_phase2_tnc(this, EAP_TLS);
                }
@@ -301,7 +301,7 @@ METHOD(tls_application_t, build, status_t,
 
        if (this->method == NULL && this->start_phase2 &&
                lib->settings->get_bool(lib->settings,
-                               "%s.plugins.eap-ttls.phase2_piggyback", FALSE, charon->name))
+                                       "%s.plugins.eap-ttls.phase2_piggyback", FALSE, lib->ns))
        {
                /* generate an EAP Identity request which will be piggybacked right
                 * onto the TLS Finished message thus initiating EAP-TTLS phase2
index aafd0a4..959c4c6 100644 (file)
@@ -142,7 +142,7 @@ error_notify_socket_t *error_notify_socket_create()
 
        uri = lib->settings->get_str(lib->settings,
                                "%s.plugins.error-notify.socket", "unix://" ERROR_NOTIFY_SOCKET,
-                               charon->name);
+                               lib->ns);
        this->service = lib->streams->create_service(lib->streams, uri, 10);
        if (!this->service)
        {
index d26c383..dd55fae 100644 (file)
@@ -309,7 +309,7 @@ static void load_pools(private_ha_attribute_t *this)
        pool_t *pool;
 
        enumerator = lib->settings->create_key_value_enumerator(lib->settings,
-                                                                               "%s.plugins.ha.pools", charon->name);
+                                                                                               "%s.plugins.ha.pools", lib->ns);
        while (enumerator->enumerate(enumerator, &name, &net))
        {
                net = strdup(net);
index 5d4cc61..493cad5 100644 (file)
@@ -160,19 +160,19 @@ plugin_t *ha_plugin_create()
        bool fifo, monitor, resync;
 
        local = lib->settings->get_str(lib->settings,
-                                                       "%s.plugins.ha.local", NULL, charon->name);
+                                                               "%s.plugins.ha.local", NULL, lib->ns);
        remote = lib->settings->get_str(lib->settings,
-                                                       "%s.plugins.ha.remote", NULL, charon->name);
+                                                               "%s.plugins.ha.remote", NULL, lib->ns);
        secret = lib->settings->get_str(lib->settings,
-                                                       "%s.plugins.ha.secret", NULL, charon->name);
+                                                               "%s.plugins.ha.secret", NULL, lib->ns);
        fifo = lib->settings->get_bool(lib->settings,
-                                                       "%s.plugins.ha.fifo_interface", TRUE, charon->name);
+                                                               "%s.plugins.ha.fifo_interface", TRUE, lib->ns);
        monitor = lib->settings->get_bool(lib->settings,
-                                                       "%s.plugins.ha.monitor", TRUE, charon->name);
+                                                               "%s.plugins.ha.monitor", TRUE, lib->ns);
        resync = lib->settings->get_bool(lib->settings,
-                                                       "%s.plugins.ha.resync", TRUE, charon->name);
+                                                               "%s.plugins.ha.resync", TRUE, lib->ns);
        count = min(SEGMENTS_MAX, lib->settings->get_int(lib->settings,
-                                                       "%s.plugins.ha.segment_count", 1, charon->name));
+                                                               "%s.plugins.ha.segment_count", 1, lib->ns));
        if (!local || !remote)
        {
                DBG1(DBG_CFG, "HA config misses local/remote address");
index cab38c6..fc7d7a8 100644 (file)
@@ -470,12 +470,12 @@ ha_segments_t *ha_segments_create(ha_socket_t *socket, ha_kernel_t *kernel,
                .condvar = condvar_create(CONDVAR_TYPE_DEFAULT),
                .heartbeat_delay = lib->settings->get_int(lib->settings,
                                "%s.plugins.ha.heartbeat_delay", DEFAULT_HEARTBEAT_DELAY,
-                               charon->name),
+                               lib->ns),
                .heartbeat_timeout = lib->settings->get_int(lib->settings,
                                "%s.plugins.ha.heartbeat_timeout", DEFAULT_HEARTBEAT_TIMEOUT,
-                               charon->name),
+                               lib->ns),
                .autobalance = lib->settings->get_int(lib->settings,
-                               "%s.plugins.ha.autobalance", 0, charon->name),
+                               "%s.plugins.ha.autobalance", 0, lib->ns),
        );
 
        if (monitor)
index 9bc49ba..9f00abe 100644 (file)
@@ -53,7 +53,7 @@ METHOD(plugin_t, reload, bool,
        private_ipseckey_plugin_t *this)
 {
        bool enabled = lib->settings->get_bool(lib->settings,
-                                                       "%s.plugins.ipseckey.enable", FALSE, charon->name);
+                                                               "%s.plugins.ipseckey.enable", FALSE, lib->ns);
 
        if (enabled != this->enabled)
        {
index 56f5262..e3b688d 100644 (file)
@@ -144,6 +144,6 @@ plugin_t *kernel_libipsec_plugin_create()
 
        /* set TUN device as default to install VIPs */
        lib->settings->set_str(lib->settings, "%s.install_virtual_ip_on",
-                                                  this->tun->get_name(this->tun), charon->name);
+                                                  this->tun->get_name(this->tun), lib->ns);
        return &this->public.plugin;
 }
index be80bcd..3351f66 100644 (file)
@@ -230,12 +230,12 @@ led_listener_t *led_listener_create()
                },
                .mutex = mutex_create(MUTEX_TYPE_DEFAULT),
                .blink_time = lib->settings->get_int(lib->settings,
-                                                       "%s.plugins.led.blink_time", 50, charon->name),
+                                                               "%s.plugins.led.blink_time", 50, lib->ns),
        );
 
        this->activity = open_led(lib->settings->get_str(lib->settings,
-                                                       "%s.plugins.led.activity_led", NULL, charon->name),
-                                                       &this->activity_max);
+                                                               "%s.plugins.led.activity_led", NULL, lib->ns),
+                                                               &this->activity_max);
        set_led(this->activity, 0);
 
        return &this->public;
index e4e47c1..e133190 100644 (file)
@@ -236,11 +236,11 @@ static void load_addrs(private_load_tester_config_t *this)
        mem_pool_t *pool;
 
        this->keep = lib->settings->get_bool(lib->settings,
-                                               "%s.plugins.load-tester.addrs_keep", FALSE, charon->name);
+                                               "%s.plugins.load-tester.addrs_keep", FALSE, lib->ns);
        this->prefix = lib->settings->get_int(lib->settings,
-                                               "%s.plugins.load-tester.addrs_prefix", 16, charon->name);
+                                               "%s.plugins.load-tester.addrs_prefix", 16, lib->ns);
        enumerator = lib->settings->create_key_value_enumerator(lib->settings,
-                                               "%s.plugins.load-tester.addrs", charon->name);
+                                               "%s.plugins.load-tester.addrs", lib->ns);
        while (enumerator->enumerate(enumerator, &iface, &token))
        {
                tokens = enumerator_create_token(token, ",", " ");
@@ -917,72 +917,71 @@ load_tester_config_t *load_tester_config_create()
        );
 
        if (lib->settings->get_bool(lib->settings,
-                       "%s.plugins.load-tester.request_virtual_ip", FALSE, charon->name))
+                               "%s.plugins.load-tester.request_virtual_ip", FALSE, lib->ns))
        {
                this->vip = host_create_from_string("0.0.0.0", 0);
        }
        this->pool = lib->settings->get_str(lib->settings,
-                       "%s.plugins.load-tester.pool", NULL, charon->name);
+                                       "%s.plugins.load-tester.pool", NULL, lib->ns);
        this->initiator = lib->settings->get_str(lib->settings,
-                       "%s.plugins.load-tester.initiator", "0.0.0.0", charon->name);
+                                       "%s.plugins.load-tester.initiator", "0.0.0.0", lib->ns);
        this->responder = lib->settings->get_str(lib->settings,
-                       "%s.plugins.load-tester.responder", "127.0.0.1", charon->name);
+                                       "%s.plugins.load-tester.responder", "127.0.0.1", lib->ns);
 
        this->proposal = proposal_create_from_string(PROTO_IKE,
                                lib->settings->get_str(lib->settings,
                                        "%s.plugins.load-tester.proposal", "aes128-sha1-modp768",
-                                       charon->name));
+                                       lib->ns));
        if (!this->proposal)
        {       /* fallback */
                this->proposal = proposal_create_from_string(PROTO_IKE,
                                                                                                         "aes128-sha1-modp768");
        }
        this->esp = proposal_create_from_string(PROTO_ESP,
-                       lib->settings->get_str(lib->settings,
-                               "%s.plugins.load-tester.esp", "aes128-sha1",
-                               charon->name));
+                               lib->settings->get_str(lib->settings,
+                                       "%s.plugins.load-tester.esp", "aes128-sha1", lib->ns));
        if (!this->esp)
        {       /* fallback */
                this->esp = proposal_create_from_string(PROTO_ESP, "aes128-sha1");
        }
 
        this->ike_rekey = lib->settings->get_int(lib->settings,
-                       "%s.plugins.load-tester.ike_rekey", 0, charon->name);
+                               "%s.plugins.load-tester.ike_rekey", 0, lib->ns);
        this->child_rekey = lib->settings->get_int(lib->settings,
-                       "%s.plugins.load-tester.child_rekey", 600, charon->name);
+                               "%s.plugins.load-tester.child_rekey", 600, lib->ns);
        this->dpd_delay = lib->settings->get_int(lib->settings,
-                       "%s.plugins.load-tester.dpd_delay", 0, charon->name);
+                               "%s.plugins.load-tester.dpd_delay", 0, lib->ns);
        this->dpd_timeout = lib->settings->get_int(lib->settings,
-                       "%s.plugins.load-tester.dpd_timeout", 0, charon->name);
+                               "%s.plugins.load-tester.dpd_timeout", 0, lib->ns);
 
        this->initiator_auth = lib->settings->get_str(lib->settings,
-                       "%s.plugins.load-tester.initiator_auth", "pubkey", charon->name);
+                               "%s.plugins.load-tester.initiator_auth", "pubkey", lib->ns);
        this->responder_auth = lib->settings->get_str(lib->settings,
-                       "%s.plugins.load-tester.responder_auth", "pubkey", charon->name);
+                               "%s.plugins.load-tester.responder_auth", "pubkey", lib->ns);
        this->initiator_id = lib->settings->get_str(lib->settings,
-                       "%s.plugins.load-tester.initiator_id", NULL, charon->name);
+                               "%s.plugins.load-tester.initiator_id", NULL, lib->ns);
        this->initiator_match = lib->settings->get_str(lib->settings,
-                       "%s.plugins.load-tester.initiator_match", NULL, charon->name);
+                               "%s.plugins.load-tester.initiator_match", NULL, lib->ns);
        this->responder_id = lib->settings->get_str(lib->settings,
-                       "%s.plugins.load-tester.responder_id", NULL, charon->name);
+                               "%s.plugins.load-tester.responder_id", NULL, lib->ns);
 
        this->mode = lib->settings->get_str(lib->settings,
-                       "%s.plugins.load-tester.mode", NULL, charon->name);
+                               "%s.plugins.load-tester.mode", NULL, lib->ns);
        this->initiator_tsi = lib->settings->get_str(lib->settings,
-                       "%s.plugins.load-tester.initiator_tsi", NULL, charon->name);
+                               "%s.plugins.load-tester.initiator_tsi", NULL, lib->ns);
        this->responder_tsi =lib->settings->get_str(lib->settings,
-                       "%s.plugins.load-tester.responder_tsi",
-                       this->initiator_tsi, charon->name);
+                               "%s.plugins.load-tester.responder_tsi",
+                               this->initiator_tsi, lib->ns);
        this->initiator_tsr = lib->settings->get_str(lib->settings,
-                       "%s.plugins.load-tester.initiator_tsr", NULL, charon->name);
+                               "%s.plugins.load-tester.initiator_tsr", NULL, lib->ns);
        this->responder_tsr =lib->settings->get_str(lib->settings,
-                       "%s.plugins.load-tester.responder_tsr",
-                       this->initiator_tsr, charon->name);
+                               "%s.plugins.load-tester.responder_tsr",
+                               this->initiator_tsr, lib->ns);
 
        this->port = lib->settings->get_int(lib->settings,
-                       "%s.plugins.load-tester.dynamic_port", 0, charon->name);
+                               "%s.plugins.load-tester.dynamic_port", 0, lib->ns);
        this->version = lib->settings->get_int(lib->settings,
-                       "%s.plugins.load-tester.version", IKE_ANY, charon->name);
+                               "%s.plugins.load-tester.version", IKE_ANY, lib->ns);
 
        load_addrs(this);
 
index f9ec914..5f089f5 100644 (file)
@@ -302,7 +302,7 @@ load_tester_control_t *load_tester_control_create()
 
        uri = lib->settings->get_str(lib->settings,
                                "%s.plugins.load-tester.socket", "unix://" LOAD_TESTER_SOCKET,
-                               charon->name);
+                               lib->ns);
        this->service = lib->streams->create_service(lib->streams, uri, 10);
        if (this->service)
        {
index 028205b..f17d41f 100644 (file)
@@ -202,7 +202,7 @@ static private_key_t *load_issuer_key()
        char *path;
 
        path = lib->settings->get_str(lib->settings,
-                                       "%s.plugins.load-tester.issuer_key", NULL, charon->name);
+                                               "%s.plugins.load-tester.issuer_key", NULL, lib->ns);
        if (!path)
        {
                return lib->creds->create(lib->creds, CRED_PRIVATE_KEY, KEY_RSA,
@@ -222,7 +222,7 @@ static certificate_t *load_issuer_cert()
        char *path;
 
        path = lib->settings->get_str(lib->settings,
-                                       "%s.plugins.load-tester.issuer_cert", NULL, charon->name);
+                                               "%s.plugins.load-tester.issuer_cert", NULL, lib->ns);
        if (!path)
        {
                return lib->creds->create(lib->creds, CRED_CERTIFICATE, CERT_X509,
@@ -246,7 +246,7 @@ static void load_ca_certs(private_load_tester_creds_t *this)
        char *path;
 
        path = lib->settings->get_str(lib->settings,
-                                               "%s.plugins.load-tester.ca_dir", NULL, charon->name);
+                                                       "%s.plugins.load-tester.ca_dir", NULL, lib->ns);
        if (path)
        {
                enumerator = enumerator_create_directory(path);
@@ -445,11 +445,11 @@ load_tester_creds_t *load_tester_creds_create()
        char *pwd, *psk, *digest;
 
        psk = lib->settings->get_str(lib->settings,
-                       "%s.plugins.load-tester.preshared_key", default_psk, charon->name);
+                               "%s.plugins.load-tester.preshared_key", default_psk, lib->ns);
        pwd = lib->settings->get_str(lib->settings,
-                       "%s.plugins.load-tester.eap_password", default_pwd, charon->name);
+                               "%s.plugins.load-tester.eap_password", default_pwd, lib->ns);
        digest = lib->settings->get_str(lib->settings,
-                       "%s.plugins.load-tester.digest", "sha1", charon->name);
+                               "%s.plugins.load-tester.digest", "sha1", lib->ns);
 
        INIT(this,
                .public = {
index 7e832dd..068020e 100644 (file)
@@ -126,7 +126,7 @@ load_tester_listener_t *load_tester_listener_create(u_int shutdown_on,
                },
                .delete_after_established = lib->settings->get_bool(lib->settings,
                                        "%s.plugins.load-tester.delete_after_established", FALSE,
-                                       charon->name),
+                                       lib->ns),
                .shutdown_on = shutdown_on,
                .config = config,
        );
index 03557a2..e684f22 100644 (file)
@@ -193,7 +193,7 @@ static bool register_load_tester(private_load_tester_plugin_t *this,
                lib->credmgr->add_set(lib->credmgr, &this->creds->credential_set);
 
                if (lib->settings->get_bool(lib->settings,
-                               "%s.plugins.load-tester.shutdown_when_complete", 0, charon->name))
+                               "%s.plugins.load-tester.shutdown_when_complete", 0, lib->ns))
                {
                        shutdown_on = this->iterations * this->initiators;
                }
@@ -262,8 +262,8 @@ plugin_t *load_tester_plugin_create()
 {
        private_load_tester_plugin_t *this;
 
-       if (!lib->settings->get_bool(lib->settings,
-                                               "%s.plugins.load-tester.enable", FALSE, charon->name))
+       if (!lib->settings->get_bool(lib->settings, "%s.plugins.load-tester.enable",
+                                                                FALSE, lib->ns))
        {
                DBG1(DBG_CFG, "disabling load-tester plugin, not configured");
                return NULL;
@@ -279,19 +279,19 @@ plugin_t *load_tester_plugin_create()
                        },
                },
                .delay = lib->settings->get_int(lib->settings,
-                                               "%s.plugins.load-tester.delay", 0, charon->name),
+                                                       "%s.plugins.load-tester.delay", 0, lib->ns),
                .iterations = lib->settings->get_int(lib->settings,
-                                               "%s.plugins.load-tester.iterations", 1, charon->name),
+                                                       "%s.plugins.load-tester.iterations", 1, lib->ns),
                .initiators = lib->settings->get_int(lib->settings,
-                                               "%s.plugins.load-tester.initiators", 0, charon->name),
+                                                       "%s.plugins.load-tester.initiators", 0, lib->ns),
                .init_limit = lib->settings->get_int(lib->settings,
-                                               "%s.plugins.load-tester.init_limit", 0, charon->name),
+                                                       "%s.plugins.load-tester.init_limit", 0, lib->ns),
                .mutex = mutex_create(MUTEX_TYPE_DEFAULT),
                .condvar = condvar_create(CONDVAR_TYPE_DEFAULT),
        );
 
        if (lib->settings->get_bool(lib->settings,
-                       "%s.plugins.load-tester.fake_kernel", FALSE, charon->name))
+                       "%s.plugins.load-tester.fake_kernel", FALSE, lib->ns))
        {
                hydra->kernel_interface->add_ipsec_interface(hydra->kernel_interface,
                                                (kernel_ipsec_constructor_t)load_tester_ipsec_create);
index d25573b..a39eb88 100644 (file)
@@ -393,8 +393,8 @@ lookip_socket_t *lookip_socket_create(lookip_listener_t *listener)
        );
 
        uri = lib->settings->get_str(lib->settings,
-                               "%s.plugins.lookip.socket", "unix://" LOOKIP_SOCKET,
-                               charon->name);
+                                                       "%s.plugins.lookip.socket", "unix://" LOOKIP_SOCKET,
+                                                       lib->ns);
        this->service = lib->streams->create_service(lib->streams, uri, 10);
        if (!this->service)
        {
index 3ce38ed..aca83aa 100644 (file)
@@ -180,9 +180,9 @@ radattr_listener_t *radattr_listener_create()
                        .destroy = _destroy,
                },
                .dir = lib->settings->get_str(lib->settings,
-                                                       "%s.plugins.radattr.dir", NULL, charon->name),
+                                                               "%s.plugins.radattr.dir", NULL, lib->ns),
                .mid = lib->settings->get_int(lib->settings,
-                                                       "%s.plugins.radattr.message_id", -1, charon->name),
+                                                               "%s.plugins.radattr.message_id", -1, lib->ns),
        );
 
        return &this->public;
index ea976df..081d3ef 100644 (file)
@@ -617,7 +617,7 @@ static int open_socket(private_socket_default_socket_t *this,
                mark_t mark;
 
                fwmark = lib->settings->get_str(lib->settings,
-                                               "%s.plugins.socket-default.fwmark", NULL, charon->name);
+                                                       "%s.plugins.socket-default.fwmark", NULL, lib->ns);
                if (fwmark && mark_from_string(fwmark, &mark))
                {
                        if (setsockopt(skt, SOL_SOCKET, SO_MARK, &mark.value,
@@ -657,10 +657,10 @@ static bool use_family(int family)
        {
                case AF_INET:
                        return lib->settings->get_bool(lib->settings,
-                                       "%s.plugins.socket-default.use_ipv4", TRUE, charon->name);
+                                               "%s.plugins.socket-default.use_ipv4", TRUE, lib->ns);
                case AF_INET6:
                        return lib->settings->get_bool(lib->settings,
-                                       "%s.plugins.socket-default.use_ipv6", TRUE, charon->name);
+                                               "%s.plugins.socket-default.use_ipv6", TRUE, lib->ns);
                default:
                        return FALSE;
        }
@@ -735,14 +735,14 @@ socket_default_socket_t *socket_default_socket_create()
                        },
                },
                .port = lib->settings->get_int(lib->settings,
-                                                       "%s.port", CHARON_UDP_PORT, charon->name),
+                                                       "%s.port", CHARON_UDP_PORT, lib->ns),
                .natt = lib->settings->get_int(lib->settings,
-                                                       "%s.port_nat_t", CHARON_NATT_PORT, charon->name),
+                                                       "%s.port_nat_t", CHARON_NATT_PORT, lib->ns),
                .max_packet = lib->settings->get_int(lib->settings,
-                                                       "%s.max_packet", MAX_PACKET, charon->name),
+                                                       "%s.max_packet", MAX_PACKET, lib->ns),
                .set_source = lib->settings->get_bool(lib->settings,
                                                        "%s.plugins.socket-default.set_source", TRUE,
-                                                       charon->name),
+                                                       lib->ns),
        );
 
        if (this->port && this->port == this->natt)
index 012f18e..3161a70 100644 (file)
@@ -668,7 +668,7 @@ socket_dynamic_socket_t *socket_dynamic_socket_create()
                },
                .lock = rwlock_create(RWLOCK_TYPE_DEFAULT),
                .max_packet = lib->settings->get_int(lib->settings,
-                                                                       "%s.max_packet", MAX_PACKET, charon->name),
+                                                                               "%s.max_packet", MAX_PACKET, lib->ns),
        );
 
        if (pipe(this->notify) != 0)
index 547e769..9a7a6e0 100644 (file)
@@ -141,7 +141,7 @@ sql_logger_t *sql_logger_create(database_t *db)
                .db = db,
                .recursive = thread_value_create(NULL),
                .level = lib->settings->get_int(lib->settings,
-                                                               "%s.plugins.sql.loglevel", -1, charon->name),
+                                                                               "%s.plugins.sql.loglevel", -1, lib->ns),
        );
 
        return &this->public;
index c1b4461..c5dd6e8 100644 (file)
@@ -73,7 +73,7 @@ static bool open_database(private_sql_plugin_t *this,
                char *uri;
 
                uri = lib->settings->get_str(lib->settings, "%s.plugins.sql.database",
-                                                                        NULL, charon->name);
+                                                                        NULL, lib->ns);
                if (!uri)
                {
                        DBG1(DBG_CFG, "sql plugin: database URI not set");
index b583bfc..f770d7c 100644 (file)
@@ -778,7 +778,7 @@ stroke_control_t *stroke_control_create()
                        .destroy = _destroy,
                },
                .timeout = lib->settings->get_int(lib->settings,
-                                                               "%s.plugins.stroke.timeout", 0, charon->name),
+                                                                       "%s.plugins.stroke.timeout", 0, lib->ns),
        );
 
        return &this->public;
index 43e5739..ff93c94 100644 (file)
@@ -1379,7 +1379,7 @@ stroke_cred_t *stroke_cred_create()
 
        this->force_ca_cert = lib->settings->get_bool(lib->settings,
                                                "%s.plugins.stroke.ignore_missing_ca_basic_constraint",
-                                               FALSE, charon->name);
+                                               FALSE, lib->ns);
 
        load_certs(this);
        load_secrets(this, NULL, SECRETS_FILE, 0, NULL);
index 1f6ef6b..2fd6cc4 100644 (file)
@@ -763,7 +763,7 @@ stroke_socket_t *stroke_socket_create()
                        .destroy = _destroy,
                },
                .prevent_loglevel_changes = lib->settings->get_bool(lib->settings,
-                       "%s.plugins.stroke.prevent_loglevel_changes", FALSE, charon->name),
+                               "%s.plugins.stroke.prevent_loglevel_changes", FALSE, lib->ns),
        );
 
        this->cred = stroke_cred_create();
@@ -783,10 +783,10 @@ stroke_socket_t *stroke_socket_create()
        charon->bus->add_listener(charon->bus, &this->counter->listener);
 
        max_concurrent = lib->settings->get_int(lib->settings,
-                       "%s.plugins.stroke.max_concurrent", MAX_CONCURRENT_DEFAULT,
-                       charon->name);
+                               "%s.plugins.stroke.max_concurrent", MAX_CONCURRENT_DEFAULT,
+                               lib->ns);
        uri = lib->settings->get_str(lib->settings,
-                       "%s.plugins.stroke.socket", "unix://" STROKE_SOCKET, charon->name);
+                               "%s.plugins.stroke.socket", "unix://" STROKE_SOCKET, lib->ns);
        this->service = lib->streams->create_service(lib->streams, uri, 10);
        if (!this->service)
        {
index c859611..c1594b0 100644 (file)
@@ -178,9 +178,9 @@ static bool load_validator(private_systime_fix_plugin_t *this)
        char *str, *fmt;
 
        fmt = lib->settings->get_str(lib->settings,
-                       "%s.plugins.%s.threshold_format", "%Y", charon->name, get_name(this));
+                       "%s.plugins.%s.threshold_format", "%Y", lib->ns, get_name(this));
        str = lib->settings->get_str(lib->settings,
-                       "%s.plugins.%s.threshold", NULL, charon->name, get_name(this));
+                       "%s.plugins.%s.threshold", NULL, lib->ns, get_name(this));
        if (!str)
        {
                DBG1(DBG_CFG, "no threshold configured for %s, disabled",
@@ -274,9 +274,9 @@ plugin_t *systime_fix_plugin_create()
                        },
                },
                .interval = lib->settings->get_int(lib->settings,
-                               "%s.plugins.%s.interval", 0, charon->name, get_name(this)),
+                                               "%s.plugins.%s.interval", 0, lib->ns, get_name(this)),
                .reauth = lib->settings->get_bool(lib->settings,
-                               "%s.plugins.%s.reauth", FALSE, charon->name, get_name(this)),
+                                               "%s.plugins.%s.reauth", FALSE, lib->ns, get_name(this)),
        );
 
        return &this->public.plugin;
index 4ad19c5..d2ba2e3 100644 (file)
@@ -191,8 +191,8 @@ tnc_ifmap_listener_t *tnc_ifmap_listener_create(bool reload)
 
        /* schedule periodic transmission of IF-MAP renewSession request */
        reschedule =  lib->settings->get_int(lib->settings,
-                                               "%s.plugins.tnc-ifmap.renew_session_interval",
-                                                IFMAP_RENEW_SESSION_INTERVAL, charon->name);
+                                                               "%s.plugins.tnc-ifmap.renew_session_interval",
+                                                                IFMAP_RENEW_SESSION_INTERVAL, lib->ns);
 
        job = (job_t*)tnc_ifmap_renew_session_job_create(
                                                this->ifmap->get_ref(this->ifmap), reschedule);
index df7d2e2..8f24dae 100644 (file)
@@ -134,8 +134,8 @@ METHOD(tnc_ifmap_soap_t, newSession, bool,
 
        /* set PEP and PDP device name (defaults to IF-MAP Publisher ID) */
        this->device_name = lib->settings->get_str(lib->settings,
-                                                                       "%s.plugins.tnc-ifmap.device_name",
-                                                                        this->ifmap_publisher_id, charon->name);
+                                                                               "%s.plugins.tnc-ifmap.device_name",
+                                                                                this->ifmap_publisher_id, lib->ns);
        this->device_name = strdup(this->device_name);
 
     return this->session_id && this->ifmap_publisher_id;
@@ -731,15 +731,15 @@ static bool soap_init(private_tnc_ifmap_soap_t *this)
 
        /* getting configuration parameters from strongswan.conf */
        server_uri =  lib->settings->get_str(lib->settings,
-                                       "%s.plugins.tnc-ifmap.server_uri", IFMAP_URI, charon->name);
+                                       "%s.plugins.tnc-ifmap.server_uri", IFMAP_URI, lib->ns);
        server_cert = lib->settings->get_str(lib->settings,
-                                       "%s.plugins.tnc-ifmap.server_cert", NULL, charon->name);
+                                       "%s.plugins.tnc-ifmap.server_cert", NULL, lib->ns);
        client_cert = lib->settings->get_str(lib->settings,
-                                       "%s.plugins.tnc-ifmap.client_cert", NULL, charon->name);
+                                       "%s.plugins.tnc-ifmap.client_cert", NULL, lib->ns);
        client_key =  lib->settings->get_str(lib->settings,
-                                       "%s.plugins.tnc-ifmap.client_key", NULL, charon->name);
+                                       "%s.plugins.tnc-ifmap.client_key", NULL, lib->ns);
        user_pass =   lib->settings->get_str(lib->settings,
-                                       "%s.plugins.tnc-ifmap.username_password", NULL, charon->name);
+                                       "%s.plugins.tnc-ifmap.username_password", NULL, lib->ns);
 
        /* load [self-signed] MAP server certificate */
        if (!server_cert)
index 31cee9e..89237f5 100644 (file)
@@ -758,19 +758,19 @@ tnc_pdp_t *tnc_pdp_create(void)
        bool radius_enable, pt_tls_enable;
 
        server = lib->settings->get_str(lib->settings,
-                                       "%s.plugins.tnc-pdp.server", NULL, charon->name);
+                                               "%s.plugins.tnc-pdp.server", NULL, lib->ns);
        pt_tls_enable = lib->settings->get_bool(lib->settings,
-                                       "%s.plugins.tnc-pdp.pt_tls.enable", TRUE, charon->name);
+                                               "%s.plugins.tnc-pdp.pt_tls.enable", TRUE, lib->ns);
        pt_tls_port = lib->settings->get_int(lib->settings,
-                                       "%s.plugins.tnc-pdp.pt_tls.port", PT_TLS_PORT, charon->name);
+                                               "%s.plugins.tnc-pdp.pt_tls.port", PT_TLS_PORT, lib->ns);
        radius_enable = lib->settings->get_bool(lib->settings,
-                                       "%s.plugins.tnc-pdp.radius.enable", TRUE, charon->name);
+                                               "%s.plugins.tnc-pdp.radius.enable", TRUE, lib->ns);
        radius_port = lib->settings->get_int(lib->settings,
-                                       "%s.plugins.tnc-pdp.radius.port", RADIUS_PORT, charon->name);
+                                               "%s.plugins.tnc-pdp.radius.port", RADIUS_PORT, lib->ns);
        secret = lib->settings->get_str(lib->settings,
-                                       "%s.plugins.tnc-pdp.radius.secret", NULL, charon->name);
+                                               "%s.plugins.tnc-pdp.radius.secret", NULL, lib->ns);
        eap_type_str = lib->settings->get_str(lib->settings,
-                                       "%s.plugins.tnc-pdp.radius.method", "ttls", charon->name);
+                                               "%s.plugins.tnc-pdp.radius.method", "ttls", lib->ns);
 
        if (!pt_tls_enable && !radius_enable)
        {
index f789c31..6c7659b 100644 (file)
@@ -298,7 +298,7 @@ tnc_pdp_connections_t *tnc_pdp_connections_create(void)
                .list = linked_list_create(),
                .lock = rwlock_create(RWLOCK_TYPE_DEFAULT),
                .timeout = lib->settings->get_int(lib->settings,
-                               "%s.plugins.tnc-pdp.timeout", DEFAULT_TIMEOUT, charon->name),
+                                               "%s.plugins.tnc-pdp.timeout", DEFAULT_TIMEOUT, lib->ns),
        );
 
        return &this->public;
index 3c1aba5..d30267d 100644 (file)
@@ -58,7 +58,7 @@ static bool plugin_cb(private_updown_plugin_t *this,
        if (reg)
        {
                if (lib->settings->get_bool(lib->settings,
-                                                                       "charon.plugins.updown.dns_handler", FALSE))
+                                                       "%s.plugins.updown.dns_handler", FALSE, lib->ns))
                {
                        this->handler = updown_handler_create();
                        hydra->attributes->add_handler(hydra->attributes,
index 996f263..c1b619c 100644 (file)
@@ -157,7 +157,7 @@ whitelist_control_t *whitelist_control_create(whitelist_listener_t *listener)
 
        uri = lib->settings->get_str(lib->settings,
                                "%s.plugins.whitelist.socket", "unix://" WHITELIST_SOCKET,
-                               charon->name);
+                               lib->ns);
        this->service = lib->streams->create_service(lib->streams, uri, 10);
        if (!this->service)
        {
index 382ee3b..d0357b4 100644 (file)
@@ -206,7 +206,7 @@ whitelist_listener_t *whitelist_listener_create()
                .ids = hashtable_create((hashtable_hash_t)hash,
                                                                (hashtable_equals_t)equals, 32),
                .enabled = lib->settings->get_bool(lib->settings,
-                                                               "%s.plugins.whitelist.enable", FALSE, charon->name),
+                                                               "%s.plugins.whitelist.enable", FALSE, lib->ns),
        );
 
        return &this->public;
index 5ac4f10..f597bb7 100644 (file)
@@ -224,7 +224,7 @@ METHOD(xauth_method_t, process, status_t,
 
        name = lib->settings->get_str(lib->settings,
                                                                  "%s.plugins.xauth-eap.backend", "radius",
-                                                                 charon->name);
+                                                                 lib->ns);
        type = eap_type_from_string(name);
        if (!type)
        {
index 99fda7d..71c79ec 100644 (file)
@@ -142,7 +142,7 @@ METHOD(xauth_method_t, process, status_t,
                                /* trim to username part if email address given */
                                if (lib->settings->get_bool(lib->settings,
                                                                                        "%s.plugins.xauth-pam.trim_email",
-                                                                                       TRUE, charon->name))
+                                                                                       TRUE, lib->ns))
                                {
                                        pos = memchr(chunk.ptr, '@', chunk.len);
                                        if (pos)
@@ -175,9 +175,8 @@ METHOD(xauth_method_t, process, status_t,
        service = lib->settings->get_str(lib->settings,
                                "%s.plugins.xauth-pam.pam_service",
                                        lib->settings->get_str(lib->settings,
-                                               "%s.plugins.eap-gtc.pam_service",
-                                               "login", charon->name),
-                               charon->name);
+                                               "%s.plugins.eap-gtc.pam_service", "login", lib->ns),
+                               lib->ns);
 
        if (authenticate(service, user, pass))
        {
index 1b9c045..eb06f54 100644 (file)
@@ -136,8 +136,8 @@ xauth_pam_listener_t *xauth_pam_listener_create()
                                                "%s.plugins.xauth-pam.pam_service",
                                                        lib->settings->get_str(lib->settings,
                                                                "%s.plugins.eap-gtc.pam_service",
-                                                       "login", charon->name),
-                                               charon->name),
+                                                       "login", lib->ns),
+                                               lib->ns),
        );
 
        return &this->public;
index f70f30e..497ad3d 100644 (file)
@@ -116,7 +116,7 @@ plugin_t *xauth_pam_plugin_create()
                        },
                },
                .session = lib->settings->get_str(lib->settings,
-                                               "%s.plugins.xauth-pam.session", FALSE, charon->name),
+                                               "%s.plugins.xauth-pam.session", FALSE, lib->ns),
                .listener = xauth_pam_listener_create(),
        );
 
index 53da1d7..2c15dc5 100644 (file)
@@ -2329,11 +2329,11 @@ ike_sa_t * ike_sa_create(ike_sa_id_t *ike_sa_id, bool initiator,
                .attributes = array_create(sizeof(attribute_entry_t), 0),
                .unique_id = ref_get(&unique_id),
                .keepalive_interval = lib->settings->get_time(lib->settings,
-                                                       "%s.keep_alive", KEEPALIVE_INTERVAL, charon->name),
+                                                               "%s.keep_alive", KEEPALIVE_INTERVAL, lib->ns),
                .retry_initiate_interval = lib->settings->get_time(lib->settings,
-                                                       "%s.retry_initiate_interval", 0, charon->name),
+                                                               "%s.retry_initiate_interval", 0, lib->ns),
                .flush_auth_cfg = lib->settings->get_bool(lib->settings,
-                                                       "%s.flush_auth_cfg", FALSE, charon->name),
+                                                               "%s.flush_auth_cfg", FALSE, lib->ns),
        );
 
        if (version == IKEV2)
index 5768803..f2f81cf 100644 (file)
@@ -2150,17 +2150,17 @@ ike_sa_manager_t *ike_sa_manager_create()
        }
 
        this->ikesa_limit = lib->settings->get_int(lib->settings,
-                                                                       "%s.ikesa_limit", 0, charon->name);
+                                                                                          "%s.ikesa_limit", 0, lib->ns);
 
        this->table_size = get_nearest_powerof2(lib->settings->get_int(
                                                                        lib->settings, "%s.ikesa_table_size",
-                                                                       DEFAULT_HASHTABLE_SIZE, charon->name));
+                                                                       DEFAULT_HASHTABLE_SIZE, lib->ns));
        this->table_size = max(1, min(this->table_size, MAX_HASHTABLE_SIZE));
        this->table_mask = this->table_size - 1;
 
        this->segment_count = get_nearest_powerof2(lib->settings->get_int(
                                                                        lib->settings, "%s.ikesa_table_segments",
-                                                                       DEFAULT_SEGMENT_COUNT, charon->name));
+                                                                       DEFAULT_SEGMENT_COUNT, lib->ns));
        this->segment_count = max(1, min(this->segment_count, this->table_size));
        this->segment_mask = this->segment_count - 1;
 
@@ -2200,6 +2200,6 @@ ike_sa_manager_t *ike_sa_manager_create()
        }
 
        this->reuse_ikesa = lib->settings->get_bool(lib->settings,
-                                                                               "%s.reuse_ikesa", TRUE, charon->name);
+                                                                                       "%s.reuse_ikesa", TRUE, lib->ns);
        return &this->public;
 }
index 131d812..8fc158b 100644 (file)
@@ -1579,7 +1579,7 @@ METHOD(task_manager_t, process_message, status_t,
                        lib->scheduler->schedule_job(lib->scheduler, job,
                                        lib->settings->get_int(lib->settings,
                                                        "%s.half_open_timeout", HALF_OPEN_IKE_SA_TIMEOUT,
-                                                       charon->name));
+                                                       lib->ns));
                }
                this->ike_sa->update_hosts(this->ike_sa, me, other, TRUE);
                charon->bus->message(charon->bus, msg, TRUE, TRUE);
@@ -2082,9 +2082,9 @@ task_manager_v1_t *task_manager_v1_create(ike_sa_t *ike_sa)
                .frag = {
                        .exchange = ID_PROT,
                        .max_packet = lib->settings->get_int(lib->settings,
-                                       "%s.max_packet", MAX_PACKET, charon->name),
+                                               "%s.max_packet", MAX_PACKET, lib->ns),
                        .size = lib->settings->get_int(lib->settings,
-                                       "%s.fragment_size", MAX_FRAGMENT_SIZE, charon->name),
+                                               "%s.fragment_size", MAX_FRAGMENT_SIZE, lib->ns),
                },
                .ike_sa = ike_sa,
                .rng = lib->crypto->create_rng(lib->crypto, RNG_WEAK),
@@ -2092,11 +2092,11 @@ task_manager_v1_t *task_manager_v1_create(ike_sa_t *ike_sa)
                .active_tasks = linked_list_create(),
                .passive_tasks = linked_list_create(),
                .retransmit_tries = lib->settings->get_int(lib->settings,
-                                       "%s.retransmit_tries", RETRANSMIT_TRIES, charon->name),
+                                               "%s.retransmit_tries", RETRANSMIT_TRIES, lib->ns),
                .retransmit_timeout = lib->settings->get_double(lib->settings,
-                                       "%s.retransmit_timeout", RETRANSMIT_TIMEOUT, charon->name),
+                                               "%s.retransmit_timeout", RETRANSMIT_TIMEOUT, lib->ns),
                .retransmit_base = lib->settings->get_double(lib->settings,
-                                       "%s.retransmit_base", RETRANSMIT_BASE, charon->name),
+                                               "%s.retransmit_base", RETRANSMIT_BASE, lib->ns),
        );
 
        if (!this->rng)
index d5d7f2c..6cc3e04 100644 (file)
@@ -421,7 +421,7 @@ METHOD(task_t, process_r, status_t,
                                case AUTH_PSK:
                                        if (!lib->settings->get_bool(lib->settings, "%s.i_dont_care"
                                                "_about_security_and_use_aggressive_mode_psk",
-                                               FALSE, charon->name))
+                                               FALSE, lib->ns))
                                        {
                                                DBG1(DBG_IKE, "Aggressive Mode PSK disabled for "
                                                         "security reasons");
index 11155b2..e07ac0a 100644 (file)
@@ -191,9 +191,9 @@ static void build(private_isakmp_vendor_t *this, message_t *message)
        int i;
 
        strongswan = lib->settings->get_bool(lib->settings,
-                                                               "%s.send_vendor_id", FALSE, charon->name);
+                                                                                "%s.send_vendor_id", FALSE, lib->ns);
        cisco_unity = lib->settings->get_bool(lib->settings,
-                                                               "%s.cisco_unity", FALSE, charon->name);
+                                                                                "%s.cisco_unity", FALSE, lib->ns);
        ike_cfg = this->ike_sa->get_ike_cfg(this->ike_sa);
        fragmentation = ike_cfg->fragmentation(ike_cfg) != FRAGMENTATION_NO;
        if (!this->initiator && fragmentation)
index 12ee594..6e7da98 100644 (file)
@@ -194,7 +194,7 @@ static void schedule_inactivity_timeout(private_quick_mode_t *this)
        if (timeout)
        {
                close_ike = lib->settings->get_bool(lib->settings,
-                                                               "%s.inactivity_close_ike", FALSE, charon->name);
+                                                                       "%s.inactivity_close_ike", FALSE, lib->ns);
                lib->scheduler->schedule_job(lib->scheduler, (job_t*)
                                inactivity_job_create(this->child_sa->get_reqid(this->child_sa),
                                                                          timeout, close_ike), timeout);
index 6ce9ba8..ac3be90 100644 (file)
@@ -1229,7 +1229,7 @@ METHOD(task_manager_t, process_message, status_t,
                lib->scheduler->schedule_job(lib->scheduler, job,
                                lib->settings->get_int(lib->settings,
                                                "%s.half_open_timeout", HALF_OPEN_IKE_SA_TIMEOUT,
-                                               charon->name));
+                                               lib->ns));
        }
        return SUCCESS;
 }
@@ -1578,11 +1578,11 @@ task_manager_v2_t *task_manager_v2_create(ike_sa_t *ike_sa)
                .active_tasks = array_create(0, 0),
                .passive_tasks = array_create(0, 0),
                .retransmit_tries = lib->settings->get_int(lib->settings,
-                                       "%s.retransmit_tries", RETRANSMIT_TRIES, charon->name),
+                                       "%s.retransmit_tries", RETRANSMIT_TRIES, lib->ns),
                .retransmit_timeout = lib->settings->get_double(lib->settings,
-                                       "%s.retransmit_timeout", RETRANSMIT_TIMEOUT, charon->name),
+                                       "%s.retransmit_timeout", RETRANSMIT_TIMEOUT, lib->ns),
                .retransmit_base = lib->settings->get_double(lib->settings,
-                                       "%s.retransmit_base", RETRANSMIT_BASE, charon->name),
+                                       "%s.retransmit_base", RETRANSMIT_BASE, lib->ns),
        );
 
        return &this->public;
index 7cfa537..df7bc96 100644 (file)
@@ -293,7 +293,7 @@ static void schedule_inactivity_timeout(private_child_create_t *this)
        if (timeout)
        {
                close_ike = lib->settings->get_bool(lib->settings,
-                                                               "%s.inactivity_close_ike", FALSE, charon->name);
+                                                                       "%s.inactivity_close_ike", FALSE, lib->ns);
                lib->scheduler->schedule_job(lib->scheduler, (job_t*)
                                inactivity_job_create(this->child_sa->get_reqid(this->child_sa),
                                                                          timeout, close_ike), timeout);
@@ -1072,7 +1072,7 @@ static void handle_child_sa_failure(private_child_create_t *this,
 {
        if (message->get_exchange_type(message) == IKE_AUTH &&
                lib->settings->get_bool(lib->settings,
-                                                               "%s.close_ike_on_child_failure", FALSE, charon->name))
+                                                               "%s.close_ike_on_child_failure", FALSE, lib->ns))
        {
                /* we delay the delete for 100ms, as the IKE_AUTH response must arrive
                 * first */
index 8f83c48..800dab0 100644 (file)
@@ -120,7 +120,7 @@ struct private_ike_auth_t {
 static bool multiple_auth_enabled()
 {
        return lib->settings->get_bool(lib->settings,
-                                                       "%s.multiple_authentication", TRUE, charon->name);
+                                                                  "%s.multiple_authentication", TRUE, lib->ns);
 }
 
 /**
index 2cbe8f8..bd28b29 100644 (file)
@@ -428,7 +428,7 @@ static void build_certreqs(private_ike_cert_pre_t *this, message_t *message)
                message->add_payload(message, (payload_t*)req);
 
                if (lib->settings->get_bool(lib->settings,
-                                                                       "%s.hash_and_url", FALSE, charon->name))
+                                                                       "%s.hash_and_url", FALSE, lib->ns))
                {
                        message->add_notify(message, FALSE, HTTP_CERT_LOOKUP_SUPPORTED,
                                                                chunk_empty);
index fb29d05..16ac166 100644 (file)
@@ -86,7 +86,7 @@ METHOD(task_t, build, status_t,
        int i;
 
        strongswan = lib->settings->get_bool(lib->settings,
-                                                       "%s.send_vendor_id", FALSE, charon->name);
+                                                       "%s.send_vendor_id", FALSE, lib->ns);
        for (i = 0; i < countof(vids); i++)
        {
                if (vids[i].extension == EXT_STRONGSWAN && strongswan)