Age | Commit message (Collapse) | Author |
|
1. fix the handling of the fallbacks in getprogname
i.e. actually use the fallback
2. add a check for __progname too
See https://github.com/omar-polo/gmid/issues/35
|
|
gcc has a broken error checking for 'use-after-free' that can be triggered
by perfectly valid code. Since it's in a function (stravis) we don't use,
comment it out.
|
|
|
|
|
|
unfortunately that's not portable. config.h will include the right
stuff however.
|
|
|
|
|
|
on macos we have the situation where we have arc4random available
but no getentropy().
|
|
it's not used (we define OPENSSL_PRNG_ONLY) and fails the build
with -Werror. Keep the function commented instead of deleting it
just in case we need to undefine OPENSSL_PRNG_ONLY in the future.
|
|
gmid (like all other daemons that want to do privsep crypto) has a
very close relationship with libtls and need to stay in sync with
it.
OpenBSD' libtls was recently changed to use OpenSSL' EC_KEY_METHOD
instead of the older ECDSA_METHOD, on the gmid side we have to do
the same otherwise failures happens at runtime. In a similar manner,
privsep crypto is silently broken in the current libretls (next
version should fix it.)
The proper solution would be to complete the signer APIs so that
applications don't need to dive into the library' internals, but
that's a mid-term goal, for the immediate bundling the 'little'
libtls is the lesser evil.
The configure script has gained a new (undocumented for the time
being) flag `--with-libtls=bundled|system' to control which libtls
to use. It defaults to `bundled' except for OpenBSD where it uses
the `system' one. Note that OpenBSD versions before 7.3 (inclusive)
ought to use --with-libtls=bundled too since they still do ECDSA_METHOD.
|
|
|
|
breaks the build with -Werror depending on the compiler.
|
|
Doesn't seem to be available on many systems. It is also not strictly
needed since we include vis.h only after headers like stdlib.h that
already pulls in the type it needs.
|
|
strnvis originates on OpenBSD. When NetBSD added it to their libc
they decided to swap the argument. Without starting a holy war on
the "best" argument order, adding an implementation of a function
that's widely available and making its signature purposefully
incompatible is beyond justification. FreeBSD (and so macos too?)
followed NetBSD in this, so we end up with *two* major and incompatible
strnvis implementations. libbsd is in a limbo, they started with
the OpenBSD version but they'll probably switch to the NetBSD version
in the future.
That's why we can't have nice things.
Do the right thing(tm) and check for the presence of the original
strnvis(3), if not available or broken use the bundled one.
|
|
|
|
otherwise we get a nice 'no previous prototype' due to
-Wmissing-prototypes.
|
|
now it resembles less oconfigure and more the configure scripts I'm
using in my recent projects. I'd argue it's more easy to use it.
|
|
|
|
|
|
|
|
HAVE_PROGRAM_INVOCATION_SHORT_NAME is always defined; look at wether
it's zero or not.
|
|
original commit from eric@:
change the barrier so that fd's are always passed and received with
the first byte of the imsg they belong to.
idea, tweaks and ok claudio@
|
|
original commit from claudio@:
Type-cast getpagesize() from int to size_t for the comparison with d.
getpagesize() will only return positive numbers (there is no negative
page size system) and it can not fail.
Should fix some compiler warnings seen in -portable projects.
OK otto@
|
|
Passing a NULL pointer to memcpy is UB no matter if len is 0 (commit by
claudio@, backporting for gmid.)
|
|
|
|
|
|
|
|
|
|
|
|
but why'd they called it program_invocation_short_name? They couldn't
find a longer name?
|
|
This adds a check for setproctitle and for the (linux) prctl
PR_SET_NAME. If setproctitle is not available, on linux we provide an
implementation that use prctl (taken from tmux compat layer.)
|
|
include headers if needed and include config.h
|
|
|
|
|
|
|
|
tested on openbsd, alpine and void
|