sysdb(7): Added a manpage providing an overview of SysDB.
sysdbql(7): Fixed a typo.
sysdb(1): Added sysdbql(7) to "see also".
sysdbql(7): Document the query language.
documentation: Unified author information.
sysdb(1): Be more verbose about the exit status when using the -c option.
coverage.sh: Refresh build system (and meta information).
integration/test_lib: Manage the sysdbd PID centrally.
This way, we actually get the right PID outside of the wrapper function and
test_lib can make sure the process is terminated on EXIT.
This way, we actually get the right PID outside of the wrapper function and
test_lib can make sure the process is terminated on EXIT.
sysdb: Fixed incompatible pointer type warning reported by clang.
cibuild.sh: Don't run regular tests when using the address sanitizer.
valgrind does not play well with the address sanitizer. Also, there's no need
to rerun the regular tests on asan generated code (which is a test on its
own).
valgrind does not play well with the address sanitizer. Also, there's no need
to rerun the regular tests on asan generated code (which is a test on its
own).
integration tests: Use LD_PRELOAD only when running SysDB tools.
Just as a cleanup.
Just as a cleanup.
tools: Log library versions as well on startup.
doc/Makefile: Added all asciidoc files to EXTRA_DIST and clean up all doc.
integration/test_lib: Pass -U mockuser to sysdb.
getpwuid_r on Travis leaks some memory which causes the valgrind tests to fail
:-/
getpwuid_r on Travis leaks some memory which causes the valgrind tests to fail
:-/
integration tests: Use LD_PRELOAD instead of chrpath.
chrpath requires that the new path be shorter or the same length as the
previous path.
chrpath requires that the new path be shorter or the same length as the
previous path.
integration/simple_query: More explicitly document expected exit codes.
integration/simple_query: Added more types of simple queries.
sysdb: When handling a reply, base further actions on the response code.
This will actually enable the command handler to see whether a log message or
a query response was received.
Also, this ensures that the command handler may correctly detect errors during
query execution and exit with a non-zero code accordingly. The simple_query
integration test was updated to reflect this new, corrected behavior. Thanks
to the test for actually catching this misbehavior! :-)
This will actually enable the command handler to see whether a log message or
a query response was received.
Also, this ensures that the command handler may correctly detect errors during
query execution and exit with a non-zero code accordingly. The simple_query
integration test was updated to reflect this new, corrected behavior. Thanks
to the test for actually catching this misbehavior! :-)
sysdb: When using -c, wait for the server's final response.
There might be some intermediate log messages, which should be printed but
then we need to wait for further replies.
There might be some intermediate log messages, which should be printed but
then we need to wait for further replies.
integration/simple_query.sh: Test a failing command.
sysdb: When using -c, exit non-zero if any command failed.
integration/simple_query.sh: Added some more simple queries.
build system: Disable integration tests if valgrind or chrpath are missing.
README: Updated documentation about (integration) tests.
Merged branch 'master' of git://git.tokkee.org/sysdb.
integration/test_lib.sh: Copy binaries from $TOP_SRCDIR.
D'oh!
D'oh!
integration tests: Run all invocations through valgrind's memcheck.
… covering, both, sysdb and sysdbd. For that to work, copy the binaries and
libraries to the temp directory and change the rpath to point to the temp
directory. This ensures the test is independent of any configure flags and
installation directories.
Let the tests fail if a leak (or other error) was detected by valgrind.
… covering, both, sysdb and sysdbd. For that to work, copy the binaries and
libraries to the temp directory and change the rpath to point to the temp
directory. This ensures the test is independent of any configure flags and
installation directories.
Let the tests fail if a leak (or other error) was detected by valgrind.
simple_query.sh: Store output in a variable before analyzing it.
This ensures that we actually get and check the right exit code.
This ensures that we actually get and check the right exit code.
integration tests: Kill the right process when shutting down sysdbd.
Also, wait for it to terminate.
Also, wait for it to terminate.
doc: Added documentation for all existing plugins.
Added one manpage for each plugin.
Added one manpage for each plugin.
doc: (Re)generate and install the default asciidoc CSS stylesheet.
.gitignore: Ignore asciidoc generated HTML output.
doc: Build and install HTML documentation as well.
For now, build HTML variants of the manpages but without any index file or
similar.
For now, build HTML variants of the manpages but without any index file or
similar.
sysdbd.conf(5): Documented the LoadPlugin and PluginDir options.
sysdbd: Don't leak memory when aborting from the main loop.
client: Fixed a memory leak in case connection setup fails.
t/integration/: Added variables for sysdbd/sysdb/sysdb.conf.
t/coverage.sh: Don't use --disable-shared.
Else, mock_plugin.so won't be available during 'make test'.
Else, mock_plugin.so won't be available during 'make test'.
t/Makefile: Added integration test script to EXTRA_DIST.
t/integration/simple_query: Added test doing a simple query.
t/integration/mock_plugin: Added plugin for integration tests.
t/integration: Added simple framework for integration tests.
Added a test using very simple configuration snippets.
Added a test using very simple configuration snippets.
sysdbd: Return with status=1 in case of an initialization or config error.
frontend: Make UNIX sockets the default listener implementation.
sysdbd: Improved startup logging.
Don't log success until all initialization is actually done. Also, don't
enable the connection logger until before entering the frontend main loop.
Don't log success until all initialization is actually done. Also, don't
enable the connection logger until before entering the frontend main loop.
sysdbd.conf: Added 'PluginDir' config option.
core: Make the plugin directory configurable.
dbi utils: Added compat layer for DBI < 0.9.
.gitignore: Ignore test-suite.log.
dbi utils: Use the new _r interface.
Moved unit tests into t/unit/ subdirectory.
Merged branch 'master' of git://git.tokkee.org/sysdb.
frontend: Added destructors for dynamically allocated objects in the parser.
This will make sure that the memory is freed in case of parse errors.
This will make sure that the memory is freed in case of parse errors.
frontend: Fixed deprecated %name-prefix syntax.
frontend: FETCH, LIST, LOOKUP are untyped tokens.
core: Don't leak memory upon an error in the collector loop.
core: Don't leak memory when shutting down the collector loop.
Instead, put the current collector object back into the list in oder to keep a
reference to it.
Instead, put the current collector object back into the list in oder to keep a
reference to it.
connection_test: Added a simple test for sdb_connection_accept().
connection_test: Added first test for frontend connection handling.
For now, testing a simple session startup.
For now, testing a simple session startup.
frontend: Reset the current command length on CONNECTION_IDLE.
frontend: Clear the error buffer when initializing a new command.
utils strbuf: Don't copy more than needed in sdb_strbuf_skip().
strbuf_test: Added some more test-cases for sdb_strbuf_skip().
frontend: Always store errors in the error buffer.
This allows to access the error from other parts of the code.
This allows to access the error from other parts of the code.
frontend: Always reset the current command after handling it.
That is, also reset it after an authentication error.
That is, also reset it after an authentication error.
frontend: Clear current command on authentication error.
store_lookup_test: Dereference objects returned from the store.
parser: Don't leak memory when building nested matchers.
backends: Destroy dbi/unixsock clients on shutdown.
This would also be cleaned up when destroying the registered user data objects
but doing so on shutdown in much cleaner.
This would also be cleaned up when destroying the registered user data objects
but doing so on shutdown in much cleaner.
store: Free old attribute values before storing an updated value.
collectd::unixsock plugin: Free temporarily allocated memory.
frontend: Free strdup()'ed username when destroying a connection.
sysdbd: Free up the config item returned from the parser as well.
oconfig_free() does not do that because it does not correctly keep track of
what the top-level config item is and it cannot free items which are the child
of another.
oconfig_free() does not do that because it does not correctly keep track of
what the top-level config item is and it cannot free items which are the child
of another.
sysdbd: Shut down all plugins before exiting.
plugin: Added sdb_plugin_shutdown_all().
This function calls all registered "shutdown" callbacks.
This function calls all registered "shutdown" callbacks.
Make clang-analyze happy in two irrelevant cases.
sysdbd: Keep connections open during reconfiguration.
By using the new sdb_fe_sock_clear_listeners(), the list of active listeners
may be reconfigured without affecting any open connections.
By using the new sdb_fe_sock_clear_listeners(), the list of active listeners
may be reconfigured without affecting any open connections.
frontend: Added sdb_fe_sock_clear_listeners().
This function may be used to shut down and clear all listeners associated with
a socket object without affecting any open connections.
This function may be used to shut down and clear all listeners associated with
a socket object without affecting any open connections.
sysdbd: Free the config parse tree after finishing config work.
sysdbd: Reconfigure the daemon on SIGHUP.
The current approach shuts down the backend collector thread and the frontend.
Then, the config file is parsed again and libsysdb's reconfiguration mechanism
is used to reconfigure all plugins.
The current approach shuts down the backend collector thread and the frontend.
Then, the config file is parsed again and libsysdb's reconfiguration mechanism
is used to reconfigure all plugins.
sysdbd: Added daemon_free_listen_addresses().
This is a helper function for handling config settings.
This is a helper function for handling config settings.
Make all plugins ready for reconfiguration support.
That is, handle NULL arguments passed to the config and module init functions
during reconfiguration.
That is, handle NULL arguments passed to the config and module init functions
during reconfiguration.
plugin: Added support for reconfiguring the system on the fly.
Reconfiguring all plugins happens in multiple steps:
First, call sdb_plugin_reconfigure_init() to deconfigure all plugins by
calling their config callbacks with a NULL config tree and unregistering all
registered callbacks.
Then, sdb_plugin_configure() and other functions may be used to provide the
new configuration or load new plugins. For all plugins which were already
loaded before, sdb_module_init() will be called with a NULL argument when
reloading them.
Finally, sdb_plugin_reconfigure_finish() will clean up leftover pieces, like
unloading plugins which are no longer in use.
Reconfiguring all plugins happens in multiple steps:
First, call sdb_plugin_reconfigure_init() to deconfigure all plugins by
calling their config callbacks with a NULL config tree and unregistering all
registered callbacks.
Then, sdb_plugin_configure() and other functions may be used to provide the
new configuration or load new plugins. For all plugins which were already
loaded before, sdb_module_init() will be called with a NULL argument when
reloading them.
Finally, sdb_plugin_reconfigure_finish() will clean up leftover pieces, like
unloading plugins which are no longer in use.
utils llist: Added sdb_llist_clear().
This function clears the list by removing all elements and releasing the
included objects. It's similar to destroy() but does not actually release the
list object itself.
This function clears the list by removing all elements and releasing the
included objects. It's similar to destroy() but does not actually release the
list object itself.
utils llist: Removed sdb_ prefix from private functions.
For consistency!
For consistency!
plugin: Do not expect all callbacks to have a plugin context assigned.
For callbacks not registered from a plugin, we don't have a context. For
example, the frontend's connection logger callback does not have a context.
For callbacks not registered from a plugin, we don't have a context. For
example, the frontend's connection logger callback does not have a context.
plugin: Unset the plugin context before unregistering a plugin.
Else, the context is still considered to be in use and, thus, won't be removed
from the global plugin (context) list.
Else, the context is still considered to be in use and, thus, won't be removed
from the global plugin (context) list.
plugin: Log to stderr if no logger has been registered.
Check the length of the list rather than replying on it being uninitialized.
Check the length of the list rather than replying on it being uninitialized.
plugin: Let ctx_create() use ctx_set().
This ensures consistent handling of reference counts.
This ensures consistent handling of reference counts.
plugin: Split sdb_plugin_load() into multiple functions.
… to make it easier to reuse parts of the function.
… to make it easier to reuse parts of the function.
plugin: Fixed detection of plugins loaded twice.
This was missing in commit fdfe2a68ba1838cdb1c34d3275d129fb217fbd9d.
This was missing in commit fdfe2a68ba1838cdb1c34d3275d129fb217fbd9d.
plugin: Keep a global reference of a plugin context if it's still in use.
D'oh!
D'oh!
plugin: Increment ref-count for a context stored in the TSD.
… and release it when removing it from the TSD. While this shouldn't matter
when everything is done right, this ensures that memory management is done
right.
… and release it when removing it from the TSD. While this shouldn't matter
when everything is done right, this ensures that memory management is done
right.
plugin: Only log a message when actually unloading a module.
plugin: Unload (dlclose) a plugin when it's no longer used.
Do so, if the init callback failed.
Do so, if the init callback failed.
plugin: Name the plugin context after the actual module name.
That is, the name as specified by the user without '::' replaced by '/'.
The latter is only used for loading the shared object by file-name.
That is, the name as specified by the user without '::' replaced by '/'.
The latter is only used for loading the shared object by file-name.
sysdbd: Fixed a config parser error message.
plugin: Keep a usage counter for each plugin.
Also, let plugin_load return early if the plugin is already loaded.
This is mostly in preparation for future improvements around plugin handling.
Also, let plugin_load return early if the plugin is already loaded.
This is mostly in preparation for future improvements around plugin handling.
sysdbd: Moved main loop handling into a separate function.
This will allow for easier restart of the main loop.
This will allow for easier restart of the main loop.
llist_test: Removed "llist" from all test names.
No need to use overly long names.
No need to use overly long names.