ports/139160: update port: devel/dbus This fixes dbus on systems using nss_ldap for users that are members of more than 16 groups.

Zane C.B. vvelox at vvelox.net
Sat Sep 26 18:40:07 UTC 2009


>Number:         139160
>Category:       ports
>Synopsis:       update port: devel/dbus   This fixes dbus on systems using nss_ldap for users that are members of more than 16 groups.
>Confidential:   no
>Severity:       critical
>Priority:       high
>Responsible:    freebsd-ports-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Sat Sep 26 18:40:06 UTC 2009
>Closed-Date:
>Last-Modified:
>Originator:     Zane C.B.
>Release:        FreeBSD 7.2-STABLE i386
>Organization:
>Environment:


System: FreeBSD 7.2-STABLE #2: Tue Sep 22 17:59:50 CDT 2009
    root at vixen42.vulpes:/usr/obj/usr/src/sys/GENERIC



>Description:


This bug is related entirely to either a bug in nss_ldap or some of the group stuff in the base system. I am not sure which. This patch provides a work around for systems using nss_ldap on systems with a non-standard, greater than 16, value for NGROUPS_MAX.


>How-To-Repeat:


1: Find a system using "net/nss_ldap".
2: Recompile the kernel with a larger NGROUP_MAX value.
3: Add a user in LDAP to more than 17 groups via LDAP.
4: Run "dbus-laucnh" and watch it error with a message about not being able to get user info.
5: Apply the patch to "devel/dbus/files/patch-dbus_dbus-sysdeps-unix.c".
6: Recompile "devel/dbus".
7: Reinstall "devel/dbus".
8: Rerun the test and watch it work.


>Fix:


--- devel_dbus_Makefile.diff begins here ---
--- Makefile.orig	2009-09-26 00:42:11.000000000 -0500
+++ Makefile	2009-09-26 00:42:18.000000000 -0500
@@ -7,7 +7,7 @@
 
 PORTNAME=	dbus
 PORTVERSION?=	1.2.4.6
-PORTREVISION?=	1
+PORTREVISION?=	2
 CATEGORIES=	devel gnome
 MASTER_SITES=	http://dbus.freedesktop.org/releases/dbus/
 DISTNAME=	dbus-${PORTVERSION}permissive
--- devel_dbus_Makefile.diff ends here ---


--- devel_dbus_files_patch-dbus_dbus-sysdeps-unix.c.diff begins here ---
--- files/orig.patch-dbus_dbus-sysdeps-unix.c	2009-09-26 00:33:25.000000000 -0500
+++ files/patch-dbus_dbus-sysdeps-unix.c	2009-09-26 00:37:18.000000000 -0500
@@ -1,6 +1,14 @@
---- dbus/dbus-sysdeps-unix.c.orig	2008-08-06 13:00:29.000000000 -0400
-+++ dbus/dbus-sysdeps-unix.c	2008-08-10 15:04:32.000000000 -0400
-@@ -1041,9 +1041,9 @@ write_credentials_byte (int             
+--- dbus/dbus-sysdeps-unix.c.old	2009-09-26 00:35:27.000000000 -0500
++++ dbus/dbus-sysdeps-unix.c	2009-09-26 00:37:08.000000000 -0500
+@@ -54,6 +54,7 @@
+ #include <netinet/in.h>
+ #include <netdb.h>
+ #include <grp.h>
++#include <sys/syslimits.h>
+ 
+ #ifdef HAVE_ERRNO_H
+ #include <errno.h>
+@@ -1041,9 +1042,9 @@
    int bytes_written;
    char buf[1] = { '\0' };
  #if defined(HAVE_CMSGCRED) 
@@ -12,7 +20,7 @@
    } cmsg;
    struct iovec iov;
    struct msghdr msg;
-@@ -1054,10 +1054,10 @@ write_credentials_byte (int             
+@@ -1054,10 +1055,10 @@
    msg.msg_iov = &iov;
    msg.msg_iovlen = 1;
  
@@ -26,7 +34,7 @@
    cmsg.hdr.cmsg_level = SOL_SOCKET;
    cmsg.hdr.cmsg_type = SCM_CREDS;
  #endif
-@@ -1133,9 +1133,9 @@ _dbus_read_credentials_socket  (int     
+@@ -1133,9 +1134,9 @@
    pid_read = DBUS_PID_UNSET;
    
  #ifdef HAVE_CMSGCRED 
@@ -38,7 +46,7 @@
    } cmsg;
  
  #elif defined(LOCAL_CREDS)
-@@ -1172,8 +1172,8 @@ _dbus_read_credentials_socket  (int     
+@@ -1172,8 +1173,8 @@
  
  #if defined(HAVE_CMSGCRED) || defined(LOCAL_CREDS)
    memset (&cmsg, 0, sizeof (cmsg));
@@ -49,7 +57,7 @@
  #endif
  
   again:
-@@ -1211,7 +1211,8 @@ _dbus_read_credentials_socket  (int     
+@@ -1211,7 +1212,8 @@
      }
  
  #if defined(HAVE_CMSGCRED) || defined(LOCAL_CREDS)
@@ -59,7 +67,7 @@
      {
        dbus_set_error (error, DBUS_ERROR_FAILED,
                        "Message from recvmsg() was not SCM_CREDS");
-@@ -1238,8 +1239,11 @@ _dbus_read_credentials_socket  (int     
+@@ -1238,8 +1240,11 @@
  		       cr_len, (int) sizeof (cr), _dbus_strerror (errno));
        }
  #elif defined(HAVE_CMSGCRED)
@@ -73,3 +81,12 @@
  #elif defined(LOCAL_CREDS)
      pid_read = DBUS_PID_UNSET;
      uid_read = cmsg.cred.sc_uid;
+@@ -1592,7 +1597,7 @@
+     int buf_count;
+     int i;
+     
+-    buf_count = 17;
++    buf_count = NGROUPS_MAX + 1;
+     buf = dbus_new (gid_t, buf_count);
+     if (buf == NULL)
+       {
--- devel_dbus_files_patch-dbus_dbus-sysdeps-unix.c.diff ends here ---



>Release-Note:
>Audit-Trail:
>Unformatted:



More information about the freebsd-ports-bugs mailing list