dbus/test/internals
Luca Boccassi 80d523dcc8 DBusCredentials: add support for PID FDs via SO_PEERPIDFD
The new socket option SO_PEERPIDFD allows to pin the process on the
other side of the socket by file descriptor, which closes a race
condition where a PID can be reused before we can pin it manually.
Available since Linux v6.5.

When storing credentials, pin the process by FD from the PID.
When querying the PID, if the PID FD is available, resolve
it from there first if possible.

Ensure the DBusCredentials object only returns the PID FD if it was
obtained by this call, so that we know for sure we can rely on it
being safe against PID reuse attacks.

Signed-off-by: Luca Boccassi <bluca@debian.org>
2023-08-08 12:24:20 +01:00
..
address.c Add SPDX license marker for the AFL-2.1 OR GPL-2.0-or-later license 2023-01-04 07:53:44 +00:00
assertions.c test: fix unused variable warnings 2022-05-19 17:57:31 +02:00
atomic.c Add a trivial sanity-check for the atomic primitives 2019-12-13 16:13:53 +01:00
counter.c Add multithreaded unit test for DBusCounter to available build systems 2023-01-05 16:43:55 +01:00
dbus-auth-script.c Add SPDX license marker for the AFL-2.1 OR GPL-2.0-or-later license 2023-01-04 07:53:44 +00:00
dbus-auth-script.h Add SPDX license marker for the AFL-2.1 OR GPL-2.0-or-later license 2023-01-04 07:53:44 +00:00
dbus-auth-util.c Add SPDX license marker for the AFL-2.1 OR GPL-2.0-or-later license 2023-01-04 07:53:44 +00:00
dbus-credentials-util.c DBusCredentials: add support for PID FDs via SO_PEERPIDFD 2023-08-08 12:24:20 +01:00
dbus-marshal-byteswap-util.c Add SPDX license marker for the AFL-2.1 OR GPL-2.0-or-later license 2023-01-04 07:53:44 +00:00
dbus-marshal-recursive-util.c Add SPDX license marker for the AFL-2.1 OR GPL-2.0-or-later license 2023-01-04 07:53:44 +00:00
dbus-marshal-recursive-util.h Add SPDX license marker for the AFL-2.1 OR GPL-2.0-or-later license 2023-01-04 07:53:44 +00:00
dbus-marshal-validate-util.c Add SPDX license marker for the AFL-2.1 OR GPL-2.0-or-later license 2023-01-04 07:53:44 +00:00
dbus-message-factory.c Add SPDX license marker for the AFL-2.1 OR GPL-2.0-or-later license 2023-01-04 07:53:44 +00:00
dbus-message-factory.h Add SPDX license marker for the AFL-2.1 OR GPL-2.0-or-later license 2023-01-04 07:53:44 +00:00
dbus-message-util.c Add SPDX license marker for the AFL-2.1 OR GPL-2.0-or-later license 2023-01-04 07:53:44 +00:00
dbus-message-util.h Add SPDX license marker for the AFL-2.1 OR GPL-2.0-or-later license 2023-01-04 07:53:44 +00:00
dbus-string-util.c Add SPDX license marker for the AFL-2.1 OR GPL-2.0-or-later license 2023-01-04 07:53:44 +00:00
dbus-sysdeps-util.c Add SPDX license marker for the AFL-2.1 OR GPL-2.0-or-later license 2023-01-04 07:53:44 +00:00
desktop-file.c desktop-file test: Free result on all code paths 2020-04-27 12:39:35 +00:00
hash.c dbus-hash: Add (AFL-2.1 OR GPL-2.0-or-later) AND TCL SPDX license identifier 2022-11-29 13:33:53 +00:00
marshal-recursive.c Add SPDX license marker for the AFL-2.1 OR GPL-2.0-or-later license 2023-01-04 07:53:44 +00:00
mempool.c Add SPDX license marker for the AFL-2.1 OR GPL-2.0-or-later license 2023-01-04 07:53:44 +00:00
message-internals.c Add SPDX license marker for the AFL-2.1 OR GPL-2.0-or-later license 2023-01-04 07:53:44 +00:00
misc-internals.c Add SPDX license marker for the AFL-2.1 OR GPL-2.0-or-later license 2023-01-04 07:53:44 +00:00
misc-internals.h Add SPDX license marker for the AFL-2.1 OR GPL-2.0-or-later license 2023-01-04 07:53:44 +00:00
printf.c build: Define DBUS_INT64_MODIFIER, analogous to G_GINT64_MODIFIER 2022-04-19 18:27:47 +00:00
refs.c Increase the number of references/threads to be tested under Windows by default to detect errors 2018-12-14 11:04:21 +01:00
server-oom.c test: enable AF_UNIX server-oom test on !unix 2022-07-15 16:26:54 +01:00
sha.c Add SPDX license marker for the AFL-2.1 OR GPL-2.0-or-later license 2023-01-04 07:53:44 +00:00
spawn-oom.c Add SPDX license marker for the AFL-2.1 OR GPL-2.0-or-later license 2023-01-04 07:53:44 +00:00
strings.c Add test for _dbus_string_skip_blank() 2023-02-08 12:03:19 +00:00
sysdeps.c test: Add basic test coverage for _dbus_close_all and friends 2022-04-21 11:02:44 +01:00
syslog.c syslog test: Don't assert that we see plain LF newlines 2018-12-05 15:27:43 +01:00
variant.c tests: Call dbus_shutdown() 2018-08-02 17:14:39 +01:00