pkgsrc-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[pkgsrc/trunk]: pkgsrc/devel/glib2 glib2: Fix GCredentials support for NetBSD



details:   https://anonhg.NetBSD.org/pkgsrc/rev/4ed1079aaaa6
branches:  trunk
changeset: 324447:4ed1079aaaa6
user:      leot <leot%pkgsrc.org@localhost>
date:      Fri Oct 19 16:44:15 2018 +0000

description:
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

Discussed with <prlw1>, thanks!

diffstat:

 devel/glib2/Makefile                                    |   4 +-
 devel/glib2/distinfo                                    |   4 ++-
 devel/glib2/patches/patch-gio_gcredentialsprivate.h     |  15 ++++++++++++++
 devel/glib2/patches/patch-gio_gunixcredentialsmessage.c |  18 +++++++++++++++++
 4 files changed, 38 insertions(+), 3 deletions(-)

diffs (75 lines):

diff -r 922e98f0c805 -r 4ed1079aaaa6 devel/glib2/Makefile
--- a/devel/glib2/Makefile      Fri Oct 19 16:12:36 2018 +0000
+++ b/devel/glib2/Makefile      Fri Oct 19 16:44:15 2018 +0000
@@ -1,6 +1,6 @@
-# $NetBSD: Makefile,v 1.243 2018/10/08 10:12:05 prlw1 Exp $
+# $NetBSD: Makefile,v 1.244 2018/10/19 16:44:15 leot Exp $
 
-PKGREVISION= 2
+PKGREVISION= 3
 .include "Makefile.common"
 
 CATEGORIES=            devel gnome
diff -r 922e98f0c805 -r 4ed1079aaaa6 devel/glib2/distinfo
--- a/devel/glib2/distinfo      Fri Oct 19 16:12:36 2018 +0000
+++ b/devel/glib2/distinfo      Fri Oct 19 16:44:15 2018 +0000
@@ -1,4 +1,4 @@
-$NetBSD: distinfo,v 1.236 2018/10/08 10:12:05 prlw1 Exp $
+$NetBSD: distinfo,v 1.237 2018/10/19 16:44:15 leot Exp $
 
 SHA1 (glib-2.56.2.tar.xz) = 8b18a92f81a8d033abfb43a628bae3bbaf71800c
 RMD160 (glib-2.56.2.tar.xz) = 8fe9fd51a84ebe0f61b5cb2ab97325baa51c4eb3
@@ -17,10 +17,12 @@
 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
diff -r 922e98f0c805 -r 4ed1079aaaa6 devel/glib2/patches/patch-gio_gcredentialsprivate.h
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/devel/glib2/patches/patch-gio_gcredentialsprivate.h       Fri Oct 19 16:44:15 2018 +0000
@@ -0,0 +1,15 @@
+$NetBSD: patch-gio_gcredentialsprivate.h,v 1.3 2018/10/19 16:44:15 leot Exp $
+
+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__)
diff -r 922e98f0c805 -r 4ed1079aaaa6 devel/glib2/patches/patch-gio_gunixcredentialsmessage.c
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/devel/glib2/patches/patch-gio_gunixcredentialsmessage.c   Fri Oct 19 16:44:15 2018 +0000
@@ -0,0 +1,18 @@
+$NetBSD: patch-gio_gunixcredentialsmessage.c,v 1.3 2018/10/19 16:44:15 leot Exp $
+
+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



Home | Main Index | Thread Index | Old Index