From 964f5512c8314fa7d9b9d6689d652a80bc545411 Mon Sep 17 00:00:00 2001 From: Simon McVittie Date: Tue, 12 Feb 2013 13:44:00 +0000 Subject: [PATCH 3/3] Unix credentials-passing: emit a #error if we can't, on known-good platforms We know that D-Bus works well, with credentials-passing and GDBus interoperability, on Linux, FreeBSD and OpenBSD. If someone builds libdbus on these platforms and it ends up without credentials-passing support, then that build is broken and uninteroperable, and we should consider it a bug. --- dbus/dbus-sysdeps-unix.c | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/dbus/dbus-sysdeps-unix.c b/dbus/dbus-sysdeps-unix.c index 2b78227..0b518dc 100644 --- a/dbus/dbus-sysdeps-unix.c +++ b/dbus/dbus-sysdeps-unix.c @@ -1901,6 +1901,16 @@ _dbus_read_credentials_socket (int client_fd, #warning Socket credentials not supported on this Unix OS +/* Please add other operating systems known to support at least one of + * the mechanisms above to this list, keeping alphabetical order. + * Everything else is best-effort. + */ +#if defined(__FreeBSD__) || defined(__FreeBSD_kernel__) || \ + defined(__linux__) || \ + defined(__OpenBSD__) +# error We really ought to support credentials on this OS! +#endif + _dbus_verbose ("Socket credentials not supported on this OS\n"); #endif } -- 1.7.10.4