glib2: Fix GCredentials support for NetBSD The GCredentials support for NetBSD missed a G_CREDENTIALS_SOCKET_GET_CREDENTIALS_SUPPORTED define and remove commented out G_CREDENTIALS_UNIX_CREDENTIALS_MESSAGE_SUPPORTED. Due that the client sent credentials but the server was not able to receive them. Regarding possible G_CREDENTIALS_UNIX_CREDENTIALS_MESSAGE_SUPPORTED support probably logic for LOCAL_CREDS should be added but on NetBSD before 8.0 sc_pid field is not present making that probably not suitable to use as GCredentials mechanism (since 8.0 this will probably work). Bump PKGREVISION Index: Makefile =================================================================== RCS file: /cvsroot/pkgsrc/devel/glib2/Makefile,v retrieving revision 1.243 diff -u -p -r1.243 Makefile --- Makefile 8 Oct 2018 10:12:05 -0000 1.243 +++ Makefile 12 Oct 2018 09:17:33 -0000 @@ -1,6 +1,6 @@ # $NetBSD: Makefile,v 1.243 2018/10/08 10:12:05 prlw1 Exp $ -PKGREVISION= 2 +PKGREVISION= 3 .include "Makefile.common" CATEGORIES= devel gnome Index: distinfo =================================================================== RCS file: /cvsroot/pkgsrc/devel/glib2/distinfo,v retrieving revision 1.236 diff -u -p -r1.236 distinfo --- distinfo 8 Oct 2018 10:12:05 -0000 1.236 +++ distinfo 12 Oct 2018 09:17:33 -0000 @@ -17,10 +17,12 @@ SHA1 (patch-cb) = 56e2a9b2de04c8e528faf7 SHA1 (patch-cd) = a8a90eca84a687400a92b0e26fafe4b9b6014ec3 SHA1 (patch-cl) = 58e5b4a3e8cf0750ceadba30e379954d800f77f7 SHA1 (patch-cm) = 534af37ae8f2bd667f630142058d4de5ea91be93 +SHA1 (patch-gio_gcredentialsprivate.h) = dab92e07f8357a7dc1a569e37f65f9b199aee281 SHA1 (patch-gio_gdbus-2.0_codegen_gdbus-codegen.in) = ccbb10335fb477e347993444d68d5e88d9e93050 SHA1 (patch-gio_giomodule.c) = 08181ad8d46dde1a028faa246a4852e474610eaa SHA1 (patch-gio_glocalfileinfo.c) = 8e0b7e9543ce3c702c468f56e7ecf418d70b049f SHA1 (patch-gio_gresource-tool.c) = 4eb7c9df25e9ac3e977edf3be8fb977a6fb39182 +SHA1 (patch-gio_gunixcredentialsmessage.c) = c13119ddd6262db7c03e53857e987f0c495d3312 SHA1 (patch-gio_inotify_inotify-kernel.c) = 18fc55be06dfa4ebf7128b8d1888aaff3b2b95c0 SHA1 (patch-glib_gmain.c) = d09ff66e475ee52d37ac0dcb463110f690ce6511 SHA1 (patch-glib_gthread-posix.c) = ca93c8dc358453eb79b518c884464c90d7628888 Index: patches/patch-gio_gcredentialsprivate.h =================================================================== RCS file: patches/patch-gio_gcredentialsprivate.h diff -N patches/patch-gio_gcredentialsprivate.h --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ patches/patch-gio_gcredentialsprivate.h 12 Oct 2018 09:17:33 -0000 @@ -0,0 +1,15 @@ +$NetBSD$ + +NetBSD has G_CREDENTIALS_SOCKET_GET_CREDENTIALS_SUPPORTED. + +--- gio/gcredentialsprivate.h.orig 2017-07-13 23:03:38.000000000 +0000 ++++ gio/gcredentialsprivate.h +@@ -47,7 +47,7 @@ + #define G_CREDENTIALS_USE_NETBSD_UNPCBID 1 + #define G_CREDENTIALS_NATIVE_TYPE G_CREDENTIALS_TYPE_NETBSD_UNPCBID + #define G_CREDENTIALS_NATIVE_SIZE (sizeof (struct unpcbid)) +-/* #undef G_CREDENTIALS_UNIX_CREDENTIALS_MESSAGE_SUPPORTED */ ++#define G_CREDENTIALS_SOCKET_GET_CREDENTIALS_SUPPORTED 1 + #define G_CREDENTIALS_SPOOFING_SUPPORTED 1 + + #elif defined(__OpenBSD__) Index: patches/patch-gio_gunixcredentialsmessage.c =================================================================== RCS file: patches/patch-gio_gunixcredentialsmessage.c diff -N patches/patch-gio_gunixcredentialsmessage.c --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ patches/patch-gio_gunixcredentialsmessage.c 12 Oct 2018 09:17:33 -0000 @@ -0,0 +1,18 @@ +$NetBSD$ + +Remove unused NetBSD case (G_CREDENTIALS_TYPE_NETBSD_UNPCBID does +not support that, LOCAL_CREDS should be probably be used instead. +Please not that before NetBSD 8.0 LOCAL_CREDS did not have an sc_pid +field making it probably not suitable as GCredentials mechanism). + +--- gio/gunixcredentialsmessage.c.orig 2017-07-13 23:03:39.000000000 +0000 ++++ gio/gunixcredentialsmessage.c +@@ -89,8 +89,6 @@ g_unix_credentials_message_get_msg_type + return SCM_CREDENTIALS; + #elif G_CREDENTIALS_USE_FREEBSD_CMSGCRED + return SCM_CREDS; +-#elif G_CREDENTIALS_USE_NETBSD_UNPCBID +- return SCM_CREDS; + #elif G_CREDENTIALS_USE_SOLARIS_UCRED + return SCM_UCRED; + #elif G_CREDENTIALS_UNIX_CREDENTIALS_MESSAGE_SUPPORTED