| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
| |
Since we had an ABI bump, maintaining old symbol versions is pointless
unless we'd maintain the SONAME too.
Signed-off-by: Gergely Nagy <algernon@balabit.hu>
|
|
|
|
| |
Signed-off-by: Gergely Nagy <algernon@balabit.hu>
|
|
|
|
|
|
|
|
| |
The test_overrides() test must be run first, otherwise we'll already
likely not have a clean environment to test in. Furthermore, when
testing discovery, make sure that NOIMPLICIT is not set.
Signed-off-by: Gergely Nagy <algernon@balabit.hu>
|
|
|
|
|
|
|
| |
test_perf was still relying on the old behaviour of ul_openlog(): no
more, it uses ul_set_log_flags() now.
Signed-off-by: Gergely Nagy <algernon@balabit.hu>
|
|
|
|
|
|
|
| |
Bump the version in configure.ac, and the library version in
lib/Makefile.am, in preparation for the upcoming 0.3.0 release.
Signed-off-by: Gergely Nagy <algernon@balabit.hu>
|
|
|
|
|
|
|
| |
Bump the automake dependency to 1.11, disable gzip tarballs at make
dist time, and make dist-xz the default.
Signed-off-by: Gergely Nagy <algernon@balabit.hu>
|
|
|
|
|
|
|
| |
The next version will be 0.3.0, due to the significant - and
incompatible - changes made so far.
Signed-off-by: Gergely Nagy <algernon@balabit.hu>
|
|
|
|
|
|
|
|
|
|
|
|
| |
Moved some tests around between test_umberlog and
test_umberlog_preload, so only those tests remain in
test_umberlog_preload that do test something that the LD_PRELOAD lib
variant provides.
Also added a comment above each test to quickly clarify what they're
meant to test.
Signed-off-by: Gergely Nagy <algernon@balabit.hu>
|
|
|
|
|
|
|
|
| |
Based on a suggestion by Miloslav Trmač <mitr@redhat.com>, rename
LOG_UL_NODISCOVER to LOG_UL_NOIMPLICIT, and clarify the documentation
slightly.
Signed-off-by: Gergely Nagy <algernon@balabit.hu>
|
|
|
|
|
|
|
|
| |
When compiled with --disable-discovery, the LD_PRELOAD variant will
have automatic field discovery disabled. This does not affect the
linkable library, which always has them enabled by default.
Signed-off-by: Gergely Nagy <algernon@balabit.hu>
|
|
|
|
|
|
|
| |
This new flag for ul_set_log_flags() makes it easier to understand
what the default is (0 typically does not mean "enable all").
Signed-off-by: Gergely Nagy <algernon@balabit.hu>
|
|
|
|
|
|
|
| |
Describe it better how caching works (and also correct a few mistakes
that were left over when ul_set_log_flags() was introduced).
Signed-off-by: Gergely Nagy <algernon@balabit.hu>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Instead of piggy-backing on ul_openlog(), and accepting new flags at
openlog()-time, use a separate function, ul_set_log_flags() to achieve
the same.
This way, anyone who wants to flip any of the new flags, will have to
use ul_set_log_flags(), as ul_openlog() ignores them from now on.
This is based on work done by Miloslav Trmač <mitr@redhat.com>, and is
both an API and an ABI breakage.
Signed-off-by: Gergely Nagy <algernon@balabit.hu>
|
|
|
|
|
|
|
|
|
|
|
|
| |
In order to satisfy the desire of using libumberlog, specifically
ul_format(), without having to worry about syslog() & friends being
overridden, split the library into two parts:
A linkable library, which provides the new API, but does not override
the legacy syslog() functions; and a new, LD_PRELOAD-able part, which
does override the old ones.
Signed-off-by: Gergely Nagy <algernon@balabit.hu>
|
|
|
|
| |
Signed-off-by: Gergely Nagy <algernon@balabit.hu>
|
|
|
|
|
|
|
|
| |
ul_closelog() does not clear flags anymore, in order to mimic
closelog() better, so remove the note about clearing from the API
docs.
Signed-off-by: Gergely Nagy <algernon@balabit.hu>
|
|
|
|
| |
Signed-off-by: Gergely Nagy <algernon@balabit.hu>
|
|
|
|
|
|
|
|
|
|
| |
Instead of checking the flags for LOG_UL_NODISCOVER in every branch,
check it once in the beginning for LOG_UL_NODISCOVER | LOG_UL_NOCACHE,
and bail out early.
This greatly improves the readability of the code.
Signed-off-by: Gergely Nagy <algernon@balabit.hu>
|
|
|
|
| |
Signed-off-by: Gergely Nagy <algernon@balabit.hu>
|
|
|
|
| |
Signed-off-by: Miloslav Trmač <mitr@redhat.com>
|
|
|
|
|
|
| |
... with -Wsign-compare.
Signed-off-by: Miloslav Trmač <mitr@redhat.com>
|
|
|
|
| |
Signed-off-by: Miloslav Trmač <mitr@redhat.com>
|
|
|
|
|
|
| |
to minimize the risk of type mistakes.
Signed-off-by: Miloslav Trmač <mitr@redhat.com>
|
|
|
|
|
|
|
|
| |
Don't reset ul_recurse before exiting a recursive invocation.
Apparently I have send this patch before, followed by a patch that
immediately reverts it, so resending.
Signed-off-by: Miloslav Trmač <mitr@redhat.com>
|
|
|
|
|
|
| |
We won't need the data in that case.
Signed-off-by: Miloslav Trmač <mitr@redhat.com>
|
|
|
|
|
|
|
|
|
|
|
| |
This simplifies the syslog() path a little, and allows us to express
"host name should be cached but no value is set.".
Because host name field is already emptied by default and in closelog (),
this also means uncached data is used before openlog () and after
closelog ().
Signed-off-by: Miloslav Trmač <mitr@redhat.com>
|
|
|
|
|
|
|
| |
Now syslog () without openlog () will include a correct [UG]ID value instead
of 0. Also reset the cache on closelog ().
Signed-off-by: Miloslav Trmač <mitr@redhat.com>
|
|
|
|
|
|
|
| |
This simplifies the syslog() path a little, and allows us to express
"[UG]ID should be cached but no value is set.".
Signed-off-by: Miloslav Trmač <mitr@redhat.com>
|
|
|
|
| |
Signed-off-by: Miloslav Trmač <mitr@redhat.com>
|
|
|
|
|
|
|
| |
Now syslog () without openlog () will include a correct PID value instead
of 0. Also reset the cache on closelog ().
Signed-off-by: Miloslav Trmač <mitr@redhat.com>
|
|
|
|
|
|
|
| |
This simplifies the syslog() path a little, and allows us to express
"PID should be cached but no value is set.".
Signed-off-by: Miloslav Trmač <mitr@redhat.com>
|
|
|
|
|
|
| |
None of the cache items is thread-specific.
Signed-off-by: Miloslav Trmač <mitr@redhat.com>
|
|
|
|
| |
... to be compatible with BSD syslog.
|
|
|
|
|
|
| |
... to match openlog(3p).
Signed-off-by: Miloslav Trmač <mitr@redhat.com>
|
|
|
|
|
|
|
| |
This is a glibc variable, so leave the "program" field missing on
platforms that don't support it.
Signed-off-by: Miloslav Trmač <mitr@redhat.com>
|
|
|
|
| |
Signed-off-by: Miloslav Trmač <mitr@redhat.com>
|
|
|
|
|
|
| |
... to comply with openlog(3p).
Signed-off-by: Miloslav Trmač <mitr@redhat.com>
|
|
|
|
|
|
|
| |
This is not defined by closelog(3p), and the BSD implementation doesn't
do it either.
Signed-off-by: Miloslav Trmač <mitr@redhat.com>
|
|
|
|
|
|
| |
... to comply with openlog(3p).
Signed-off-by: Miloslav Trmač <mitr@redhat.com>
|
|
|
|
|
|
| |
... to match openlog(3).
Signed-off-by: Miloslav Trmač <mitr@redhat.com>
|
|
|
|
|
|
|
|
| |
... to clarify its scope, and account for caches contained there. Next
commit will add per-process data, and having the smaller-scope structure
named "sys" would be confusing.
Signed-off-by: Miloslav Trmač <mitr@redhat.com>
|
|
|
|
|
|
|
| |
We don't use ranlib directly, libtool can - and does - do the check if
it needs to. This stops autoreconf -i from warning about it.
Signed-off-by: Gergely Nagy <algernon@balabit.hu>
|
|
|
|
| |
Signed-off-by: Gergely Nagy <algernon@balabit.hu>
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Call glibc's parse_printf_format() to gather information about
argument types. This automatically handles positional parameters and
user-defined printf formats for ordinary parameter types; it doesn't
handle user-defined printf parameter types (such as defined by libdfp
for decimal floating-point).
Also add a (non-comprehensive) test.
Signed-off-by: Miloslav Trmač <mitr@redhat.com>
Signed-off-by: Gergely Nagy <algernon@balabit.hu>
|
|
|
|
|
|
|
| |
Replace tabs introduced by the last couple of merged commits with
spaces.
Signed-off-by: Gergely Nagy <algernon@balabit.hu>
|
|
|
|
|
|
|
| |
Recognize more length modifiers. Document that positional parameters
are not supported (it should be possible, I'm just lazy :)).
Signed-off-by: Miloslav Trmač <mitr@redhat.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
glibc has a per-process, not per-thread, syslog mask, so the per-thread
mask in ul_sys_settings may end up desynchronized from the glibc mask,
breaking compatibility for LD_PRELOAD.
Just call setlogmask (0) to always read the glibc mask, and drop the
per-thread cache.
An alternative is to use a per-thread mask for ul_* calls and to use the
glibc mask for the LD_PRELOAD-overridden functions, but that seems to be
unnecessarily complex.
ul_setlogmask () is now a trivial wrapper, so we don't need to override
setlogmask () at all. We could also drop ul_setlogmask () completely,
but that would break the API.
Signed-off-by: Miloslav Trmač <mitr@redhat.com>
|
|
|
|
|
|
| |
Don't reset ul_recurse before exiting a recursive invocation.
Signed-off-by: Miloslav Trmač <mitr@redhat.com>
|
|
|
|
| |
Signed-off-by: Miloslav Trmač <mitr@redhat.com>
|
|
|
|
|
|
|
| |
The (res == NULL) check below should not be necessary per (info libc),
but doesn't hurt, so I have left it in.
Signed-off-by: Miloslav Trmač <mitr@redhat.com>
|