From nobody@FreeBSD.org  Tue Feb 24 03:47:40 2004
Return-Path: <nobody@FreeBSD.org>
Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125])
	by hub.freebsd.org (Postfix) with ESMTP id 6BB8716A4CE
	for <freebsd-gnats-submit@FreeBSD.org>; Tue, 24 Feb 2004 03:47:40 -0800 (PST)
Received: from www.freebsd.org (www.freebsd.org [216.136.204.117])
	by mx1.FreeBSD.org (Postfix) with ESMTP id 648F443D1F
	for <freebsd-gnats-submit@FreeBSD.org>; Tue, 24 Feb 2004 03:47:40 -0800 (PST)
	(envelope-from nobody@FreeBSD.org)
Received: from www.freebsd.org (localhost [127.0.0.1])
	by www.freebsd.org (8.12.10/8.12.10) with ESMTP id i1OBle72037642
	for <freebsd-gnats-submit@FreeBSD.org>; Tue, 24 Feb 2004 03:47:40 -0800 (PST)
	(envelope-from nobody@www.freebsd.org)
Received: (from nobody@localhost)
	by www.freebsd.org (8.12.10/8.12.10/Submit) id i1OBleZV037641;
	Tue, 24 Feb 2004 03:47:40 -0800 (PST)
	(envelope-from nobody)
Message-Id: <200402241147.i1OBleZV037641@www.freebsd.org>
Date: Tue, 24 Feb 2004 03:47:40 -0800 (PST)
From: Henri Michelon <hmichelon@e-cml.org>
To: freebsd-gnats-submit@FreeBSD.org
Subject: Velovity doesn't use the full list of groups on FreeBSD
X-Send-Pr-Version: www-2.3

>Number:         63302
>Category:       ports
>Synopsis:       Velocity doesn't use the full list of groups on FreeBSD
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-ports-bugs
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Tue Feb 24 03:50:15 PST 2004
>Closed-Date:    Mon Mar 01 10:31:35 PST 2004
>Last-Modified:  Mon Mar 01 10:31:35 PST 2004
>Originator:     Henri Michelon
>Release:        5.2-RELEASE
>Organization:
ECML
>Environment:
FreeBSD fo01 5.2.1-RC2 FreeBSD 5.2.1-RC2 #7: Wed Feb 11 11:02:39 MET 2004     root@fo01:/usr/src/sys/i386/compile/PXEKERNEL  i386
>Description:
Velovity doesn't use the full list of groups, it only use getgid(). This patch haven't been sent to velocity's author since it use the getgroups() BSD call and I don't known if it works under others OSes. It's a BSD only patch.
>How-To-Repeat:
Run velocity
>Fix:
--- src/velocity-vfs.c.orig     Tue Feb 24 12:28:14 2004
+++ src/velocity-vfs.c  Tue Feb 24 12:40:39 2004
@@ -31,6 +31,7 @@
 #include <config.h>
 #include <unistd.h>
 #include <sys/types.h>
+#include <sys/param.h> /* for NGROUPS */
 #include <glib.h>
 #include <libgnome/gnome-desktop-item.h>
 #include "velocity-vfs.h"
@@ -240,7 +241,18 @@
        return((vfsobj->info->uid==getuid()));
 }
 gboolean velocity_vfs_is_in_group(velocity_vfs_obj*vfsobj){
-       return ((vfsobj->info->gid==getgid()));
+/* 24 feb 2004 : Henri Michelon hmichelon at e-cml dot org
+   A patch to use the full list of groups on *BSD */
+  int cnt, ngroups;
+  gid_t groups[NGROUPS];
+  if ((ngroups = getgroups(NGROUPS, groups))) {
+    for (cnt = 0; cnt < ngroups; cnt++) {
+        if (vfsobj->info->gid==groups[cnt]) {
+          return(TRUE);
+        }
+    }
+  }
+  return(FALSE);
 }
 gboolean velocity_vfs_is_local(velocity_vfs_obj*vfsobj){
        return(GNOME_VFS_FILE_INFO_LOCAL(vfsobj->info));

>Release-Note:
>Audit-Trail:
State-Changed-From-To: open->feedback  
State-Changed-By: krion 
State-Changed-When: Tue Feb 24 06:56:11 PST 2004 
State-Changed-Why:  
Asked for maintainer's feedback. 

http://www.freebsd.org/cgi/query-pr.cgi?pr=63302 

From: Kirill Ponomarew <krion@FreeBSD.org>
To: ryan@transaeris.com
Cc: freebsd-gnats-submit@FreeBSD.org
Subject: Re: ports/63302: Velovity doesn't use the full list of groups on FreeBSD
Date: Tue, 24 Feb 2004 15:56:06 +0100

 --sdEQJo40s7ofW8iR
 Content-Type: text/plain; charset=us-ascii
 Content-Disposition: inline
 Content-Transfer-Encoding: quoted-printable
 
 Hi,
 
 On Tue, Feb 24, 2004 at 03:47:40AM -0800, Henri Michelon wrote:
 >=20
 > >Number:         63302
 > >Category:       ports
 > >Synopsis:       Velovity doesn't use the full list of groups on FreeBSD
 > >Confidential:   no
 > >Severity:       non-critical
 > >Priority:       low
 > >Responsible:    freebsd-ports-bugs
 > >State:          open
 
 Could you please review this PR and provide feedback ?
 
 http://www.freebsd.org/cgi/query-pr.cgi?pr=3Dports/63302
 
 -Kirill
 
 --sdEQJo40s7ofW8iR
 Content-Type: application/pgp-signature
 Content-Disposition: inline
 
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v1.2.4 (FreeBSD)
 
 iD8DBQFAO2YGQC1G6a60JuURAtc+AKCOh0gqZT5Y/3nMUWFJagPK3VxHhACeKg4M
 2VvANV7pyv1/jMtwuV83GVo=
 =LjBn
 -----END PGP SIGNATURE-----
 
 --sdEQJo40s7ofW8iR--

From: Ryan Moe <ryan@say-10.net>
To: Kirill Ponomarew <krion@FreeBSD.org>, ryan@transaeris.com,
	freebsd-gnats-submit@FreeBSD.org
Cc:  
Subject: Re: ports/63302: Velovity doesn't use the full list of groups on FreeBSD
Date: Sat, 28 Feb 2004 14:13:57 -0600

 On Tuesday 24 February 2004 08:56, Kirill Ponomarew wrote:
 > Hi,
 >
 > On Tue, Feb 24, 2004 at 03:47:40AM -0800, Henri Michelon wrote:
 > > >Number:         63302
 > > >Category:       ports
 > > >Synopsis:       Velovity doesn't use the full list of groups on FreeBSD
 > > >Confidential:   no
 > > >Severity:       non-critical
 > > >Priority:       low
 > > >Responsible:    freebsd-ports-bugs
 > > >State:          open
 >
 > Could you please review this PR and provide feedback ?
 >
 > http://www.freebsd.org/cgi/query-pr.cgi?pr=ports/63302
 >
 > -Kirill
 
 The patch works on 4.9-RELEASE and since you're on 5.2 I assume it works 
 there.  So everything looks good. Do I need to submit this as a maintainer 
 update?
 
 Thanks,
 
 Ryan
State-Changed-From-To: feedback->closed 
State-Changed-By: pav 
State-Changed-When: Mon Mar 1 10:31:28 PST 2004 
State-Changed-Why:  
Committed, thanks! 

http://www.freebsd.org/cgi/query-pr.cgi?pr=63302 
>Unformatted:
