Marco Bettini [Tue, 5 Jul 2022 09:50:19 +0000 (09:50 +0000)]
lib-test: FUZZ_BEGIN_STR() - Replace NULs('\0') with backslashes '\\'
This is done so that the strings generated from fuzzer data always contain a
maximal length string. The presence of NULs creates aliases in the fuzz space
and makes less likely to generate very long NUL terminated strings.
The backslash is chosen instead of space as replacement because it is usually
a more troublesome character to handle.
Timo Sirainen [Mon, 9 May 2022 12:23:33 +0000 (15:23 +0300)]
auth: Fix handling passdbs with identical driver/args but different mechanisms/username_filter
The passdb was wrongly deduplicated in this situation, causing wrong
mechanisms or username_filter setting to be used. This would be a rather
unlikely configuration though.
Fixed by moving mechanisms and username_filter from struct passdb_module
to struct auth_passdb, which is where they should have been in the first
place.
Karl Fleischmann [Fri, 24 Jun 2022 07:45:15 +0000 (09:45 +0200)]
stat/event-exporter-fmt.c: Cast tv_usec value to unsigned int in rfc3339-time formatter
This commit prevents compilation warnings if tv_usec has a different
type than the assumed unsigned long (e.g. on macOS). This also makes the
rfc3339-time formatter consistent with the unix-time formatter for this
field.
Karl Fleischmann [Fri, 24 Jun 2022 06:07:09 +0000 (08:07 +0200)]
lib: Use size of size_t instead of data-model for bit-widths
This commit drops the generic and confusing data-model check (that
is a platform-specific value of bit-widths for various data types) in
favor of checking the actually used size (i.e. size_t).
Karl Fleischmann [Wed, 22 Jun 2022 08:02:35 +0000 (10:02 +0200)]
global: Replace madvise() with posix_madvise() function
To allow compilation on POSIX conformant systems this commit replaces
the non-standard madvise() call and it's advice-values with the posix
specific posix_madvise() and appropriate values.
Karl Fleischmann [Tue, 21 Jun 2022 12:50:11 +0000 (14:50 +0200)]
lib: Make pagesize-retrieval portable
The getpagesize() function has been deprecated in POSIX.1-2001. This
commit replaces the function call with the portable way to retrieve this
value at runtime. All callsites now use mmap_get_page_size() as the
canonical way to retrieve this value in this project.
Karl Fleischmann [Mon, 13 Jun 2022 13:10:53 +0000 (15:10 +0200)]
lib/compat.h: Remove workardound for dev_t comparisons
dev_t is defined by POSIX to be a number, and all supported systems
define major() and minor() at one place or the other, thus this commit
removes the workarounds.
Karl Fleischmann [Mon, 13 Jun 2022 12:32:52 +0000 (14:32 +0200)]
lib/compat.h: Remove HAVE_PREAD workaround
pread() should be included in the systems that we officially support (as
is required by defining _POSIX_C_SOURCE), there is no further need to
check for this function's existence or manual
re-implementations/workarounds.
Add macros to setup the compiler environment for a specific baseline,
this allows us to drop manual re-implementations of system-provided
functionality.
The base system is now required to supply a sensibly up-to-date compiler
suite/standard library that defines LLONG_MAX natively and thus this
manual re-definition can be dropped.
Karl Fleischmann [Thu, 16 Jun 2022 13:27:02 +0000 (15:27 +0200)]
m4: want_lua.m4 - Maintain code quality
This commit is mainly for making the lua-related macros consistent with
the rest of the configurations. No functional changes were made:
- Move lua argument registration into configure to be co-located with
other options,
- move lua conditionals into want_lua macro for increased consistency,
- rename parameter to "want_lua", and
- fix indentation.
Karl Fleischmann [Thu, 16 Jun 2022 13:24:38 +0000 (15:24 +0200)]
m4: want_lua.m4 - Fix pkg-config check
Make sure the configuration errors out when --with-lua is requested but
not viable library can be found. Previously this would lead to
compilation errors.
This commit adds manual gathering of compile/link-flags for older
distributions (namely CentOS7) that don't supply a pkg-config file in
their core repository package for postgresql.
This commit adds manual gathering of compile/link-flags for older
distributions (namely CentOS7) that don't supply a pkg-check file in
their core repository package for mysql/mariadb.
Manually checking for headers/libraries requires the user to know and
pass non-default library-paths when configuring the project. Using
pkg_config simplifies the macro and automatically sets the
compiler/linker flags accordingly.
Manually checking for headers/libraries requires the user to know and
pass non-default library-paths when configuring the project. Using
pkg_config simplifies the macro and automatically sets the
compiler/linker flags accordingly.
Manually checking for headers/libraries requires the user to know and
pass non-default library-paths when configuring the project. Using
pkg_config simplifies the macro and automatically sets the
compiler/linker flags accordingly.
Manually checking for headers/libraries requires the user to know and
pass non-default library-paths when configuring the project. Using
pkg_config simplifies the macro and automatically sets the
compiler/linker flags accordingly.
Manually checking for headers/libraries requires the user to know and
pass non-default library-paths when configuring the project. Using
pkg_config simplifies the macro and automatically sets the
compiler/linker flags accordingly.
Manually checking for headers/libraries requires the user to know and
pass non-default library-paths when configuring the project. Using
pkg_config simplifies the macro and automatically sets the
compiler/linker flags accordingly.
Manually checking for headers/libraries requires the user to know and
pass non-default library-paths when configuring the project. Using
pkg_config simplifies the macro and automatically sets the
compiler/linker flags accordingly.
Manually checking for headers/libraries requires the user to know and
pass non-default library-paths when configuring the project. Using
pkg_config simplifies the macro and automatically sets the
compiler/linker flags accordingly.