Merged branch 'master' of git://git.tokkee.org/sysdb.
store: Include backend information in the JSON serialization.
store: Store the backend of each stored object.
The backends are stored as a list of the plugin names of the plugins providing
the respective object.
The backends are stored as a list of the plugin names of the plugins providing
the respective object.
plugin: Added sdb_plugin_current().
This function returns the plugin information for the plugin from which the
current call into the core originated.
This function returns the plugin information for the plugin from which the
current call into the core originated.
plugin: Make sdb_plugin_info_t public.
store: Split out common JSON code into a separate helper function.
Travis: Ignore .y/.l files when running cpp-coveralls.
os_test: Added tests for os_mkdir_all() and os_remove_all().
utils os: Added sdb_remove_all() to recursively remove a path.
connection_test: Use mkstemp() instead of tmpnam().
sock_test: Use mkstemp() instead of tmpnam().
Don't free dirname()'s return value.
It may point to static memory.
It may point to static memory.
utils os: Don't enforce the mode on existing directories in mkdir_all().
This behaves badly when trying to create base directories like /var/run/ ;-)
This behaves badly when trying to create base directories like /var/run/ ;-)
frontend: Ensure that the base directory of a UNIX socket exists.
utils os: Added sdb_mkdir_all() helper function.
This function recursively creates a directory (similar to 'mkdir -p' on the
command line).
This function recursively creates a directory (similar to 'mkdir -p' on the
command line).
syslog plugin: Don't log DEBUG messages for now.
syslog plugin: Initialize syslog as soon as possible.
Don't wait for the init callback to be called -- we might receive log messages
earlier than that.
Don't wait for the init callback to be called -- we might receive log messages
earlier than that.
Merged branch 'master' of git://git.tokkee.org/sysdb.
build system: Added --enable-gprof configure flag.
plugin: Use multiple log entries when logging plugin information.
… instead of using a multi-line log entry (which is ugly).
… instead of using a multi-line log entry (which is ugly).
plugin: The replaced SDB_PLUGIN_INFO_NAME with the actual plugin name.
There's no need for any duplication.
There's no need for any duplication.
plugin: Automatically prepend callback names with the plugin name.
core: Automatically determine config callback names.
The plugin name (as stored in the plugin context) is used for that purpose,
thus, ensuring that Plugin/Backend blocks will always belong to the respective
LoadPlugin/LoadBackend options of the same name.
The plugin name (as stored in the plugin context) is used for that purpose,
thus, ensuring that Plugin/Backend blocks will always belong to the respective
LoadPlugin/LoadBackend options of the same name.
store: Cleaned up variable name (obj_lock → host_lock).
store_lookup: Use more specific types where appropriate.
store: Renamed store_base to store_obj.
store: Split store_obj into separate host and service objects.
Merged branch 'master' of git://git.tokkee.org/sysdb.
store: Simplified object lookup during update.
Again, based on having hosts on the toplevel only. This greatly simplifies the
overall structure. After all, this is the underlying storage layer only. More
complex relationships between objects will be handled on a different layer.
Again, based on having hosts on the toplevel only. This greatly simplifies the
overall structure. After all, this is the underlying storage layer only. More
complex relationships between objects will be handled on a different layer.
store: Simplified object update based on having hosts on the toplevel only.
store: Renamed a store object's 'children' to 'services'.
Hierarchical data will be represented using some object relationship
information rather than a weird tree construct below each host. That's going
to be more flexible.
Hierarchical data will be represented using some object relationship
information rather than a weird tree construct below each host. That's going
to be more flexible.
store: Removed obsolete TODO note.
plugin: Ignore internal loggers when checking for existing loggers.
An internal logger may currently be registered by the frontend which uses it
to send log messages to a client. Usually, these internal loggers will not
actually log stuff. Thus, we'll have to ignore them when deciding about
fallbacks.
An internal logger may currently be registered by the frontend which uses it
to send log messages to a client. Usually, these internal loggers will not
actually log stuff. Thus, we'll have to ignore them when deciding about
fallbacks.
sysdb: Wait for remaining data after the mainloop terminates.
client: Added sdb_client_shutdown().
Makefile: For now, link libsysdb sources directly into sysdbd.
Libtool's convenience libraries don't work with programs. When linking sysdbd
previously, none of the libsysdb objects only used by plugins would have been
linked in. That is, the respective libraries could not be loaded when running
the daemon.
We'll keep the library around, though, since it's used for the unit tests.
This is just a hack but it'll go away after the API is stable and libsysdb is
turned back into a "real" library. That'll happen before the 1.0 release.
Libtool's convenience libraries don't work with programs. When linking sysdbd
previously, none of the libsysdb objects only used by plugins would have been
linked in. That is, the respective libraries could not be loaded when running
the daemon.
We'll keep the library around, though, since it's used for the unit tests.
This is just a hack but it'll go away after the API is stable and libsysdb is
turned back into a "real" library. That'll happen before the 1.0 release.
t/: Make mock_plugin a "check" library.
This way, it's only built on 'make check' (aka 'make test').
This way, it's only built on 'make check' (aka 'make test').
store/frontend: Added support for integer and float comparison.
This is supported only for comparing attribute values.
This is supported only for comparing attribute values.
frontend: Added initial parser for "data" values.
Merged branch 'master' of git://git.tokkee.org/sysdb.
store_lookup: Pass a data-object to parse_cmp().
That'll allow for comparing attribute values of any type.
That'll allow for comparing attribute values of any type.
store_lookup: Added support for <, <=, >=, > when comparing attribute values.
store_lookup: Don't accept invalid object types in parse_cmp().
Added a unit-test catching that.
Added a unit-test catching that.
store_lookup_test: Fixed a memory leak.
Thanks to Travis-CI for identifying this! I wonder why my local tests did not
catch this :-(
Thanks to Travis-CI for identifying this! I wonder why my local tests did not
catch this :-(
store_lookup: Introduce conditional based attribute matchers.
This allows using less-than, less-equal, equal, greater-equal, greater-than
operators on attributes.
This allows using less-than, less-equal, equal, greater-equal, greater-than
operators on attributes.
data: Pass 'const' data objects to strlen()/format().
store: Added helper function to retrieve a host's attribute.
This also fixes a memory leak in case of an data_format() error.
This also fixes a memory leak in case of an data_format() error.
store_lookup_test: Verify that NULL is not a valid attribute name.
store: Don't allow name to be NULL when matching attributes.
There's no real use-case for it imho and it's just a weird special case in the
code.
There's no real use-case for it imho and it's just a weird special case in the
code.
store_lookup: Simplified some internal checks.
store: Removed a obsolete (and now somewhat misleading) comment.
store_lookup: Removed unneeded forward declarations.
Also, reshuffled some functions a bit to have a more natural order now that
the matcher approach is greatly simplified.
Also, reshuffled some functions a bit to have a more natural order now that
the matcher approach is greatly simplified.
Cleaned up some internal type names.
store_lookup: Removed the (now unused) host matcher.
store_lookup: Let attribute matchers check the attribute name.
store_lookup: Made the attribute matcher a "standalone" matcher.
The attribute matcher will now be applied to host objects directly and then
match against that host's attributes. This further simplifies parse_cmp() and
the general workflow for matchers.
The attribute matcher will now be applied to host objects directly and then
match against that host's attributes. This further simplifies parse_cmp() and
the general workflow for matchers.
store_lookup: Removed the (now unused) service matcher.
store_lookup: Let parse_cmp() use the new name matcher.
store_lookup: Added a matcher matching by object name.
This is a generic matcher applied to hosts (or their services or attributes)
and matches based on the respective object name.
Subsequently, this will replace the more complex host/service/attribute
matchers. Instead, more basic matchers will be available which can then be
combined arbitrarily using the existing logical matchers.
This is a generic matcher applied to hosts (or their services or attributes)
and matches based on the respective object name.
Subsequently, this will replace the more complex host/service/attribute
matchers. Instead, more basic matchers will be available which can then be
combined arbitrarily using the existing logical matchers.
doc: Add asciidoc.conf and sysdb-description.txt to EXTRA_DIST.
Removed obsolete TODO note.
grammar: Simplified compare matcher parser.
data: Added sdb_data_cmp() comparing two data points.
Renamed DBI_TYPE_TO_SC to DBI_TYPE_TO_SDB.
The old name was still from the times the project was called syscollector ;-)
The old name was still from the times the project was called syscollector ;-)
Merged branch 'master' of git://git.tokkee.org/sysdb.
sysdbd: Forcefully terminate the frontend and backend loops.
sysdbd: Simplified main loop management.
autogen.sh: Report an error if yacc or lex are missing.
Thanks to Uli Martens for reporting this.
Thanks to Uli Martens for reporting this.
Replaced old URLs/email addresses with sysdb.io.
t/Makefile: Added valgrind.suppress to EXTRA_DIST.
version-gen.sh: Append .git to default version again.
Release SysDB 0.1.0.
\o/
\o/
doc/asciidoc.conf: Use html5 in custom macros as well.
doc/: Use HTML5 instead of XHTML1.1 for HTML manpages.
doc/: Removed now unused CSS.
doc/: Added local rules to hook HTML manpages into 'make (install-)html'.
configure: Check if AM_PROG_AR is defined.
It's not defined when using old versions of automake.
It's not defined when using old versions of automake.
sysdbd.conf(5): Link to all plugin manpages.
configure, doc: Added ADOCFLAGS.
This allows the user to specify additional flags for AsciiDoc.
This allows the user to specify additional flags for AsciiDoc.
doc: Use asciidoc instead of a2x and added asciidoc.conf.
This allows to specify custom macros, which is currently used to turn
references to other manpages into links in the HTML output. In general, it
will make it easier to apply customizations.
This allows to specify custom macros, which is currently used to turn
references to other manpages into links in the HTML output. In general, it
will make it easier to apply customizations.
doc/sysdb-man.css: Applied tokkee.org-like style.
doc/Makefile: Removed the dependency on docbook-xsl.css.
Also, get rid of the ugly hack to "create" it.
Also, get rid of the ugly hack to "create" it.
doc: Added a minimalistic custom CSS for manpages.
tests: Suppress valgrind errors found in gcov_exit.
They don't matter for us.
They don't matter for us.
strbuf_test: Added some tests based on sdb_strbuf_cap().
These are mostly for checking memory handling.
These are mostly for checking memory handling.
strbuf utils: Added sdb_strbuf_cap().
This function returns the "capacity" of the string buffer. It's useful mostly
for testing, debugging, etc.
This function returns the "capacity" of the string buffer. It's useful mostly
for testing, debugging, etc.
strbuf utils: Fixed resizing in append.
Previously, resizing happened "too early" which may possibly generate
avoidable memory churn.
Previously, resizing happened "too early" which may possibly generate
avoidable memory churn.
strbuf_test: Added some more tests.
Changed some test to be table-based and verify the result of the incremental
append test.
Changed some test to be table-based and verify the result of the incremental
append test.
strbuf_test: Cleaned up the code a bit.
Made golden_data arrays private to the respective function where possible and
removed "sdb_strbuf" from test names.
Made golden_data arrays private to the respective function where possible and
removed "sdb_strbuf" from test names.
t/: Run all unit tests through valgrind.
This is implemented through a wrapper script which will run its arguments
through valgrind if the first parameter matches "unit/". It is passed in to
'make test' using automake's TESTS_ENVIRONMENT variable.
This is implemented through a wrapper script which will run its arguments
through valgrind if the first parameter matches "unit/". It is passed in to
'make test' using automake's TESTS_ENVIRONMENT variable.
dbi_test: Don't allocate any memory in dbi_driver_open_r().
This memory would be lost and appears as irrelevant noise in valgrind memory
checks.
This memory would be lost and appears as irrelevant noise in valgrind memory
checks.
connection_test: Free username strings stored in mock connection objects.
frontend: Simplified error handling.
frontend: Execute commands early on large amounts of incoming traffic.
This will free up buffer space if possible.
This will free up buffer space if possible.
frontend: Handle missing authentication early.
… and limit the max amount of buffered data for unauthenticated connections in
order reduce the impact of anonymous DoS attempts.
… and limit the max amount of buffered data for unauthenticated connections in
order reduce the impact of anonymous DoS attempts.
frontend: Fix invalid command handling when receiving data in chunks.
When skipping over invalid command data, make sure not to skip more data than
what's currently available. Rather, remember how much data needs to be ignored
and do so after actually receiving it.
Added a new test which catches these cases and also provides some more
low-level communication tests.
When skipping over invalid command data, make sure not to skip more data than
what's currently available. Rather, remember how much data needs to be ignored
and do so after actually receiving it.
Added a new test which catches these cases and also provides some more
low-level communication tests.
frontend: Treat CONNECTION_IDLE as an invalid command.
This is only meant for internal use; don't silently ignore it.
This is only meant for internal use; don't silently ignore it.
strbuf: Free memory when it's not longer needed.
While this might generate some churn in some situations, care has been taken
to avoid this as much as possible while providing a (hopefully) good balance
between memory usage and the need to reallocate memory.
While this might generate some churn in some situations, care has been taken
to avoid this as much as possible while providing a (hopefully) good balance
between memory usage and the need to reallocate memory.
ReleaseNotes: Added a summary of the utility functions.
README: Extended installation instructions a bit.