openbsd-ports/x11/dbus/patches/patch-dbus_dbus-sysdeps-unix_c
ajacoutot e496b830fc Make use of getsockopt(2) SO_PEERCRED.
This fixes GetConnectionUnixProcessID().

Requires a very current current...
2010-06-30 20:48:57 +00:00

16 lines
507 B
Plaintext

$OpenBSD: patch-dbus_dbus-sysdeps-unix_c,v 1.5 2010/06/30 20:48:57 ajacoutot Exp $
--- dbus/dbus-sysdeps-unix.c.orig Tue Mar 23 20:01:27 2010
+++ dbus/dbus-sysdeps-unix.c Wed Jun 30 21:41:34 2010
@@ -1224,7 +1224,11 @@ _dbus_read_credentials_socket (int clien
{
#ifdef SO_PEERCRED
+#ifndef __OpenBSD__
struct ucred cr;
+#else
+ struct sockpeercred cr;
+#endif
int cr_len = sizeof (cr);
if (getsockopt (client_fd, SOL_SOCKET, SO_PEERCRED, &cr, &cr_len) == 0 &&