From sacadmin Thu Sep 11 13:23:17 2008
Received: from sac.sfbay.sun.com (localhost [127.0.0.1])
	by sac.sfbay.sun.com (8.13.8+Sun/8.13.8) with ESMTP id m8BKNHSE027588;
	Thu, 11 Sep 2008 13:23:17 -0700 (PDT)
Received: (from nw141292@localhost)
	by sac.sfbay.sun.com (8.13.8+Sun/8.13.8/Submit) id m8BKNHRd027584;
	Thu, 11 Sep 2008 13:23:17 -0700 (PDT)
Date: Thu, 11 Sep 2008 13:23:17 -0700 (PDT)
From: Nicolas Williams <nw141292@sac.sfbay.sun.com>
Message-Id: <200809112023.m8BKNHRd027584@sac.sfbay.sun.com>
To: PSARC-record@sac.sfbay.sun.com
Cc: sparks-discuss@opensolaris.org
Subject: Make _getgroupsbymember public [PSARC/2008/574 Self Review]
Status: RO
Content-Length: 565

Template Version: @(#)sac_nextcase %I% %G% SMI
This information is Copyright 2008 Sun Microsystems
1. Introduction
    1.1. Project/Component Working Name:
	 Make _getgroupsbymember public
    1.2. Name of Document Author/Supplier:
	 Author:  Nicolas Williams
    1.3  Date of This Document:
	11 September, 2008
4. Technical Description
    See the case directory for more detail

6. Resources and Schedule
    6.4. Steering Committee requested information
   	6.4.1. Consolidation C-team Name:
		ON
    6.5. ARC review type: Automatic
    6.6. ARC Exposure: open


From sacadmin Thu Sep 11 13:38:47 2008
Received: from binky.Central.Sun.COM (dhcp-mopac-128-107.Central.Sun.COM [129.153.128.107])
	by sac.sfbay.sun.com (8.13.8+Sun/8.13.8) with ESMTP id m8BKckxd028533;
	Thu, 11 Sep 2008 13:38:46 -0700 (PDT)
Received: from binky.Central.Sun.COM (localhost [127.0.0.1])
	by binky.Central.Sun.COM (8.14.3+Sun/8.14.3) with ESMTP id m8BKVDkX005920;
	Thu, 11 Sep 2008 15:31:13 -0500 (CDT)
Received: (from nw141292@localhost)
	by binky.Central.Sun.COM (8.14.3+Sun/8.14.3/Submit) id m8BKVD4o005919;
	Thu, 11 Sep 2008 15:31:13 -0500 (CDT)
X-Authentication-Warning: binky.Central.Sun.COM: nw141292 set sender to Nicolas.Williams@sun.com using -f
Date: Thu, 11 Sep 2008 15:31:13 -0500
From: Nicolas Williams <Nicolas.Williams@sun.com>
To: Nicolas Williams <nw141292@sac.sfbay.sun.com>
Cc: PSARC-record@sac.sfbay.sun.com, sparks-discuss@opensolaris.org
Subject: Re: Make _getgroupsbymember public [PSARC/2008/574 Self Review]
Message-ID: <20080911203113.GK1875@Sun.COM>
References: <200809112023.m8BKNHRd027584@sac.sfbay.sun.com>
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
In-Reply-To: <200809112023.m8BKNHRd027584@sac.sfbay.sun.com>
User-Agent: Mutt/1.5.7i
Status: RO
Content-Length: 2660

I'm sponsoring this self-review case for myself.

This case proposes to rename _getgroupsbymember() to getgroupsbymember() 
and make it a Committed interface.  A draft manpage is below.

Nico





Standard C Library Functions                getgroupsbymember(3C)



NAME
     getgroupsbymember - obtain a list of group memberships of a
     user

SYNOPSIS
       #include <grp.h>

       int getgroupsbymember(const char *username, gid_t gid_array[],
                              int maxgids, int numgids);

DESCRIPTION
     getgroupsbymember() takes a username as argument and fills
     in the given gid_array array of group IDs with the group IDs
     of the groups to which the user belongs.

     The maxgids argument indicates the number of elements of
     gid_array.

     The numgids argument indicates how many group IDs are
     already in the array; non-duplicate group IDs will be added
     to gid_array at index numgids.

RETURN VALUES
     getgroupsbymember() returns the number of groups added to
     gid_array or -1 if there were any errors (and errno may be
     set).

ATTRIBUTES
      ________________________________________________________________________
     |       ATTRIBUTE TYPE        |             ATTRIBUTE VALUE             |
     |_____________________________|_________________________________________|
     | Interface Stability         | Committed.                              |
     |_____________________________|_________________________________________|
     | MT-Level                    | Safe                                    |
     |_____________________________|_________________________________________|

NOTES
     getgroupsbymember() is not a standard function, therefore
     __EXTENSIONS__ must be defined when including <grp.h>,
     otherwise this function will not be declared.

SEE ALSO
     initgroups(3C), getgrnam(3C), getpwnam(3C), standards(5).












SunOS 5.11           Last change: 2008-09-11                    1




On Thu, Sep 11, 2008 at 01:23:17PM -0700, Nicolas Williams wrote:
> Template Version: @(#)sac_nextcase %I% %G% SMI
> This information is Copyright 2008 Sun Microsystems
> 1. Introduction
>     1.1. Project/Component Working Name:
> 	 Make _getgroupsbymember public
>     1.2. Name of Document Author/Supplier:
> 	 Author:  Nicolas Williams
>     1.3  Date of This Document:
> 	11 September, 2008
> 4. Technical Description
>     See the case directory for more detail
> 
> 6. Resources and Schedule
>     6.4. Steering Committee requested information
>    	6.4.1. Consolidation C-team Name:
> 		ON
>     6.5. ARC review type: Automatic
>     6.6. ARC Exposure: open
> 

From sacadmin Thu Sep 11 13:55:43 2008
Received: from binky.Central.Sun.COM (dhcp-mopac-128-107.Central.Sun.COM [129.153.128.107])
	by sac.sfbay.sun.com (8.13.8+Sun/8.13.8) with ESMTP id m8BKthli029375;
	Thu, 11 Sep 2008 13:55:43 -0700 (PDT)
Received: from binky.Central.Sun.COM (localhost [127.0.0.1])
	by binky.Central.Sun.COM (8.14.3+Sun/8.14.3) with ESMTP id m8BKmBFn005991;
	Thu, 11 Sep 2008 15:48:11 -0500 (CDT)
Received: (from nw141292@localhost)
	by binky.Central.Sun.COM (8.14.3+Sun/8.14.3/Submit) id m8BKmArp005990;
	Thu, 11 Sep 2008 15:48:10 -0500 (CDT)
X-Authentication-Warning: binky.Central.Sun.COM: nw141292 set sender to Nicolas.Williams@sun.com using -f
Date: Thu, 11 Sep 2008 15:48:10 -0500
From: Nicolas Williams <Nicolas.Williams@sun.com>
To: Nicolas Williams <nw141292@sac.sfbay.sun.com>
Cc: PSARC-record@sac.sfbay.sun.com, sparks-discuss@opensolaris.org
Subject: Re: Make _getgroupsbymember public [PSARC/2008/574 Self Review]
Message-ID: <20080911204810.GN1875@Sun.COM>
References: <200809112023.m8BKNHRd027584@sac.sfbay.sun.com> <20080911203113.GK1875@Sun.COM>
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
In-Reply-To: <20080911203113.GK1875@Sun.COM>
User-Agent: Mutt/1.5.7i
Status: RO
Content-Length: 538

On Thu, Sep 11, 2008 at 03:31:13PM -0500, Nicolas Williams wrote:
> I'm sponsoring this self-review case for myself.
> 
> This case proposes to rename _getgroupsbymember() to getgroupsbymember() 
> and make it a Committed interface.  A draft manpage is below.

I forgot to mention two things:

 - Of course, we'll leave behind an alias by the old name so any
   third-party software, and software from other consolidations
   continues to work;

 - there's a place-holder CR for this:

   6561960 Make _getgroupsbymember public

Nico
-- 

From sacadmin Fri Sep 12 01:20:45 2008
Received: from dm-sfbay-01.sfbay.sun.com (dm-sfbay-01.SFBay.Sun.COM [129.145.155.118])
	by sac.sfbay.sun.com (8.13.8+Sun/8.13.8) with ESMTP id m8C8KiIv017186;
	Fri, 12 Sep 2008 01:20:44 -0700 (PDT)
Received: from gmp-eb-inf-1.sun.com (gmp-eb-inf-1.EU.Sun.COM [192.18.6.21])
	by dm-sfbay-01.sfbay.sun.com (8.13.8+Sun/8.13.8/ENSMAIL,v2.2) with ESMTP id m8C8Khs9021725;
	Fri, 12 Sep 2008 01:20:44 -0700 (PDT)
Received: from fe-emea-09.sun.com (gmp-eb-lb-2-fe2.eu.sun.com [192.18.6.11])
	by gmp-eb-inf-1.sun.com (8.13.7+Sun/8.12.9) with ESMTP id m8C8KcKP027392;
	Fri, 12 Sep 2008 08:20:38 GMT
Received: from conversion-daemon.fe-emea-09.sun.com by fe-emea-09.sun.com
 (Sun Java System Messaging Server 6.2-8.04 (built Feb 28 2007))
 id <0K7200001PSEUW00@fe-emea-09.sun.com>
 (original mail from Serge.Dussud@Sun.COM); Fri,
 12 Sep 2008 09:20:38 +0100 (BST)
Received: from [129.157.210.6] by fe-emea-09.sun.com
 (Sun Java System Messaging Server 6.2-8.04 (built Feb 28 2007))
 with ESMTPSA id <0K72005L0PU73NB0@fe-emea-09.sun.com>; Fri,
 12 Sep 2008 09:20:32 +0100 (BST)
Date: Fri, 12 Sep 2008 10:20:31 +0200
From: Serge Dussud <Serge.Dussud@Sun.COM>
Subject: Re: [sparks-discuss] Make _getgroupsbymember public [PSARC/2008/574
 Self Review]
In-reply-to: <20080911203113.GK1875@Sun.COM>
Sender: Serge.Dussud@Sun.COM
To: Nicolas Williams <Nicolas.Williams@Sun.COM>
Cc: Nicolas Williams <nw141292@sac.sfbay.sun.com>,
        sparks-discuss@opensolaris.org, PSARC-record@sac.sfbay.sun.com
Reply-to: Serge.Dussud@Sun.COM
Message-id: <48CA264F.3000101@Sun.COM>
MIME-version: 1.0
Content-type: text/plain; format=flowed; charset=ISO-8859-1
Content-transfer-encoding: 7BIT
References: <200809112023.m8BKNHRd027584@sac.sfbay.sun.com>
 <20080911203113.GK1875@Sun.COM>
User-Agent: Thunderbird 2.0.0.14 (X11/20080505)
Status: RO
Content-Length: 3210


Hi Nico,

On 09/11/08 10:31 PM, Nicolas Williams wrote:
> I'm sponsoring this self-review case for myself.
> 
> This case proposes to rename _getgroupsbymember() to getgroupsbymember() 
> and make it a Committed interface.  A draft manpage is below.
> 
> Nico
> 
> 
> 
> 
> 
> Standard C Library Functions                getgroupsbymember(3C)
> 
> 
> 
> NAME
>      getgroupsbymember - obtain a list of group memberships of a
>      user
> 
> SYNOPSIS
>        #include <grp.h>
> 
>        int getgroupsbymember(const char *username, gid_t gid_array[],
>                               int maxgids, int numgids);
> 
> DESCRIPTION
>      getgroupsbymember() takes a username as argument and fills
>      in the given gid_array array of group IDs with the group IDs
>      of the groups to which the user belongs.
> 
>      The maxgids argument indicates the number of elements of
>      gid_array.
> 
>      The numgids argument indicates how many group IDs are
>      already in the array; non-duplicate group IDs will be added
>      to gid_array at index numgids.
> 
> RETURN VALUES
>      getgroupsbymember() returns the number of groups added to
>      gid_array or -1 if there were any errors (and errno may be
>      set).

current code for _getgroupsbymember() would never (or very rarely) 
return -1 I think. I've added comments to CR 6561960 with some details.

Serge

> 
> ATTRIBUTES
>       ________________________________________________________________________
>      |       ATTRIBUTE TYPE        |             ATTRIBUTE VALUE             |
>      |_____________________________|_________________________________________|
>      | Interface Stability         | Committed.                              |
>      |_____________________________|_________________________________________|
>      | MT-Level                    | Safe                                    |
>      |_____________________________|_________________________________________|
> 
> NOTES
>      getgroupsbymember() is not a standard function, therefore
>      __EXTENSIONS__ must be defined when including <grp.h>,
>      otherwise this function will not be declared.
> 
> SEE ALSO
>      initgroups(3C), getgrnam(3C), getpwnam(3C), standards(5).
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> SunOS 5.11           Last change: 2008-09-11                    1
> 
> 
> 
> 
> On Thu, Sep 11, 2008 at 01:23:17PM -0700, Nicolas Williams wrote:
>> Template Version: @(#)sac_nextcase %I% %G% SMI
>> This information is Copyright 2008 Sun Microsystems
>> 1. Introduction
>>     1.1. Project/Component Working Name:
>> 	 Make _getgroupsbymember public
>>     1.2. Name of Document Author/Supplier:
>> 	 Author:  Nicolas Williams
>>     1.3  Date of This Document:
>> 	11 September, 2008
>> 4. Technical Description
>>     See the case directory for more detail
>>
>> 6. Resources and Schedule
>>     6.4. Steering Committee requested information
>>    	6.4.1. Consolidation C-team Name:
>> 		ON
>>     6.5. ARC review type: Automatic
>>     6.6. ARC Exposure: open
>>
> _______________________________________________
> sparks-discuss mailing list
> sparks-discuss@opensolaris.org
> http://mail.opensolaris.org/mailman/listinfo/sparks-discuss

From sacadmin Fri Sep 12 08:40:12 2008
Received: from binky.Central.Sun.COM (dhcp-mopac-128-107.Central.Sun.COM [129.153.128.107])
	by sac.sfbay.sun.com (8.13.8+Sun/8.13.8) with ESMTP id m8CFeBYG026463;
	Fri, 12 Sep 2008 08:40:12 -0700 (PDT)
Received: from binky.Central.Sun.COM (localhost [127.0.0.1])
	by binky.Central.Sun.COM (8.14.3+Sun/8.14.3) with ESMTP id m8CFWdjs009808;
	Fri, 12 Sep 2008 10:32:39 -0500 (CDT)
Received: (from nw141292@localhost)
	by binky.Central.Sun.COM (8.14.3+Sun/8.14.3/Submit) id m8CFWdNA009807;
	Fri, 12 Sep 2008 10:32:39 -0500 (CDT)
X-Authentication-Warning: binky.Central.Sun.COM: nw141292 set sender to Nicolas.Williams@sun.com using -f
Date: Fri, 12 Sep 2008 10:32:39 -0500
From: Nicolas Williams <Nicolas.Williams@sun.com>
To: Serge Dussud <Serge.Dussud@sun.com>
Cc: Nicolas Williams <nw141292@sac.sfbay.sun.com>,
        sparks-discuss@opensolaris.org, PSARC-record@sac.sfbay.sun.com
Subject: Re: [sparks-discuss] Make _getgroupsbymember public [PSARC/2008/574 Self Review]
Message-ID: <20080912153239.GW1875@Sun.COM>
References: <200809112023.m8BKNHRd027584@sac.sfbay.sun.com> <20080911203113.GK1875@Sun.COM> <48CA264F.3000101@Sun.COM>
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
In-Reply-To: <48CA264F.3000101@Sun.COM>
User-Agent: Mutt/1.5.7i
Status: RO
Content-Length: 1641

On Fri, Sep 12, 2008 at 10:20:31AM +0200, Serge Dussud wrote:
> current code for _getgroupsbymember() would never (or very rarely) 
> return -1 I think. I've added comments to CR 6561960 with some details.

That _getgroupsbymember() never returns -1 today doesn't bother me in
the least.

That _getgroupsbymember() has no way to communicate "some groups were
found but there were errors so you might be missing some" does worry me
somewhat, but, what should _getgroupsbymember() callers do then?  Return
an error?  Should initgroups() fail in such cases?  Should logins fail?

Considering DENY ACEs in ACLs where the subject is a group, the answer
should have to be "logins should fail."  But that's not how the system
behaves today, and I'm loath to change that (though I don't mind making
the public function support such semantics).

That _getgroupsbymember() has no way to distinguish between "gid_array
not large enough for all groups found" and "gid_array was exactly the
right size" does worry me enough to want to fix it.  Unfortunately the
fix for this will be non-trivial.

I'll go think about this.  I may change this case to be a fasttrack in
need-spec state.  There is value in exposing the function that we have
today.  But more importantly, I *do* have time to open up this function
as is, but I *don't* have time to do much more.  _getgroupsbymember() is
already effectively Committed (changing it in a backwards-incompatible
way would break callers in other consolidations and third-party software
too, therefore we can't very well do that), so the default answer is to
do nothing, as we have for years and years.

Nico
-- 

From sacadmin Fri Sep 12 09:04:50 2008
Received: from binky.Central.Sun.COM (dhcp-mopac-128-107.Central.Sun.COM [129.153.128.107])
	by sac.sfbay.sun.com (8.13.8+Sun/8.13.8) with ESMTP id m8CG4okD027273;
	Fri, 12 Sep 2008 09:04:50 -0700 (PDT)
Received: from binky.Central.Sun.COM (localhost [127.0.0.1])
	by binky.Central.Sun.COM (8.14.3+Sun/8.14.3) with ESMTP id m8CFvHQ7009935;
	Fri, 12 Sep 2008 10:57:17 -0500 (CDT)
Received: (from nw141292@localhost)
	by binky.Central.Sun.COM (8.14.3+Sun/8.14.3/Submit) id m8CFvHx6009934;
	Fri, 12 Sep 2008 10:57:17 -0500 (CDT)
X-Authentication-Warning: binky.Central.Sun.COM: nw141292 set sender to Nicolas.Williams@sun.com using -f
Date: Fri, 12 Sep 2008 10:57:17 -0500
From: Nicolas Williams <Nicolas.Williams@sun.com>
To: Serge Dussud <Serge.Dussud@sun.com>
Cc: Nicolas Williams <nw141292@sac.sfbay.sun.com>,
        sparks-discuss@opensolaris.org, PSARC-record@sac.sfbay.sun.com
Subject: Re: [sparks-discuss] Make _getgroupsbymember public [PSARC/2008/574 Self Review]
Message-ID: <20080912155717.GY1875@Sun.COM>
References: <200809112023.m8BKNHRd027584@sac.sfbay.sun.com> <20080911203113.GK1875@Sun.COM> <48CA264F.3000101@Sun.COM> <20080912153239.GW1875@Sun.COM>
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
In-Reply-To: <20080912153239.GW1875@Sun.COM>
User-Agent: Mutt/1.5.7i
Status: RO
Content-Length: 4136

On Fri, Sep 12, 2008 at 10:32:39AM -0500, Nicolas Williams wrote:
> On Fri, Sep 12, 2008 at 10:20:31AM +0200, Serge Dussud wrote:
> > current code for _getgroupsbymember() would never (or very rarely) 
> > return -1 I think. I've added comments to CR 6561960 with some details.
> 
> That _getgroupsbymember() never returns -1 today doesn't bother me in
> the least.
> 
> That _getgroupsbymember() has no way to communicate "some groups were
> found but there were errors so you might be missing some" does worry me
> somewhat, but, what should _getgroupsbymember() callers do then?  Return
> an error?  Should initgroups() fail in such cases?  Should logins fail?
> 
> Considering DENY ACEs in ACLs where the subject is a group, the answer
> should have to be "logins should fail."  But that's not how the system
> behaves today, and I'm loath to change that (though I don't mind making
> the public function support such semantics).

I will file a CR for this issue.  I will not address it in this case
*except* by changing the return value of the public getgroupsbymember()
as follows:

	getgroupsbymember() returns the number of GIDs added to
	gid_array if there are no errors, otherwise it returns -1 minus
	the number of GIDs added to gid_array.

The initial implementation will, however, never return a negative value.
Fixing this will be left to a future CR.

> That _getgroupsbymember() has no way to distinguish between "gid_array
> not large enough for all groups found" and "gid_array was exactly the
> right size" does worry me enough to want to fix it.  Unfortunately the
> fix for this will be non-trivial.

The fix for this is non-trivial, and the application can detect this,
although not very efficiently, by re-allocating gid_array if
getgroupsbymember() returns (maxgids - numgids) and calling
getgroupsbymember() again.  This is inefficient in the case that there
were no more GIDs that could have been added to gid_array had it been
large enough.  But I think this will not be an issue (also, nscd should
probably have a cache for getgroupsbymember() -- again, a separate CR,
that).

> I'll go think about this.  [...]

See above.

The updated manpage:




Standard C Library Functions                getgroupsbymember(3C)



NAME
     getgroupsbymember - obtain a list of group memberships of a
     user

SYNOPSIS
       #include <grp.h>

       int getgroupsbymember(const char *username, gid_t gid_array[],
                              int maxgids, int numgids);

DESCRIPTION
     getgroupsbymember() takes a username as argument and fills
     in the given gid_array array of group IDs with the group IDs
     of the groups to which the user belongs.

     The maxgids argument indicates the number of elements of
     gid_array.

     The numgids argument indicates how many group IDs are
     already in the array; non-duplicate group IDs will be added
     to gid_array at index numgids.

RETURN VALUES
     getgroupsbymember() returns the number of groups added to
     gid_array or -1 minus the number of groups added to
     gid_array if there were any errors (and errno may be set).
     When getgroupsbymember() returns (maxgids - numgids) the
     caller should call it again with a larger gid_array.

ATTRIBUTES
      ________________________________________________________________________
     |       ATTRIBUTE TYPE        |             ATTRIBUTE VALUE             |
     |_____________________________|_________________________________________|
     | Interface Stability         | Committed.                              |
     |_____________________________|_________________________________________|
     | MT-Level                    | Safe                                    |
     |_____________________________|_________________________________________|

NOTES
     getgroupsbymember() is not a standard function, therefore
     __EXTENSIONS__ must be defined when including <grp.h>,
     otherwise this function will not be declared.

SEE ALSO
     initgroups(3C), getgrnam(3C), getpwnam(3C), standards(5).










SunOS 5.11           Last change: 2008-09-12                    1





From sacadmin Fri Sep 12 12:56:54 2008
Received: from dm-sfbay-02.sfbay.sun.com (dm-sfbay-02.SFBay.Sun.COM [129.146.11.31])
	by sac.sfbay.sun.com (8.13.8+Sun/8.13.8) with ESMTP id m8CJusmv004020;
	Fri, 12 Sep 2008 12:56:54 -0700 (PDT)
Received: from sca-ea-mail-4.sun.com (sca-ea-mail-4.Sun.COM [192.18.43.22])
	by dm-sfbay-02.sfbay.sun.com (8.13.8+Sun/8.13.8/ENSMAIL,v2.2) with ESMTP id m8CJuste003165;
	Fri, 12 Sep 2008 12:56:54 -0700 (PDT)
Received: from relay44i.sun.com ([192.5.209.118])
	by sca-ea-mail-4.sun.com (8.13.6+Sun/8.12.9) with ESMTP id m8CJusrh025699;
	Fri, 12 Sep 2008 19:56:54 GMT
Received: from mms48es.mms.us.syntegra.com ([160.41.221.230] [160.41.221.230]) by relay44i.sun.com with ESMTP id BT-MMP-312289; Fri, 12 Sep 2008 19:56:53 Z
Received: from relay41i.sun.com (relay41i.sun.com [192.5.209.70]) by mms48es.mms.us.syntegra.com with ESMTP id BT-MMP-42872404; Fri, 12 Sep 2008 19:56:53 Z
Received: from jackfruit.srv.cs.cmu.edu ([128.2.201.16] [128.2.201.16]) by relay4i.sun.com with ESMTP id BT-MMP-3846959; Fri, 12 Sep 2008 19:56:53 Z
Received: from atlantis.pc.cs.cmu.edu (host-66-202-66-11.har.choiceone.net [66.202.66.11])
	(authenticated bits=0)
	by jackfruit.srv.cs.cmu.edu (8.13.6/8.13.6) with ESMTP id m8CJubu5029440
	(version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO);
	Fri, 12 Sep 2008 15:56:38 -0400 (EDT)
Date: Fri, 12 Sep 2008 15:56:37 -0400
From: Jeffrey Hutzelman <jhutz@cmu.edu>
To: Nicolas Williams <Nicolas.Williams@sun.com>,
        Serge Dussud <Serge.Dussud@sun.com>
cc: Nicolas Williams <nw141292@sac.sfbay.sun.com>,
        sparks-discuss@opensolaris.org, PSARC-record@sac.sfbay.sun.com,
        jhutz@cmu.edu
Subject: Re: [sparks-discuss] Make _getgroupsbymember public
 [PSARC/2008/574	Self Review]
Message-ID: <3F7184BF942A2CDA7E591C0E@atlantis.pc.cs.cmu.edu>
In-Reply-To: <20080912155717.GY1875@Sun.COM>
References: <200809112023.m8BKNHRd027584@sac.sfbay.sun.com>
 	<20080911203113.GK1875@Sun.COM>
 <48CA264F.3000101@Sun.COM>	<20080912153239.GW1875@Sun.COM>
 <20080912155717.GY1875@Sun.COM>
X-Brightmail-Tracker: AAAAAA==
X-Mailer: Mulberry/4.0.8 (Linux/x86)
X-Scanned-By: mimedefang-cmuscs on 128.2.201.16
X-Antispam: No, score=0.0/5.0, scanned in 0.058sec at (localhost [127.0.0.1])
	by smf-spamd v1.3.1 - http://smfs.sf.net/
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii; format=flowed
Content-Transfer-Encoding: 7bit
Content-Disposition: inline
Status: RO
Content-Length: 821

--On Friday, September 12, 2008 10:57:17 AM -0500 Nicolas Williams 
<Nicolas.Williams@sun.com> wrote:

> I will file a CR for this issue.  I will not address it in this case
> *except* by changing the return value of the public getgroupsbymember()
> as follows:
>
> 	getgroupsbymember() returns the number of GIDs added to
> 	gid_array if there are no errors, otherwise it returns -1 minus
> 	the number of GIDs added to gid_array.

Ugh ugh ugh!

If you need to be able to return both an error indication and some other 
information, they should be handled separately.  I would suggest handling 
this by making numgids an int *, so that getgroupsbymember can simply 
update it to indicate the new number of entries in the array.  Then a 
return value of 0 indicates success and anything else indicates an error.

-- Jeff

From sacadmin Fri Sep 12 13:33:47 2008
Received: from binky.Central.Sun.COM (dhcp-mopac-128-107.Central.Sun.COM [129.153.128.107])
	by sac.sfbay.sun.com (8.13.8+Sun/8.13.8) with ESMTP id m8CKXlOu005567;
	Fri, 12 Sep 2008 13:33:47 -0700 (PDT)
Received: from binky.Central.Sun.COM (localhost [127.0.0.1])
	by binky.Central.Sun.COM (8.14.3+Sun/8.14.3) with ESMTP id m8CKIf3e011134;
	Fri, 12 Sep 2008 15:18:41 -0500 (CDT)
Received: (from nw141292@localhost)
	by binky.Central.Sun.COM (8.14.3+Sun/8.14.3/Submit) id m8CKIfqd011133;
	Fri, 12 Sep 2008 15:18:41 -0500 (CDT)
X-Authentication-Warning: binky.Central.Sun.COM: nw141292 set sender to Nicolas.Williams@sun.com using -f
Date: Fri, 12 Sep 2008 15:18:41 -0500
From: Nicolas Williams <Nicolas.Williams@sun.com>
To: Jeffrey Hutzelman <jhutz@cmu.edu>
Cc: Serge Dussud <Serge.Dussud@sun.com>,
        Nicolas Williams <nw141292@sac.sfbay.sun.com>,
        sparks-discuss@opensolaris.org, PSARC-record@sac.sfbay.sun.com
Subject: Re: [sparks-discuss] Make _getgroupsbymember public [PSARC/2008/574 Self Review]
Message-ID: <20080912201841.GO1875@Sun.COM>
References: <200809112023.m8BKNHRd027584@sac.sfbay.sun.com> <20080911203113.GK1875@Sun.COM> <48CA264F.3000101@Sun.COM> <20080912153239.GW1875@Sun.COM> <20080912155717.GY1875@Sun.COM> <3F7184BF942A2CDA7E591C0E@atlantis.pc.cs.cmu.edu>
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
In-Reply-To: <3F7184BF942A2CDA7E591C0E@atlantis.pc.cs.cmu.edu>
User-Agent: Mutt/1.5.7i
Status: RO
Content-Length: 1357

On Fri, Sep 12, 2008 at 03:56:37PM -0400, Jeffrey Hutzelman wrote:
> --On Friday, September 12, 2008 10:57:17 AM -0500 Nicolas Williams 
> <Nicolas.Williams@sun.com> wrote:
> 
> >I will file a CR for this issue.  I will not address it in this case
> >*except* by changing the return value of the public getgroupsbymember()
> >as follows:
> >
> >	getgroupsbymember() returns the number of GIDs added to
> >	gid_array if there are no errors, otherwise it returns -1 minus
> >	the number of GIDs added to gid_array.
> 
> Ugh ugh ugh!
> 
> If you need to be able to return both an error indication and some other 
> information, they should be handled separately.  I would suggest handling 
> this by making numgids an int *, so that getgroupsbymember can simply 
> update it to indicate the new number of entries in the array.  Then a 
> return value of 0 indicates success and anything else indicates an error.

Oh, I suppose.  Now that the two symbols won't resolve to the same
function this change isn't much of an additional complication.

Though internally there will be up to two calls (see previous posts) to
the old _getgroupsbymember() simply because changing the internal
implementation of it is *way* out of scope.

I've changed this case to be a fasttrack now with a timeout on
Wednesday.  There is no meeting on Wednesday though, sadly.

Nico
-- 

From sacadmin Tue Sep 16 08:46:48 2008
Received: from binky.Central.Sun.COM (dhcp-mopac-128-107.Central.Sun.COM [129.153.128.107])
	by sac.sfbay.sun.com (8.13.8+Sun/8.13.8) with ESMTP id m8GFkmJV011966;
	Tue, 16 Sep 2008 08:46:48 -0700 (PDT)
Received: from binky.Central.Sun.COM (localhost [127.0.0.1])
	by binky.Central.Sun.COM (8.14.3+Sun/8.14.3) with ESMTP id m8GFVgHq027154;
	Tue, 16 Sep 2008 10:31:42 -0500 (CDT)
Received: (from nw141292@localhost)
	by binky.Central.Sun.COM (8.14.3+Sun/8.14.3/Submit) id m8GFVftf027153;
	Tue, 16 Sep 2008 10:31:41 -0500 (CDT)
X-Authentication-Warning: binky.Central.Sun.COM: nw141292 set sender to Nicolas.Williams@sun.com using -f
Date: Tue, 16 Sep 2008 10:31:41 -0500
From: Nicolas Williams <Nicolas.Williams@sun.com>
To: Jeffrey Hutzelman <jhutz@cmu.edu>
Cc: Serge Dussud <Serge.Dussud@sun.com>,
        Nicolas Williams <nw141292@sac.sfbay.sun.com>,
        sparks-discuss@opensolaris.org, PSARC-record@sac.sfbay.sun.com
Subject: Re: [sparks-discuss] Make _getgroupsbymember public [PSARC/2008/574 Self Review]
Message-ID: <20080916153141.GZ1875@Sun.COM>
References: <200809112023.m8BKNHRd027584@sac.sfbay.sun.com> <20080911203113.GK1875@Sun.COM> <48CA264F.3000101@Sun.COM> <20080912153239.GW1875@Sun.COM> <20080912155717.GY1875@Sun.COM> <3F7184BF942A2CDA7E591C0E@atlantis.pc.cs.cmu.edu> <20080912201841.GO1875@Sun.COM>
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
In-Reply-To: <20080912201841.GO1875@Sun.COM>
User-Agent: Mutt/1.5.7i
Status: RO
Content-Length: 261

On Fri, Sep 12, 2008 at 03:18:41PM -0500, Nicolas Williams wrote:
> I've changed this case to be a fasttrack now with a timeout on
> Wednesday.  There is no meeting on Wednesday though, sadly.

I forgot to mention, there's a manpage in the case repository now.

From gdamore@sun.com Wed Sep 24 10:11:13 2008
Received: from sunmail3mpk.sfbay.sun.com (sunmail3mpk.SFBay.Sun.COM [129.146.11.52])
	by sac.sfbay.sun.com (8.13.8+Sun/8.13.8) with ESMTP id m8OHBD75020011
	for <psarc-ext@sac.sfbay.sun.com>; Wed, 24 Sep 2008 10:11:13 -0700 (PDT)
Received: from nwk-avmta-2.sfbay.sun.com (nwk-avmta-2.SFBay.Sun.COM [129.145.155.6])
	by sunmail3mpk.sfbay.sun.com (8.13.7+Sun/8.13.7/ENSMAIL,v2.2) with ESMTP id m8OHBAVZ003716
	for <@sunmail2sca.sfbay.sun.com:PSARC-ext@sun.com>; Wed, 24 Sep 2008 10:11:13 -0700 (PDT)
Received: from pmxchannel-daemon.nwk-avmta-2.sfbay.sun.com by
 nwk-avmta-2.sfbay.sun.com
 (Sun Java System Messaging Server 6.2-3.04 (built Jul 15 2005))
 id <0K7P00K1LMEN3D00@nwk-avmta-2.sfbay.sun.com> for PSARC-ext@sun.com
 (ORCPT PSARC-ext@sun.com); Wed, 24 Sep 2008 10:11:11 -0700 (PDT)
Received: from sca-es-mail-2.sun.com ([192.18.43.133])
 by nwk-avmta-2.sfbay.sun.com
 (Sun Java System Messaging Server 6.2-3.04 (built Jul 15 2005))
 with ESMTP id <0K7P00I5TMENC630@nwk-avmta-2.sfbay.sun.com> for
 PSARC-ext@sun.com (ORCPT PSARC-ext@sun.com); Wed,
 24 Sep 2008 10:11:11 -0700 (PDT)
Received: from fe-sfbay-09.sun.com ([192.18.43.129])
	by sca-es-mail-2.sun.com (8.13.7+Sun/8.12.9) with ESMTP id m8OHBACT025834	for
 <PSARC-ext@sun.com>; Wed, 24 Sep 2008 10:11:10 -0700 (PDT)
Received: from conversion-daemon.fe-sfbay-09.sun.com by fe-sfbay-09.sun.com
 (Sun Java System Messaging Server 6.2-8.04 (built Feb 28 2007))
 id <0K7P00401LIZ4100@fe-sfbay-09.sun.com> (original mail from gdamore@sun.com)
 for PSARC-ext@sun.com (ORCPT PSARC-ext@sun.com); Wed,
 24 Sep 2008 10:11:10 -0700 (PDT)
Received: from [10.7.251.172] by fe-sfbay-09.sun.com
 (Sun Java System Messaging Server 6.2-8.04 (built Feb 28 2007))
 with ESMTPSA id <0K7P00373MECF040@fe-sfbay-09.sun.com> for PSARC-ext@sun.com
 (ORCPT PSARC-ext@sun.com); Wed, 24 Sep 2008 10:11:01 -0700 (PDT)
Date: Wed, 24 Sep 2008 10:08:50 -0700
From: "Garrett D'Amore" <gdamore@sun.com>
Subject: PSARC 2008/574 Make _getgroupsbymember public
Sender: Garrett.Damore@sun.com
To: Nicolas Williams <Nicolas.Williams@sun.com>, PSARC-ext <PSARC-ext@sun.com>
Message-id: <48DA7422.1010306@sun.com>
MIME-version: 1.0
Content-type: text/plain; format=flowed; charset=ISO-8859-1
Content-transfer-encoding: 7BIT
X-PMX-Version: 5.4.1.325704
User-Agent: Thunderbird 2.0.0.14 (X11/20080616)
Status: RO
Content-Length: 200

We weren't sure at the meeting today that the case had converged on the 
API, so the timer has been extended.  Can the owner (Nicolas) please 
clarify what the final API is?   Thanks.

    -- Garrett

From Nicolas.Williams@sun.com Wed Sep 24 10:12:40 2008
Received: from sunmail2sca.sfbay.sun.com (sunmail2sca.SFBay.Sun.COM [129.145.155.234])
	by sac.sfbay.sun.com (8.13.8+Sun/8.13.8) with ESMTP id m8OHCePw020199
	for <psarc-ext@sac.sfbay.sun.com>; Wed, 24 Sep 2008 10:12:40 -0700 (PDT)
Received: from nwk-avmta-1.SFBay.Sun.COM (nwk-avmta-1.SFBay.Sun.COM [129.146.11.74])
	by sunmail2sca.sfbay.sun.com (8.13.7+Sun/8.13.7/ENSMAIL,v2.2) with ESMTP id m8OHCeW3018232;
	Wed, 24 Sep 2008 10:12:40 -0700 (PDT)
Received: from pmxchannel-daemon.nwk-avmta-1.sfbay.Sun.COM by
 nwk-avmta-1.sfbay.Sun.COM
 (Sun Java System Messaging Server 6.2-3.04 (built Jul 15 2005))
 id <0K7P0041XMH4KX00@nwk-avmta-1.sfbay.Sun.COM>; Wed,
 24 Sep 2008 10:12:40 -0700 (PDT)
Received: from binky.Central.Sun.COM ([129.153.128.107])
 by nwk-avmta-1.sfbay.Sun.COM
 (Sun Java System Messaging Server 6.2-3.04 (built Jul 15 2005))
 with ESMTP id <0K7P000NLMGYET50@nwk-avmta-1.sfbay.Sun.COM>; Wed,
 24 Sep 2008 10:12:34 -0700 (PDT)
Received: from binky.Central.Sun.COM (localhost [127.0.0.1])
	by binky.Central.Sun.COM (8.14.3+Sun/8.14.3) with ESMTP id m8OHCNaC014654;
 Wed, 24 Sep 2008 12:12:23 -0500 (CDT)
Received: (from nw141292@localhost)
	by binky.Central.Sun.COM (8.14.3+Sun/8.14.3/Submit) id m8OHCN2u014653; Wed,
 24 Sep 2008 12:12:23 -0500 (CDT)
Date: Wed, 24 Sep 2008 12:12:23 -0500
From: Nicolas Williams <Nicolas.Williams@sun.com>
Subject: Re: PSARC 2008/574 Make _getgroupsbymember public
In-reply-to: <48DA7422.1010306@sun.com>
To: "Garrett D'Amore" <gdamore@sun.com>
Cc: PSARC-ext <PSARC-ext@sun.com>
Message-id: <20080924171223.GY9765@Sun.COM>
MIME-version: 1.0
Content-type: text/plain; charset=us-ascii
Content-transfer-encoding: 7BIT
Content-disposition: inline
X-PMX-Version: 5.4.1.325704
References: <48DA7422.1010306@sun.com>
X-Authentication-warning: binky.Central.Sun.COM: nw141292 set sender to
 Nicolas.Williams@sun.com using -f
User-Agent: Mutt/1.5.7i
Status: RO
Content-Length: 419

On Wed, Sep 24, 2008 at 10:08:50AM -0700, Garrett D'Amore wrote:
> We weren't sure at the meeting today that the case had converged on the 
> API, so the timer has been extended.  Can the owner (Nicolas) please 
> clarify what the final API is?   Thanks.

The final API is as described by the manpage in the case directory.

We converged before the timer expired (at least all discussion ceased
before then).

Nico
-- 

From Nicolas.Williams@sun.com Wed Sep 24 10:18:19 2008
Received: from sunmail4.singapore.sun.com (sunmail4.Singapore.Sun.COM [129.158.71.19])
	by sac.sfbay.sun.com (8.13.8+Sun/8.13.8) with ESMTP id m8OHII1Q020749
	for <psarc-ext@sac.sfbay.Sun.COM>; Wed, 24 Sep 2008 10:18:19 -0700 (PDT)
Received: from nwk-avmta-2.sfbay.sun.com (nwk-avmta-2.SFBay.Sun.COM [129.145.155.6])
	by sunmail4.singapore.sun.com (8.13.4+Sun/8.13.3/ENSMAIL,v2.2) with ESMTP id m8OHHucB001545;
	Thu, 25 Sep 2008 01:18:16 +0800 (SGT)
Received: from pmxchannel-daemon.nwk-avmta-2.sfbay.sun.com by
 nwk-avmta-2.sfbay.sun.com
 (Sun Java System Messaging Server 6.2-3.04 (built Jul 15 2005))
 id <0K7P00K03MQGAT00@nwk-avmta-2.sfbay.sun.com>; Wed,
 24 Sep 2008 10:18:16 -0700 (PDT)
Received: from binky.Central.Sun.COM ([129.153.128.107])
 by nwk-avmta-2.sfbay.sun.com
 (Sun Java System Messaging Server 6.2-3.04 (built Jul 15 2005))
 with ESMTP id <0K7P00I85MQFCC50@nwk-avmta-2.sfbay.sun.com>; Wed,
 24 Sep 2008 10:18:15 -0700 (PDT)
Received: from binky.Central.Sun.COM (localhost [127.0.0.1])
	by binky.Central.Sun.COM (8.14.3+Sun/8.14.3) with ESMTP id m8OHI5aG014676;
 Wed, 24 Sep 2008 12:18:05 -0500 (CDT)
Received: (from nw141292@localhost)
	by binky.Central.Sun.COM (8.14.3+Sun/8.14.3/Submit) id m8OHI4OP014675; Wed,
 24 Sep 2008 12:18:04 -0500 (CDT)
Date: Wed, 24 Sep 2008 12:18:04 -0500
From: Nicolas Williams <Nicolas.Williams@sun.com>
Subject: Re: PSARC 2008/574 Make _getgroupsbymember public
In-reply-to: <20080924171223.GY9765@Sun.COM>
To: "Garrett D'Amore" <gdamore@sun.com>
Cc: PSARC-ext <PSARC-ext@sun.com>
Message-id: <20080924171804.GZ9765@Sun.COM>
MIME-version: 1.0
Content-type: text/plain; charset=us-ascii
Content-transfer-encoding: 7BIT
Content-disposition: inline
X-PMX-Version: 5.4.1.325704
References: <48DA7422.1010306@sun.com> <20080924171223.GY9765@Sun.COM>
X-Authentication-warning: binky.Central.Sun.COM: nw141292 set sender to
 Nicolas.Williams@sun.com using -f
User-Agent: Mutt/1.5.7i
Status: RO
Content-Length: 553

On Wed, Sep 24, 2008 at 12:12:23PM -0500, Nicolas Williams wrote:
> On Wed, Sep 24, 2008 at 10:08:50AM -0700, Garrett D'Amore wrote:
> > We weren't sure at the meeting today that the case had converged on the 
> > API, so the timer has been extended.  Can the owner (Nicolas) please 
> > clarify what the final API is?   Thanks.
> 
> The final API is as described by the manpage in the case directory.
> 
> We converged before the timer expired (at least all discussion ceased
> before then).

This case was approved at today's PSARC meeting.

Nico
-- 

