| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
| |
|
| |
|
|
|
|
| |
This reverts commit dc4a6eaddbb36a344cc6a9c7eb12cab9df4899b0.
|
|
|
|
| |
This reverts commit 50f8906e63c9413a7687bab6608496d83c29a222.
|
|
|
|
| |
This reverts commit ce3cec7f8742254b8627b9db48973b81e91cbfc8.
|
|
|
|
| |
This reverts commit 541d79cb651cfd3238b9aa41fce70208df8e9496.
|
|
|
|
|
|
|
|
| |
On non-glibc systems (e.g., FreeBSD), pthread_atfork() stub is
provided as a nop and our fork detection mechanism doesn't work. Pull
in the actual implementation from libpthread in that case.
Signed-off-by: Daiki Ueno <dueno@redhat.com>
|
| |
|
| |
|
| |
|
|
|
|
|
| |
This eliminates the unconditional use of pthread_{get,set}specific()
and pthread_key_{create,delete}(), which glibc doesn't provide the stubs.
|
|
|
|
|
| |
Some test programs use pthread_create(), which glibc doesn't provide
the stub. Link those programs with -lpthread.
|
|
|
|
|
|
| |
On NetBSD, reallocarray is not declared until _OPENBSD_SOURCE is
defined. Reported by Patrick Welche in:
https://lists.freedesktop.org/archives/p11-glue/2018-July/000691.html
|
|
|
|
|
|
|
|
|
|
|
| |
This enables socket activation of "p11-kit server" through systemd.
The feature provided is essentially the same as commit
a4fb2bb5 (reverted), but implemented with "p11-kit server" and
libsystemd API instead of wrapping "p11-kit remote" in the unit file.
Note that, while it exposes all tokens through the socket, it doesn't
increase attack surface beyond the PKCS#11 binary interface provided
by p11-kit-proxy.so, because the service is per-user.
|
|
|
|
|
|
|
|
|
| |
When cross-compiling, the configure check for issetugid() aborts,
because of the pessimistic default of AC_RUN_IFELSE. This patch
provides the non-pessimistic default to AC_RUN_IFELSE and wrap the
macro invocation with AC_CACHE_CHECK so that the user can override the
check by setting ac_cv_issetugid_openbsd=yes, as suggested in:
https://www.gnu.org/savannah-checkouts/gnu/autoconf/manual/autoconf-2.69/html_node/Runtime.html#Runtime
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
On macOS and FreeBSD, issetugid() has different semantics from the
original OpenBSD implementation and cannot reliably detect if the
process made setuid/setgid:
https://gist.github.com/nicowilliams/4daf74a3a0c86848d3cbd9d0cdb5e26e
This should fix:
https://bugs.freedesktop.org/show_bug.cgi?id=67451
https://bugs.freedesktop.org/show_bug.cgi?id=100287
|
|
|
|
|
|
| |
On macOS, locale_t is not defined in <locale.h>. Although it is
defined in <xlocale.h>, we rather not use locales at all for POSIX
compliance.
|
| |
|
| |
|
|
|
|
|
|
|
|
|
| |
This reverts commit 173ad93cc54057886b2055f3d73ea64a047127d1.
We should rather use newlocale() when per-thread locale is not set.
Otherwise uselocale() could return LC_GLOBAL_LOCALE on some
platforms (e.g. musl-libc) and calling strerror_l() with it leads to
an undefined behavior.
|
|
|
|
|
|
| |
NetBSD deliberately doesn't support per-thread locale and our
thread-safe replacement of strerror() using strerror_l() cannot be
used. Fallback to strerror_r() in that case.
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
|
|
|
|
|
| |
reallocarray is a new POSIX function added in glibc 2.26, with
built-in overflow checks. Take advantage of that function for
internal array allocation.
|
|
|
|
| |
Solaris can retrieve this information via getpeerucred().
|
|
|
|
| |
Solaris has socket() etc. in these two libs.
|
|
|
|
|
|
| |
This reverts commit 6b457ffc, which forbids the use of GNU extension
for the incompatibility of strerror_r. However, now that strerror_l
is used instead on glibc systems, it has no point to do that.
|
|
|
|
|
| |
strerror_r is being obsolete in the next POSIX specification:
http://austingroupbugs.net/view.php?id=655
|
| |
|
| |
|
| |
|
| |
|
| |
|
|
|
|
|
| |
The p11-kit-remote executable is now located under $libexecdir, but we
should use the p11-kit command to launch the subcommand.
|
|
|
|
|
|
| |
In common/unix-peer.c, we are checking if HAVE_GETPEEREID is defined,
however, we never actually check if getpeereid() is available, so
fix that by checking this function using AC_CHECK_FUNCS().
|
| |
|
|
|
|
|
|
|
|
| |
This adds a new tool to the p11-kit command called 'server', which
allows us to access a PKCS#11 module over a Unix domain socket.
Internally, it is implemented as a wrapper around 'p11-kit remote'.
Upon connection it executes 'p11-kit remote' in a forked process.
|
|
|
|
| |
Append EXEEXT or SHLEXT to the filename if needed.
|
| |
|
|
|
|
|
|
|
|
| |
libffi's closure support is not available on all platforms and may fail
at run time if running under a stricter SELinux policy. Fallback to
pre-compiled closures if it is not usable.
https://bugs.freedesktop.org/show_bug.cgi?id=97611
|
|
|
|
|
|
| |
This allows daemons outside user's session to use per-user PKCS#11
modules. Useful for letting VPN daemons or wpa_supplicant use
certificates stored in user's GNOME keyring, etc.
|
| |
|