aboutsummaryrefslogtreecommitdiffstats
path: root/src/libstrongswan/plugins/plugin_loader.c
Commit message (Collapse)AuthorAgeFilesLines
* plugin-loader: Correctly read dlopen_use_rtld_now optionTobias Brunner2017-09-181-1/+1
| | | | Fixes: 305c4aa82cb0 ("plugin-loader: Optionally use RTLD_NOW with dlopen()")
* plugin-loader: Move indent variables into !USE_FUZZING blockTobias Brunner2017-08-151-2/+2
| | | | This avoids compile errors on Travis.
* linked-list: Change return value of find_first() and signature of its callbackTobias Brunner2017-05-261-18/+20
| | | | This avoids the unportable five pointer hack.
* Change interface for enumerator_create_filter() callbackTobias Brunner2017-05-261-30/+50
| | | | | This avoids the unportable 5 pointer hack, but requires enumerating in the callback.
* plugin-loader: Disable some logging output when building fuzz targetsTobias Brunner2017-05-231-4/+19
| | | | | This avoids evaluating %N. An alternative would be to define a printf-hook for plugin features.
* plugin-loader: Add facility to register plugin constructorsTobias Brunner2017-05-231-3/+59
| | | | | | | | | | | | | | Enabled when building monolithically and statically. This should allow us to work around the -whole-archive issue with libtool. If the libraries register the plugin constructors they provide they reference the constructors and will therefore prevent the linker from removing these seemingly unused symbols from the final executable. For use cases where dlsym() can be used, e.g. because the static libraries are manually linked with -whole-archive (Linux) or -force-load (Apple), this can be disabled by passing ss_cv_static_plugin_constructors=no to the configure script.
* plugin-loader: Fix hashing of registered plugin featuresTobias Brunner2017-02-241-1/+1
| | | | | | | This strangely never caused any noticeable issues, but was the reason for build failures in certain test cases (mostly BLISS) due to missing plugin features when built with specific options on Travis (was not reproducible locally).
* plugin-loader: Strip '!' from critical plugin names when setting pathsTobias Brunner2016-11-181-1/+1
|
* plugin-loader: Allow selective modification of the default plugin listTobias Brunner2016-06-291-10/+24
| | | | | | | This change allows selectively modifying the default plugin list by setting the `load` setting of individual plugins (e.g. to disable them or to change their priority) without enabling charon.load_modular and having to configure a section and a load statement for every plugin.
* plugin-loader: Optionally use RTLD_NOW with dlopen()Tobias Brunner2015-11-091-6/+11
| | | | | | | | | This can be useful when writing custom plugins as typos or missing linker flags that result in unresolved symbols in the shared object could otherwise cause late crashes. In particular, if such a symbol is used in a code path that is rarely executed. During development and testing using RTLD_NOW instead of RTLD_LAZY will prevent the plugin from getting loaded and makes the error visible immediately.
* plugin-loader: Increase log level for warning about plugin features that ↵Tobias Brunner2015-03-091-3/+3
| | | | | | | | | failed to load Since we can't get rid of all unmet dependencies (at least not in every possible plugin configuration) the message is more confusing than helpful. In particular because a detailed warning about plugin features that failed to load due to unmet dependencies is only logged on level 2.
* plugin-loader: Do not unload libraries during dlclose(), if supportedMartin Willi2015-02-241-1/+9
| | | | | | | Unloading libraries calls any library constructor/destructor functions. Some libraries can't handle that in our excessive unit test use. GnuTLS leaks a /dev/urandom file descriptor, letting unit tests fail with arbitrary out-of-resources errors.
* plugin-loader: Support a reload() callback for static featuresMartin Willi2014-09-221-3/+28
|
* windows: Provide wrappers for dlopen() function familyMartin Willi2014-06-031-0/+2
|
* plugin-loader: Properly initialize modular plugin list if no plugins are enabledTobias Brunner2014-03-181-0/+1
|
* plugin-loader: Optionally use load option in each plugin section to load pluginsTobias Brunner2014-02-121-3/+136
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This now works because all plugins use the same config namespace. If <ns>.load_modular is true, the list of plugins to load is determined via the value of the <ns>.plugins.<name>.load options. Using includes the following is possible: charon { load_modular = yes plugins { include strongswan.d/charon/*.conf } } charon-cmd { load_modular = yes plugins { include strongswan.d/charon-cmd/*.conf } } Where each .conf file would contain something like: <name> { load = yes <option> = <value> } To increase the priority of individual plugins load = <priority> can be used (the default is 1). For instance, to use openssl instead of the built-in crypto plugins set in strongswan.d/charon/openssl.conf: openssl { load = 10 } If two plugins have the same priority their order in the default plugin list is preserved. Plugins not found in that list are ordered alphabetically before other plugins with the same priority.
* plugin-loader: Convenience function added to add plugin dirs in build treeTobias Brunner2013-11-061-0/+19
|
* plugin-loader: Removed unused path argument of load() methodTobias Brunner2013-06-281-6/+3
| | | | | Multiple additional search paths can be added with the add_path() method.
* plugin-loader: Method added to provide additional search paths for pluginsTobias Brunner2013-06-271-10/+49
|
* plugin-loader: Move logging of failed features to status()Tobias Brunner2013-06-211-7/+11
| | | | | | | | | Still log an error message if critical features fail, as loaded plugins/features are not logged in that case. This way loaded plugins are printed before failed features and the relation is easier to make for users. It also allows programs to log this message on a different level.
* plugin-loader: Add method to print loaded plugins on a given log levelTobias Brunner2013-06-211-0/+10
|
* plugin-loader: Collect statistics while loading features, print them in case ↵Tobias Brunner2013-06-211-69/+40
| | | | | | | features failed to load There is no need to explicitly search for failed features in critical plugins as this is now detected while loading the features.
* plugin-loader: Use different log level if failed feature is in critical pluginTobias Brunner2013-06-211-2/+16
|
* plugin-loader: Log message when failing to load pluginTobias Brunner2013-06-211-0/+8
|
* plugin-loader: Reduce verbosity while loading pluginsTobias Brunner2013-06-211-4/+4
|
* Move test-runners has_feature() function to plugin loaderMartin Willi2013-06-211-0/+30
|
* Refactored plugin-loader with improved dependency resolutionTobias Brunner2013-06-111-234/+475
| | | | | | With the new implementation the plugins don't have to be listed in any special order, dependencies are properly resolved. The order only matters if two plugins provide the same feature.
* plugin-feature: Function added to exactly compare plugin featuresTobias Brunner2013-06-111-2/+2
|
* Moved debug.[ch] to utils folderTobias Brunner2012-10-241-1/+1
|
* Moved integrity_checker_t to utils folderTobias Brunner2012-10-241-1/+1
|
* Moved data structures to new collections subfolderTobias Brunner2012-10-241-2/+2
|
* Don't require PLUGINDIR to be defined.Tobias Brunner2012-08-081-6/+15
| | | | If it is not available, we just load monolithically built plugins.
* Added a method to plugin_loader_t to add 'static' plugin featuresTobias Brunner2012-06-251-0/+91
| | | | | | | | This allows daemons and other components to register plugin features like those provided by plugins (following the same lifecycle). The added features are internally handled like they were added by a plugin.
* Make sure that all features of critical plugins are loadedTobias Brunner2012-06-251-5/+64
|
* Fixed return values of several functions (e.g. return FALSE for pointer types).Tobias Brunner2012-05-311-1/+1
|
* Fixed check for loaded plugins with feature types that are not compared exactly.Tobias Brunner2012-05-241-25/+13
| | | | | Previously e.g. RNGs with weaker strength would have overwritten stronger ones.
* Use a hashtable to check for already loaded plugin features.Tobias Brunner2012-05-231-20/+37
|
* If we load new features from a plugin, restart loading from first pluginMartin Willi2012-05-031-0/+4
|
* Don't depend on a feature that has a dependency to the same feauture during ↵Martin Willi2012-05-021-1/+2
| | | | unload
* Cache list of plugin names to further simplify its usage.Tobias Brunner2012-01-191-19/+46
| | | | Also helpful for ipsec statusall to avoid having to enumerate plugins.
* Function added to plugin_loader to get a list of the names of loaded plugins.Tobias Brunner2012-01-191-1/+26
|
* Be less verbose if plugin dependecy not satisfiedMartin Willi2011-12-071-1/+1
|
* Don't enforce features with soft dependencies before all plugins are loadedMartin Willi2011-10-141-4/+4
|
* Don't try to load a feature again after failureMartin Willi2011-10-141-4/+28
|
* Reset registration function for each plugin during feature loadingMartin Willi2011-10-141-1/+2
|
* Fixed memleak in plugin unloadingMartin Willi2011-10-141-0/+1
|
* Load features after each plugin loaded until all plugins have feature supportMartin Willi2011-10-141-4/+7
|
* Implemented feature unloading, moved feature registration plugin_features.cMartin Willi2011-10-141-126/+110
|
* Don't use union members directly in plugin_feature_t.Tobias Brunner2011-10-141-21/+24
|
* Unload plugins which we were not able to load any features from.Tobias Brunner2011-10-141-0/+26
|