From nw141292@sac.sfbay.sun.com Wed Sep 24 14:34:04 2008
Received: from sunmail5.uk.sun.com (sunmail5.UK.Sun.COM [129.156.85.165])
	by sac.sfbay.sun.com (8.13.8+Sun/8.13.8) with ESMTP id m8OLY4MP029374
	for <psarc-ext@sac.sfbay.sun.com>; Wed, 24 Sep 2008 14:34:04 -0700 (PDT)
Received: from nwk-avmta-2.sfbay.sun.com (nwk-avmta-2.SFBay.Sun.COM [129.145.155.6])
	by sunmail5.uk.sun.com (8.13.8+Sun/8.13.8/ENSMAIL,v2.2) with ESMTP id m8OLY00B017689;
	Wed, 24 Sep 2008 22:34:03 +0100 (BST)
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 <0K7P00701YKP8C00@nwk-avmta-2.sfbay.sun.com>; Wed,
 24 Sep 2008 14:34:01 -0700 (PDT)
Received: from dm-sfbay-01.sfbay.sun.com ([129.145.155.118])
 by nwk-avmta-2.sfbay.sun.com
 (Sun Java System Messaging Server 6.2-3.04 (built Jul 15 2005))
 with ESMTP id <0K7P002TFYKP7IC0@nwk-avmta-2.sfbay.sun.com>; Wed,
 24 Sep 2008 14:34:01 -0700 (PDT)
Received: from sac.sfbay.sun.com (new-sac.SFBay.Sun.COM [129.146.175.65])
	by dm-sfbay-01.sfbay.sun.com (8.13.8+Sun/8.13.8/ENSMAIL,v2.2)
 with ESMTP id m8OLY0sl061396; Wed, 24 Sep 2008 14:34:00 -0700 (PDT)
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 m8OLXxs8029368; Wed,
 24 Sep 2008 14:33:59 -0700 (PDT)
Received: (from nw141292@localhost)
	by sac.sfbay.sun.com (8.13.8+Sun/8.13.8/Submit) id m8OLXx7h029364; Wed,
 24 Sep 2008 14:33:59 -0700 (PDT)
Date: Wed, 24 Sep 2008 14:33:59 -0700 (PDT)
From: Nicolas Williams <nw141292@sac.sfbay.sun.com>
Subject: libldap:ber_printf() 'O' in format string [PSARC/2008/607 FastTrack
 timeout 10/01/2008]
To: PSARC-ext@sun.com
Cc: sparks-discuss@opensolaris.org
Message-id: <200809242133.m8OLXx7h029364@sac.sfbay.sun.com>
Content-transfer-encoding: 7BIT
X-PMX-Version: 5.4.1.325704
Status: RO
Content-Length: 3500


Template Version: @(#)sac_nextcase %I% %G% SMI
This information is Copyright 2008 Sun Microsystems
1. Introduction
    1.1. Project/Component Working Name:
	 libldap:ber_printf() 'O' in format string
    1.2. Name of Document Author/Supplier:
	 Author:  Milan Jurik
    1.3  Date of This Document:
	24 September, 2008
4. Technical Description
1. Introduction
   1.1. Project/Component Working Name:
	Support of 'O' in format string of libldap5:ber_printf()

   1.2. Name of Document Author/Supplier:
        Milan Jurik
   1.3. Date of This Document:
	09/18/08
	
   1.4. Name of Major Document Customer(s)/Consumer(s):
        1.4.1. The PAC or CPT you expect to review your project:
                Solaris PAC     
        1.4.2. The ARC(s) you expect to review your project:
                PSARC
	1.4.3. The Director/VP who is "Sponsoring" this project:
		Chris.Armes@Sun.COM
	1.4.4. The name of your business unit:
		Software

   1.5. Email Aliases:
    	1.5.1. Responsible Manager: Joe.G@Sun.COM
    	1.5.2. Responsible Engineer: Milan.Jurik@Sun.COM

2. Project Summary
   2.1. Project Description:
        This project wants to add 'O' between characters for encoding BER
        element octet string, to improve compatibility with OpenLDAP.
   2.2. Risks and Assumptions:
        We assume no 3rd part software depending on not supported 'O' in
        format string for ber_printf()

3. Business Summary
   3.1. Problem Area:
	Samba is accessing the Active Directory using the LDAP page mode. 
	Handling the cookie between the subsequent queries
	ber_scanf()/ber_prinf() calls are used to save/restore the cookie
	payload in "ber element" and 'O' is needed for this.
	We already support 'O' in ber_scanf() today.

   3.4. Competitive Analysis:
        OpenLDAP and libldap6 support this format

   3.6. How will you know when you are done?:
        Samba bundled with Solaris will support more than 1000 users

4. Technical Description:
    4.1. Details:
        The fix is trivial and it's based on few lines of additional case in
        switch for ber_printf(), where it will reuse libldap internal function,
	which is used for similar encodings already. The fix is in sync with
	upstream.

    4.2. Bug/RFE Number(s):
        CR 6745345
        
    4.3. In Scope:
	Modification of libldap ber_printf()
    4.4. Out of Scope:
	Upgrade of libldap to the latest release because there are API changes between
	Solaris bundled libldap and upstream.
	Changing Samba LDAP backend because OpenLDAP isn't integrated in Solaris 10.
  
    4.6. Doc Impact:
	Manual page for ber_encode(3LDAP) will document new string format character.

5. Reference Documents:
	CR 6745345 - ber_printf() malforming the octet string refusing the "O" format option
	CR 6634710 - winbind fetches only first 1000 Active Directory users
	PSARC/2000/362 - libldap
	RFC 2696 - LDAP Control Extension for Simple Paged Results Manipulation

6. Resources and Schedule:
   6.1. Projected Availability:
	November 2008

   6.2. Cost of Effort:
	2 weeks	

   6.4. Product Approval Committee requested information:
   	6.4.1. Consolidation or Component Name:
		ON
	6.4.3. Type of CPT Review and Approval expected:
		BugFix
	6.4.7. Target RTI Date/Release:
		November 2008

   6.5. ARC review type:
		FastTrack
   6.6. ARC Exposure:
		open


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


From Nicolas.Williams@sun.com Wed Sep 24 22:51:05 2008
Received: from sunmail5.uk.sun.com (sunmail5.UK.Sun.COM [129.156.85.165])
	by sac.sfbay.sun.com (8.13.8+Sun/8.13.8) with ESMTP id m8P5p43d012101
	for <psarc-ext@sac.sfbay.sun.com>; Wed, 24 Sep 2008 22:51:05 -0700 (PDT)
Received: from nwk-avmta-1.SFBay.Sun.COM (nwk-avmta-1.SFBay.Sun.COM [129.146.11.74])
	by sunmail5.uk.sun.com (8.13.8+Sun/8.13.8/ENSMAIL,v2.2) with ESMTP id m8P5p0Wr023831
	for <@sunmail2sca.sfbay.sun.com:PSARC-ext@sun.com>; Thu, 25 Sep 2008 06:51:03 +0100 (BST)
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 <0K7Q00J0PLKZOR00@nwk-avmta-1.sfbay.Sun.COM> for PSARC-ext@sun.com
 (ORCPT PSARC-ext@sun.com); Wed, 24 Sep 2008 22:50:59 -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 <0K7Q00JACLKZ9Q00@nwk-avmta-1.sfbay.Sun.COM> for
 PSARC-ext@sun.com (ORCPT PSARC-ext@sun.com); Wed,
 24 Sep 2008 22:50:59 -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 m8P5hJaW017137;
 Thu, 25 Sep 2008 00:43:19 -0500 (CDT)
Received: (from nw141292@localhost)
	by binky.Central.Sun.COM (8.14.3+Sun/8.14.3/Submit) id m8P5hJ6L017136; Thu,
 25 Sep 2008 00:43:19 -0500 (CDT)
Date: Thu, 25 Sep 2008 00:43:19 -0500
From: Nicolas Williams <Nicolas.Williams@sun.com>
Subject: Re: libldap:ber_printf() 'O' in format string [PSARC/2008/607
 FastTrack timeout 10/01/2008]
In-reply-to: <200809242133.m8OLXx7h029364@sac.sfbay.sun.com>
To: Nicolas Williams <nw141292@sac.sfbay.sun.com>
Cc: PSARC-ext@sun.com, sparks-discuss@opensolaris.org
Message-id: <20080925054319.GQ9765@Sun.COM>
MIME-version: 1.0
Content-type: text/plain; charset=iso-8859-1
Content-transfer-encoding: 8BIT
Content-disposition: inline
X-PMX-Version: 5.4.1.325704
References: <200809242133.m8OLXx7h029364@sac.sfbay.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: 3978

I'm sponsoring this fast-track for Milan Jurik.

The requested release binding is patch/micro.

The timer is set for 10/01/2008.

Note: the whole interface is Committed, née Evolving.

Nico


On Wed, Sep 24, 2008 at 02:33:59PM -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:
> 	 libldap:ber_printf() 'O' in format string
>     1.2. Name of Document Author/Supplier:
> 	 Author:  Milan Jurik
>     1.3  Date of This Document:
> 	24 September, 2008
> 4. Technical Description
> 1. Introduction
>    1.1. Project/Component Working Name:
> 	Support of 'O' in format string of libldap5:ber_printf()
> 
>    1.2. Name of Document Author/Supplier:
>         Milan Jurik
>    1.3. Date of This Document:
> 	09/18/08
> 	
>    1.4. Name of Major Document Customer(s)/Consumer(s):
>         1.4.1. The PAC or CPT you expect to review your project:
>                 Solaris PAC     
>         1.4.2. The ARC(s) you expect to review your project:
>                 PSARC
> 	1.4.3. The Director/VP who is "Sponsoring" this project:
> 		Chris.Armes@Sun.COM
> 	1.4.4. The name of your business unit:
> 		Software
> 
>    1.5. Email Aliases:
>     	1.5.1. Responsible Manager: Joe.G@Sun.COM
>     	1.5.2. Responsible Engineer: Milan.Jurik@Sun.COM
> 
> 2. Project Summary
>    2.1. Project Description:
>         This project wants to add 'O' between characters for encoding BER
>         element octet string, to improve compatibility with OpenLDAP.
>    2.2. Risks and Assumptions:
>         We assume no 3rd part software depending on not supported 'O' in
>         format string for ber_printf()
> 
> 3. Business Summary
>    3.1. Problem Area:
> 	Samba is accessing the Active Directory using the LDAP page mode. 
> 	Handling the cookie between the subsequent queries
> 	ber_scanf()/ber_prinf() calls are used to save/restore the cookie
> 	payload in "ber element" and 'O' is needed for this.
> 	We already support 'O' in ber_scanf() today.
> 
>    3.4. Competitive Analysis:
>         OpenLDAP and libldap6 support this format
> 
>    3.6. How will you know when you are done?:
>         Samba bundled with Solaris will support more than 1000 users
> 
> 4. Technical Description:
>     4.1. Details:
>         The fix is trivial and it's based on few lines of additional case in
>         switch for ber_printf(), where it will reuse libldap internal function,
> 	which is used for similar encodings already. The fix is in sync with
> 	upstream.
> 
>     4.2. Bug/RFE Number(s):
>         CR 6745345
>         
>     4.3. In Scope:
> 	Modification of libldap ber_printf()
>     4.4. Out of Scope:
> 	Upgrade of libldap to the latest release because there are API changes between
> 	Solaris bundled libldap and upstream.
> 	Changing Samba LDAP backend because OpenLDAP isn't integrated in Solaris 10.
>   
>     4.6. Doc Impact:
> 	Manual page for ber_encode(3LDAP) will document new string format character.
> 
> 5. Reference Documents:
> 	CR 6745345 - ber_printf() malforming the octet string refusing the "O" format option
> 	CR 6634710 - winbind fetches only first 1000 Active Directory users
> 	PSARC/2000/362 - libldap
> 	RFC 2696 - LDAP Control Extension for Simple Paged Results Manipulation
> 
> 6. Resources and Schedule:
>    6.1. Projected Availability:
> 	November 2008
> 
>    6.2. Cost of Effort:
> 	2 weeks	
> 
>    6.4. Product Approval Committee requested information:
>    	6.4.1. Consolidation or Component Name:
> 		ON
> 	6.4.3. Type of CPT Review and Approval expected:
> 		BugFix
> 	6.4.7. Target RTI Date/Release:
> 		November 2008
> 
>    6.5. ARC review type:
> 		FastTrack
>    6.6. ARC Exposure:
> 		open
> 
> 
> 6. Resources and Schedule
>     6.4. Steering Committee requested information
>    	6.4.1. Consolidation C-team Name:
> 		PSARC
>     6.5. ARC review type: FastTrack
>     6.6. ARC Exposure: open
> 

From jhutz@cmu.edu Mon Sep 29 21:09:01 2008
Received: from newsunmail1brm.central.sun.com (newsunmail1brm.Central.Sun.COM [129.147.62.245])
	by sac.sfbay.sun.com (8.13.8+Sun/8.13.8) with ESMTP id m8U491MU029062
	for <psarc-ext@sac.sfbay.sun.com>; Mon, 29 Sep 2008 21:09:01 -0700 (PDT)
Received: from nwk-avmta-1.SFBay.Sun.COM (nwk-avmta-1.SFBay.Sun.COM [129.146.11.74])
	by newsunmail1brm.central.sun.com (8.13.7+Sun/8.13.7/ENSMAIL,v2.2) with ESMTP id m8U48wpQ019591;
	Mon, 29 Sep 2008 22:09:00 -0600 (MDT)
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 <0K7Z00B0DQ70H100@nwk-avmta-1.sfbay.Sun.COM>; Mon,
 29 Sep 2008 21:09:00 -0700 (PDT)
Received: from sca-ea-mail-1.sun.com ([192.18.43.24])
 by nwk-avmta-1.sfbay.Sun.COM
 (Sun Java System Messaging Server 6.2-3.04 (built Jul 15 2005))
 with ESMTP id <0K7Z00JYQQ70K250@nwk-avmta-1.sfbay.Sun.COM>; Mon,
 29 Sep 2008 21:09:00 -0700 (PDT)
Received: from relay22.sun.com
 (relay22.sun.com [192.12.251.34] (may be forged))	by sca-ea-mail-1.sun.com
 (8.13.7+Sun/8.12.9) with ESMTP id m8U48vv2023752; Tue,
 30 Sep 2008 04:08:59 +0000 (GMT)
Received: from mms22es.mms.us.syntegra.com ([150.143.232.30] [150.143.232.30])
 by relay22i.sun.com with ESMTP id BT-MMP-4611976; Tue,
 30 Sep 2008 04:08:57 +0000 (Z)
Received: from relay22.sun.com (relay22.sun.com [192.12.251.34])
 by mms22es.mms.us.syntegra.com with ESMTP id BT-MMP-35478406; Tue,
 30 Sep 2008 04:08:57 +0000 (Z)
Received: from chokecherry.srv.cs.cmu.edu ([128.2.185.41] [128.2.185.41])
 by relay22i.sun.com with ESMTP id BT-MMP-37391988; Tue,
 30 Sep 2008 04:08:56 +0000 (Z)
Received: from MINBAR.FAC.CS.CMU.EDU (MINBAR.FAC.CS.CMU.EDU [128.2.216.42])
	(authenticated bits=0)	by chokecherry.srv.cs.cmu.edu (8.13.6/8.13.6)
 with ESMTP id m8U47hHs001115
	(version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Tue,
 30 Sep 2008 00:07:43 -0400 (EDT)
Date: Tue, 30 Sep 2008 00:07:43 -0400
From: Jeffrey Hutzelman <jhutz@cmu.edu>
Subject: Re: [sparks-discuss] libldap:ber_printf() 'O' in format string
	[PSARC/2008/607 FastTrack timeout 10/01/2008]
In-reply-to: <20080925054319.GQ9765@Sun.COM>
To: Nicolas Williams <Nicolas.Williams@sun.com>,
        Nicolas Williams <nw141292@sac.sfbay.sun.com>
Cc: PSARC-ext@sun.com, sparks-discuss@opensolaris.org, jhutz@cmu.edu
Message-id: <11ECDC4E0D58936AEE3D5D00@minbar.fac.cs.cmu.edu>
MIME-version: 1.0
X-Mailer: Mulberry/4.0.8 (Linux/x86)
Content-type: text/plain; charset=us-ascii; format=flowed
Content-transfer-encoding: 7BIT
Content-disposition: inline
X-PMX-Version: 5.4.1.325704
X-Brightmail-Tracker: AAAAAA==
X-Scanned-By: mimedefang-cmuscs on 128.2.185.41
X-Antispam: No, score=0.0/5.0, scanned in 0.069sec at (localhost [127.0.0.1])
	by smf-spamd v1.3.1 - http://smfs.sf.net/
References: <200809242133.m8OLXx7h029364@sac.sfbay.sun.com>
 <20080925054319.GQ9765@Sun.COM>
Status: RO
Content-Length: 2136

--On Thursday, September 25, 2008 12:43:19 AM -0500 Nicolas Williams 
<Nicolas.Williams@sun.com> wrote:

>> 1. Introduction
>>    1.1. Project/Component Working Name:
>> 	Support of 'O' in format string of libldap5:ber_printf()

What does this mean?  Support for 'O' as a format conversion specifier?  As 
a flag?  Or does it currently reject format strings which contain literal 
'O' ?

I'd expect to perhaps find more detail further down, but I don't....


>>    2.1. Project Description:
>>         This project wants to add 'O' between characters for encoding BER
>>         element octet string, to improve compatibility with OpenLDAP.

What does "add 'O' between characters" mean?

If the proposal is to add a new format conversion specifier, I'd expect to 
see a description of what it does, including the type of argument expected 
and at least a general description of the format of the output string.



>>    2.2. Risks and Assumptions:
>>         We assume no 3rd part software depending on not supported 'O' in
>>         format string for ber_printf()

Again assuming the proposal is to add a new format conversion specifier, 
this assumption may not be 100% safe.  ISTR that in some printf's, unknown 
format conversions are emitted literally.  I don't know if ber_printf is 
one of these, but if so, it's possible there is code that relies on it.

Personally, I would consider any such code to be very poor, and would not 
cry if it were broken by the introduction of a previously-unsupported 
format conversion specifier.  Thus, the described risk is IMHO acceptable.




>> 4. Technical Description:
>>     4.1. Details:
>>         The fix is trivial and it's based on few lines of additional
>>         case in switch for ber_printf(), where it will reuse libldap
>>         internal function, which is used for similar encodings already.
>> 	The fix is in sync with upstream.

OK, but what argument type does it require?
What is the format of the output?
What are the effects of flags?  Precision?  Padding?
What is the name of the internal function that is called?

Nico, am I asking for too much detail?


-- Jeff

From Nicolas.Williams@sun.com Mon Sep 29 23:01:57 2008
Received: from newsunmail1brm.central.sun.com (newsunmail1brm.Central.Sun.COM [129.147.62.245])
	by sac.sfbay.sun.com (8.13.8+Sun/8.13.8) with ESMTP id m8U61uwS001400
	for <psarc-ext@sac.sfbay.sun.com>; Mon, 29 Sep 2008 23:01:56 -0700 (PDT)
Received: from brm-avmta-1.central.sun.com (brm-avmta-1.Central.Sun.COM [129.147.4.11])
	by newsunmail1brm.central.sun.com (8.13.7+Sun/8.13.7/ENSMAIL,v2.2) with ESMTP id m8U61ulJ048506
	for <@sunmail2sca.sfbay.sun.com:PSARC-ext@sun.com>; Tue, 30 Sep 2008 00:01:56 -0600 (MDT)
Received: from pmxchannel-daemon.brm-avmta-1.central.sun.com by
 brm-avmta-1.central.sun.com
 (Sun Java System Messaging Server 6.2-3.04 (built Jul 15 2005))
 id <0K7Z0020BVF88V00@brm-avmta-1.central.sun.com> for PSARC-ext@sun.com
 (ORCPT PSARC-ext@sun.com); Tue, 30 Sep 2008 00:01:56 -0600 (MDT)
Received: from binky.Central.Sun.COM ([129.153.128.104])
 by brm-avmta-1.central.sun.com
 (Sun Java System Messaging Server 6.2-3.04 (built Jul 15 2005))
 with ESMTP id <0K7Z001GCVF7OIE0@brm-avmta-1.central.sun.com> for
 PSARC-ext@sun.com (ORCPT PSARC-ext@sun.com); Tue,
 30 Sep 2008 00:01:55 -0600 (MDT)
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 m8U5keTW020472;
 Tue, 30 Sep 2008 00:46:40 -0500 (CDT)
Received: (from nw141292@localhost)
	by binky.Central.Sun.COM (8.14.3+Sun/8.14.3/Submit) id m8U5kdvq020471; Tue,
 30 Sep 2008 00:46:39 -0500 (CDT)
Date: Tue, 30 Sep 2008 00:46:39 -0500
From: Nicolas Williams <Nicolas.Williams@sun.com>
Subject: Re: [sparks-discuss] libldap:ber_printf() 'O' in format string
 [PSARC/2008/607 FastTrack timeout 10/01/2008]
In-reply-to: <11ECDC4E0D58936AEE3D5D00@minbar.fac.cs.cmu.edu>
To: Jeffrey Hutzelman <jhutz@cmu.edu>
Cc: Nicolas Williams <nw141292@sac.sfbay.sun.com>, PSARC-ext@sun.com,
        sparks-discuss@opensolaris.org
Message-id: <20080930054639.GM1157@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: <200809242133.m8OLXx7h029364@sac.sfbay.sun.com>
 <20080925054319.GQ9765@Sun.COM>
 <11ECDC4E0D58936AEE3D5D00@minbar.fac.cs.cmu.edu>
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: 833

On Tue, Sep 30, 2008 at 12:07:43AM -0400, Jeffrey Hutzelman wrote:
> --On Thursday, September 25, 2008 12:43:19 AM -0500 Nicolas Williams 
> <Nicolas.Williams@sun.com> wrote:
> 
> >>1. Introduction
> >>   1.1. Project/Component Working Name:
> >>	Support of 'O' in format string of libldap5:ber_printf()
> 
> What does this mean?  Support for 'O' as a format conversion specifier?  As 
> a flag?  Or does it currently reject format strings which contain literal 
> 'O' ?

The diffmarked manpage in the case materials explained it a bit better:

     O               Octet string. A struct berval * is supplied.  +
                     An octet string element is output.            +

It's not of the same form as the other specifiers, unless there's a typo
in the manpage.

Milan, should this be "-O" or is it really just "O"?

Nico

From Milan.Jurik@sun.com Tue Sep 30 00:50:28 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 m8U7oSsK003239
	for <psarc-ext@sac.sfbay.sun.com>; Tue, 30 Sep 2008 00:50:28 -0700 (PDT)
Received: from nwk-avmta-1.SFBay.Sun.COM (nwk-avmta-1.SFBay.Sun.COM [129.146.11.74])
	by sunmail3mpk.sfbay.sun.com (8.13.7+Sun/8.13.7/ENSMAIL,v2.2) with ESMTP id m8U7oRDc022580
	for <@sunmail2sca.sfbay.sun.com:PSARC-ext@sun.com>; Tue, 30 Sep 2008 00:50:28 -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 <0K8000F0N0G2X900@nwk-avmta-1.sfbay.Sun.COM> for PSARC-ext@sun.com
 (ORCPT PSARC-ext@sun.com); Tue, 30 Sep 2008 00:50:26 -0700 (PDT)
Received: from gmp-eb-inf-2.sun.com ([192.18.6.24])
 by nwk-avmta-1.sfbay.Sun.COM
 (Sun Java System Messaging Server 6.2-3.04 (built Jul 15 2005))
 with ESMTP id <0K8000DBL0FYV760@nwk-avmta-1.sfbay.Sun.COM> for
 PSARC-ext@sun.com (ORCPT PSARC-ext@sun.com); Tue,
 30 Sep 2008 00:50:25 -0700 (PDT)
Received: from fe-emea-10.sun.com (gmp-eb-lb-2-fe2.eu.sun.com [192.18.6.11])
	by gmp-eb-inf-2.sun.com (8.13.7+Sun/8.12.9) with ESMTP id m8U7oMbU010371	for
 <PSARC-ext@sun.com>; Tue, 30 Sep 2008 07:50:22 +0000 (GMT)
Received: from conversion-daemon.fe-emea-10.sun.com by fe-emea-10.sun.com
 (Sun Java System Messaging Server 6.2-8.04 (built Feb 28 2007))
 id <0K7Z00201ZLPP900@fe-emea-10.sun.com>
 (original mail from Milan.Jurik@Sun.COM)
 for PSARC-ext@sun.com (ORCPT PSARC-ext@sun.com); Tue,
 30 Sep 2008 08:50:22 +0100 (BST)
Received: from amd64 ([88.102.67.222])
 by fe-emea-10.sun.com (Sun Java System Messaging Server 6.2-8.04 (built Feb 28
 2007)) with ESMTPSA id <0K8000ANU0FW57C0@fe-emea-10.sun.com>; Tue,
 30 Sep 2008 08:50:21 +0100 (BST)
Date: Tue, 30 Sep 2008 09:50:20 +0200
From: Milan Jurik <Milan.Jurik@sun.com>
Subject: Re: [sparks-discuss] libldap:ber_printf() 'O' in format string
	[PSARC/2008/607 FastTrack timeout 10/01/2008]
In-reply-to: <20080930054639.GM1157@Sun.COM>
Sender: Milan.Jurik@sun.com
To: Nicolas Williams <Nicolas.Williams@sun.com>
Cc: Jeffrey Hutzelman <jhutz@cmu.edu>, PSARC-ext@sun.com,
        Nicolas Williams <nw141292@sac.sfbay.sun.com>,
        sparks-discuss@opensolaris.org
Message-id: <1222761020.3810.8.camel@localhost.localdomain>
Organization: Sun Microsystems Inc.
MIME-version: 1.0
X-Mailer: Evolution 2.6.3
Content-type: text/plain; charset=utf-8
Content-transfer-encoding: 8BIT
X-PMX-Version: 5.4.1.325704
References: <200809242133.m8OLXx7h029364@sac.sfbay.sun.com>
 <20080925054319.GQ9765@Sun.COM>
 <11ECDC4E0D58936AEE3D5D00@minbar.fac.cs.cmu.edu>
 <20080930054639.GM1157@Sun.COM>
Status: RO
Content-Length: 1111

Hi Nico,

Nicolas Williams pÃ­Å¡e v Ãšt 30. 09. 2008 v 00:46 -0500:
> On Tue, Sep 30, 2008 at 12:07:43AM -0400, Jeffrey Hutzelman wrote:
> > --On Thursday, September 25, 2008 12:43:19 AM -0500 Nicolas Williams 
> > <Nicolas.Williams@sun.com> wrote:
> > 
> > >>1. Introduction
> > >>   1.1. Project/Component Working Name:
> > >>	Support of 'O' in format string of libldap5:ber_printf()
> > 
> > What does this mean?  Support for 'O' as a format conversion specifier?  As 
> > a flag?  Or does it currently reject format strings which contain literal 
> > 'O' ?
> 
> The diffmarked manpage in the case materials explained it a bit better:
> 
>      O               Octet string. A struct berval * is supplied.  +
>                      An octet string element is output.            +
> 
> It's not of the same form as the other specifiers, unless there's a typo
> in the manpage.
> 
> Milan, should this be "-O" or is it really just "O"?
> 

ber_printf()/ber_scanf() had wrong manpage, see CR 6750301. The
characters in format string are structured in similar way as libc
printf()/scanf()

Best regards,

Milan


From Milan.Jurik@sun.com Tue Sep 30 00:56:45 2008
Received: from sunmail5.uk.sun.com (sunmail5.UK.Sun.COM [129.156.85.165])
	by sac.sfbay.sun.com (8.13.8+Sun/8.13.8) with ESMTP id m8U7uiKQ003530
	for <psarc-ext@sac.sfbay.sun.com>; Tue, 30 Sep 2008 00:56:45 -0700 (PDT)
Received: from nwk-avmta-2.sfbay.sun.com (nwk-avmta-2.SFBay.Sun.COM [129.145.155.6])
	by sunmail5.uk.sun.com (8.13.8+Sun/8.13.8/ENSMAIL,v2.2) with ESMTP id m8U7ufcD020024
	for <@sunmail2sca.sfbay.sun.com:PSARC-ext@sun.com>; Tue, 30 Sep 2008 08:56:44 +0100 (BST)
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 <0K80008010QH8O00@nwk-avmta-2.sfbay.sun.com> for PSARC-ext@sun.com
 (ORCPT PSARC-ext@sun.com); Tue, 30 Sep 2008 00:56:41 -0700 (PDT)
Received: from gmp-eb-inf-2.sun.com ([192.18.6.24])
 by nwk-avmta-2.sfbay.sun.com
 (Sun Java System Messaging Server 6.2-3.04 (built Jul 15 2005))
 with ESMTP id <0K8000HMG0QHZJA0@nwk-avmta-2.sfbay.sun.com> for
 PSARC-ext@sun.com (ORCPT PSARC-ext@sun.com); Tue,
 30 Sep 2008 00:56:41 -0700 (PDT)
Received: from fe-emea-09.sun.com (gmp-eb-lb-2-fe3.eu.sun.com [192.18.6.12])
	by gmp-eb-inf-2.sun.com (8.13.7+Sun/8.12.9) with ESMTP id m8U7uepA011197	for
 <PSARC-ext@sun.com>; Tue, 30 Sep 2008 07:56:40 +0000 (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 <0K80006010M2J200@fe-emea-09.sun.com>
 (original mail from Milan.Jurik@Sun.COM)
 for PSARC-ext@sun.com (ORCPT PSARC-ext@sun.com); Tue,
 30 Sep 2008 08:56:40 +0100 (BST)
Received: from amd64 ([88.102.67.222])
 by fe-emea-09.sun.com (Sun Java System Messaging Server 6.2-8.04 (built Feb 28
 2007)) with ESMTPSA id <0K800075G0Q0E570@fe-emea-09.sun.com>; Tue,
 30 Sep 2008 08:56:25 +0100 (BST)
Date: Tue, 30 Sep 2008 09:56:24 +0200
From: Milan Jurik <Milan.Jurik@sun.com>
Subject: Re: [sparks-discuss] libldap:ber_printf() 'O' in format string
	[PSARC/2008/607 FastTrack timeout 10/01/2008]
In-reply-to: <11ECDC4E0D58936AEE3D5D00@minbar.fac.cs.cmu.edu>
Sender: Milan.Jurik@sun.com
To: Jeffrey Hutzelman <jhutz@cmu.edu>
Cc: Nicolas Williams <Nicolas.Williams@sun.com>,
        Nicolas Williams <nw141292@sac.sfbay.sun.com>, PSARC-ext@sun.com,
        sparks-discuss@opensolaris.org
Message-id: <1222761384.3810.14.camel@localhost.localdomain>
Organization: Sun Microsystems Inc.
MIME-version: 1.0
X-Mailer: Evolution 2.6.3
Content-type: text/plain; charset=UTF-8
Content-transfer-encoding: 8BIT
X-PMX-Version: 5.4.1.325704
References: <200809242133.m8OLXx7h029364@sac.sfbay.sun.com>
 <20080925054319.GQ9765@Sun.COM>
 <11ECDC4E0D58936AEE3D5D00@minbar.fac.cs.cmu.edu>
Status: RO
Content-Length: 2679

Hi Jeffrey,

Jeffrey Hutzelman pÃ­Å¡e v Ãšt 30. 09. 2008 v 00:07 -0400:
> --On Thursday, September 25, 2008 12:43:19 AM -0500 Nicolas Williams 
> <Nicolas.Williams@sun.com> wrote:
> 
> >> 1. Introduction
> >>    1.1. Project/Component Working Name:
> >> 	Support of 'O' in format string of libldap5:ber_printf()
> 
> What does this mean?  Support for 'O' as a format conversion specifier?  As 
> a flag?  Or does it currently reject format strings which contain literal 
> 'O' ?
> 

Support as format character, octet string is added to output based on
supplied berval structure.

> I'd expect to perhaps find more detail further down, but I don't....
> 
> 
> >>    2.1. Project Description:
> >>         This project wants to add 'O' between characters for encoding BER
> >>         element octet string, to improve compatibility with OpenLDAP.
> 
> What does "add 'O' between characters" mean?
> 
> If the proposal is to add a new format conversion specifier, I'd expect to 
> see a description of what it does, including the type of argument expected 
> and at least a general description of the format of the output string.
> 
> 
> 
> >>    2.2. Risks and Assumptions:
> >>         We assume no 3rd part software depending on not supported 'O' in
> >>         format string for ber_printf()
> 
> Again assuming the proposal is to add a new format conversion specifier, 
> this assumption may not be 100% safe.  ISTR that in some printf's, unknown 
> format conversions are emitted literally.  I don't know if ber_printf is 
> one of these, but if so, it's possible there is code that relies on it.
> 
> Personally, I would consider any such code to be very poor, and would not 
> cry if it were broken by the introduction of a previously-unsupported 
> format conversion specifier.  Thus, the described risk is IMHO acceptable.
> 

If there is such software, today libldap will emit "unknown fmt O" to
stderr. And such software would be incompatible with libldap 6
(upstream) and OpenLDAP.

> 
> 
> 
> >> 4. Technical Description:
> >>     4.1. Details:
> >>         The fix is trivial and it's based on few lines of additional
> >>         case in switch for ber_printf(), where it will reuse libldap
> >>         internal function, which is used for similar encodings already.
> >> 	The fix is in sync with upstream.
> 
> OK, but what argument type does it require?
> What is the format of the output?
> What are the effects of flags?  Precision?  Padding?
> What is the name of the internal function that is called?
> 
> Nico, am I asking for too much detail?
> 
> 

As Nico already said, manpage change is part of materials. Do you need
more info?

Best regards,

Milan


From jhutz@cmu.edu Tue Sep 30 10:11:02 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 m8UHB2Cb020968
	for <psarc-ext@sac.sfbay.sun.com>; Tue, 30 Sep 2008 10:11:02 -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 m8UHAwgB028588;
	Tue, 30 Sep 2008 10:10:59 -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 <0K800051RQEBRB00@nwk-avmta-1.sfbay.Sun.COM>; Tue,
 30 Sep 2008 10:10:59 -0700 (PDT)
Received: from sca-ea-mail-3.sun.com ([192.18.43.21])
 by nwk-avmta-1.sfbay.Sun.COM
 (Sun Java System Messaging Server 6.2-3.04 (built Jul 15 2005))
 with ESMTP id <0K8000H3QQEAVUC0@nwk-avmta-1.sfbay.Sun.COM>; Tue,
 30 Sep 2008 10:10:58 -0700 (PDT)
Received: from relay14i.sun.com
 (ip124.net129179-4.block1.us.syntegra.com [129.179.4.124])
	by sca-ea-mail-3.sun.com (8.13.6+Sun/8.12.9) with ESMTP id m8UHAw8e027274;
 Tue, 30 Sep 2008 17:10:58 +0000 (GMT)
Received: from mmp13es.mmp.us.syntegra.com ([160.41.208.13] [160.41.208.13])
 by relay14i.sun.com with ESMTP id BT-MMP-330328; Tue,
 30 Sep 2008 17:10:58 +0000 (Z)
Received: from relay17i.sun.com (relay17i.sun.com [129.179.4.127])
 by mmp13es.mmp.us.syntegra.com with ESMTP id BT-MMP-117047; Tue,
 30 Sep 2008 17:10:58 +0000 (Z)
Received: from chokecherry.srv.cs.cmu.edu ([128.2.185.41] [128.2.185.41])
 by relay1ib.sun.com with ESMTP id BT-MMP-2796988; Tue,
 30 Sep 2008 17:10:57 +0000 (Z)
Received: from MINBAR.FAC.CS.CMU.EDU (MINBAR.FAC.CS.CMU.EDU [128.2.216.42])
	(authenticated bits=0)	by chokecherry.srv.cs.cmu.edu (8.13.6/8.13.6)
 with ESMTP id m8UH9nob015708
	(version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Tue,
 30 Sep 2008 13:09:49 -0400 (EDT)
Date: Tue, 30 Sep 2008 13:09:49 -0400
From: Jeffrey Hutzelman <jhutz@cmu.edu>
Subject: Re: [sparks-discuss] libldap:ber_printf() 'O' in format string
	[PSARC/2008/607 FastTrack timeout 10/01/2008]
In-reply-to: <1222761384.3810.14.camel@localhost.localdomain>
To: Milan Jurik <Milan.Jurik@sun.com>
Cc: Nicolas Williams <Nicolas.Williams@sun.com>,
        Nicolas Williams <nw141292@sac.sfbay.sun.com>, PSARC-ext@sun.com,
        sparks-discuss@opensolaris.org, jhutz@cmu.edu
Message-id: <FBB40444D6E9930BBB58781D@minbar.fac.cs.cmu.edu>
MIME-version: 1.0
X-Mailer: Mulberry/4.0.8 (Linux/x86)
Content-type: text/plain; charset=us-ascii; format=flowed
Content-transfer-encoding: 7BIT
Content-disposition: inline
X-PMX-Version: 5.4.1.325704
X-Brightmail-Tracker: AAAAAA==
X-Scanned-By: mimedefang-cmuscs on 128.2.185.41
X-Antispam: No, score=0.0/5.0, scanned in 0.052sec at (localhost [127.0.0.1])
	by smf-spamd v1.3.1 - http://smfs.sf.net/
References: <200809242133.m8OLXx7h029364@sac.sfbay.sun.com>
 <20080925054319.GQ9765@Sun.COM>
 <11ECDC4E0D58936AEE3D5D00@minbar.fac.cs.cmu.edu>
 <1222761384.3810.14.camel@localhost.localdomain>
Status: RO
Content-Length: 374

--On Tuesday, September 30, 2008 09:56:24 AM +0200 Milan Jurik 
<Milan.Jurik@Sun.COM> wrote:

> As Nico already said, manpage change is part of materials. Do you need
> more info?

I'm having trouble finding all the case materials, but I'm persuing that 
with Nico off-list.  Once that is resolved, I expect I'll find the 
information I was looking for.

Thanks...

-- Jeff

From Nicolas.Williams@sun.com Tue Sep 30 10:25:32 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 m8UHPW19021900
	for <psarc-ext@sac.sfbay.sun.com>; Tue, 30 Sep 2008 10:25:32 -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 m8UHPVfq003376
	for <@sunmail2sca.sfbay.sun.com:PSARC-ext@sun.com>; Tue, 30 Sep 2008 10:25:32 -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 <0K800070FR2J6P00@nwk-avmta-1.sfbay.Sun.COM> for PSARC-ext@sun.com
 (ORCPT PSARC-ext@sun.com); Tue, 30 Sep 2008 10:25:31 -0700 (PDT)
Received: from binky.Central.Sun.COM ([129.153.128.104])
 by nwk-avmta-1.sfbay.Sun.COM
 (Sun Java System Messaging Server 6.2-3.04 (built Jul 15 2005))
 with ESMTP id <0K8000HT6R2HUSB0@nwk-avmta-1.sfbay.Sun.COM> for
 PSARC-ext@sun.com (ORCPT PSARC-ext@sun.com); Tue,
 30 Sep 2008 10:25:30 -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 m8UHAFK5026837;
 Tue, 30 Sep 2008 12:10:15 -0500 (CDT)
Received: (from nw141292@localhost)
	by binky.Central.Sun.COM (8.14.3+Sun/8.14.3/Submit) id m8UHADLr026836; Tue,
 30 Sep 2008 12:10:13 -0500 (CDT)
Date: Tue, 30 Sep 2008 12:10:13 -0500
From: Nicolas Williams <Nicolas.Williams@sun.com>
Subject: Re: [sparks-discuss] libldap:ber_printf() 'O' in format string
 [PSARC/2008/607 FastTrack timeout 10/01/2008]
In-reply-to: <20080930054639.GM1157@Sun.COM>
To: Jeffrey Hutzelman <jhutz@cmu.edu>
Cc: Nicolas Williams <nw141292@sac.sfbay.sun.com>, PSARC-ext@sun.com,
        sparks-discuss@opensolaris.org
Message-id: <20080930171013.GO1157@Sun.COM>
MIME-version: 1.0
Content-type: multipart/mixed; boundary="Boundary_(ID_Zi8kJyRMcM2M58BkdTqbuA)"
Content-disposition: inline
X-PMX-Version: 5.4.1.325704
References: <200809242133.m8OLXx7h029364@sac.sfbay.sun.com>
 <20080925054319.GQ9765@Sun.COM>
 <11ECDC4E0D58936AEE3D5D00@minbar.fac.cs.cmu.edu>
 <20080930054639.GM1157@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: 10680


--Boundary_(ID_Zi8kJyRMcM2M58BkdTqbuA)
Content-type: text/plain; charset=us-ascii
Content-transfer-encoding: 7BIT
Content-disposition: inline

On Tue, Sep 30, 2008 at 12:46:39AM -0500, Nicolas Williams wrote:
> On Tue, Sep 30, 2008 at 12:07:43AM -0400, Jeffrey Hutzelman wrote:
> > --On Thursday, September 25, 2008 12:43:19 AM -0500 Nicolas Williams 
> > <Nicolas.Williams@sun.com> wrote:
> > 
> > >>1. Introduction
> > >>   1.1. Project/Component Working Name:
> > >>	Support of 'O' in format string of libldap5:ber_printf()
> > 
> > What does this mean?  Support for 'O' as a format conversion specifier?  As 
> > a flag?  Or does it currently reject format strings which contain literal 
> > 'O' ?
> 
> The diffmarked manpage in the case materials explained it a bit better:

For some reason said file does not appear on the opensolaris.org page
for this case.  Can someone tell me how to make it appear there?

In the meantime I've attached it to this post.

Nico
-- 

--Boundary_(ID_Zi8kJyRMcM2M58BkdTqbuA)
Content-type: text/plain; NAME=arc-ber_printf.txt; charset=us-ascii
Content-transfer-encoding: 7BIT
Content-disposition: attachment; filename=arc-ber_printf.txt




LDAP Library Functions                          ber_encode(3LDAP)



NAME
     ber_encode,     ber_alloc,     ber_printf,      ber_put_int,
     ber_put_ostring,        ber_put_string,        ber_put_null,
     ber_put_boolean,      ber_put_bitstring,      ber_start_seq,
     ber_start_set,  ber_put_seq,  ber_put_set - simplified Basic
     Encoding Rules library encoding functions

SYNOPSIS
     cc[ flag... ] file... -lldap[ library... ]

     #include <lber.h>

     BerElement*ber_alloc();

     ber_printf(BerElement *ber, char **fmt[, arg... ]);

     ber_put_int(BerElement *ber, long num, char tag);

     ber_put_ostring(BerElement *ber, char **str,  unsigned  long
     len, char tag);

     ber_put_string(BerElement *ber, char **str, char tag);

     ber_put_null(BerElement *ber, char tag);

     ber_put_boolean(BerElement *ber, int bool, char tag);

     ber_put_bitstring(BerElement *ber, char *str, int blen, char
     tag);

     ber_start_seq(BerElement *ber, char tag);

     ber_start_set(BerElement *ber, char tag);

     ber_put_seq(BerElement *ber);

     ber_put_set(BerElement *ber);

DESCRIPTION
     These functions provide a subfunction interface to a simpli-
     fied  implementation  of  the Basic Encoding Rules of ASN.1.
     The version of  BER  these  functions  support  is  the  one
     defined  for  the LDAP protocol.  The encoding rules are the
     same as BER, except that  only  definite  form  lengths  are
     used, and bitstrings and octet strings are always encoded in
     primitive form.  In addition, these  lightweight  BER  func-
     tions restrict tags and class to fit in a single octet (this
     means the actual tag must be less than 31).  When a "tag" is
     specified  in  the descriptions below, it refers to the tag,
     class, and primitive or constructed bit in the  first  octet
     of the encoding.  This man page describes the encoding func-
     tions  in  the  lber  library.   See  ber_decode(3LDAP)  for



SunOS 5.10          Last change: 27 Jan 2002                    1






LDAP Library Functions                          ber_encode(3LDAP)



     details on the corresponding decoding functions.

     Normally, the only functions  that  need  be  called  by  an
     application are  ber_alloc(), to allocate a BER element, and
     ber_printf() to do the actual encoding.  The other functions
     are  provided  for those applications that need more control
     than
      ber_printf() provides.  In general, these functions  return
     the  length  of  the  element  encoded,  or  -1  if an error
     occurred.

     The  ber_alloc() function is used to allocate a new BER ele-
     ment.

     The  ber_printf() function is used to encode a  BER  element
     in much the same way that  sprintf(3S) works.  One important
     difference, though, is that some state information  is  kept
     with the ber parameter so that multiple calls can be made to
     ber_printf() to append things to the end of the BER element.
     Ber_printf()  writes  to ber, a pointer to a BerElement such
     as returned by  ber_alloc(). It interprets and  formats  its
     arguments  according  to  the  format string fmt. The format
     string can contain the following characters:

     -b              Boolean.  An  integer  parameter  should  be
                     supplied.  A boolean element is output.



     -i              Integer.  An  integer  parameter  should  be
                     supplied.  An integer element is output.



     -B              Bitstring.  A char * pointer to the start of
                     the  bitstring  is supplied, followed by the
                     number of bits in  the  bitstring.   A  bit-
                     string element is output.



     -n              Null.  No parameter  is  required.   A  null
                     element is output.



     -o              Octet string.  A char *  is  supplied,  fol-
                     lowed  by  the  length of the string pointed
                     to.  An octet string element is output.

     O               Octet string. A struct berval * is supplied.  +
                     An octet string element is output.            +




SunOS 5.10          Last change: 27 Jan 2002                    2






LDAP Library Functions                          ber_encode(3LDAP)



     -s              Octet string.  A null-terminated  string  is
                     supplied.   An  octet string element is out-
                     put, not including the trailing NULL octet.



     -t              Tag.  An int specifying the tag to give  the
                     next  element is provided. This works across
                     calls.



     -v              Several octet  strings.   A  null-terminated
                     array  of char *'s is supplied.  Note that a
                     construct like '{v}' is required to  get  an
                     actual SEQUENCE OF octet strings.



     -{              Begin sequence.  No parameter is required.



     -}              End sequence.  No parameter is required.



     -[              Begin set.  No parameter is required.



     -]              End set.  No parameter is required.



     The  ber_put_int() function writes the integer  element  num
     to the BER element ber.

     The  ber_put_boolean() function  writes  the  boolean  value
     given by bool to the BER element.

     The  ber_put_bitstring() function writes blen bits  starting
     at  str as a bitstring value to the given BER element.  Note
     that blen is the length in bits of the bitstring.

     The  ber_put_ostring() function writes len bytes starting at
     str to the BER element as an octet string.

     The  ber_put_string() function  writes  the  null-terminated
     string  (minus  the terminating '') to the BER element as an
     octet string.




SunOS 5.10          Last change: 27 Jan 2002                    3






LDAP Library Functions                          ber_encode(3LDAP)



     The  ber_put_null() function writes a  NULL element  to  the
     BER element.

     The  ber_start_seq() function is used to start a sequence in
     the  BER element.  The  ber_start_set() function works simi-
     larly. The end of the sequence  or  set  is  marked  by  the
     nearest  matching  call to  ber_put_seq() or  ber_put_set(),
     respectively.

     The  ber_first_element() function is used to return the  tag
     and  length  of  the first element in a set or sequence.  It
     also returns in cookie a magic cookie parameter that  should
     be  passed  to subsequent calls to ber_next_element(), which
     returns similar information.

EXAMPLES
     Example 1: Assuming the following variable declarations, and
     that  the variables have been assigned appropriately, an BER
     encoding of the following ASN.1 object:

           AlmostASearchRequest := SEQUENCE {
               baseObject      DistinguishedName,
               scope           ENUMERATED {
                   baseObject    (0),
                   singleLevel   (1),
                   wholeSubtree  (2)
               },
               derefAliases    ENUMERATED {
                   neverDerefaliases   (0),
                   derefInSearching    (1),
                   derefFindingBaseObj (2),
                   alwaysDerefAliases  (3N)
               },
               sizelimit       INTEGER (0 .. 65535),
               timelimit       INTEGER (0 .. 65535),
               attrsOnly       BOOLEAN,
               attributes      SEQUENCE OF AttributeType
           }


     can be achieved like so:

           int    scope, ali, size, time, attrsonly;
           char   *dn, **attrs;

           /* ... fill in values ... */
           if ( (ber = ber_alloc()) == NULLBER )
           /* error */

           if ( ber_printf( ber, "{siiiib{v}}", dn, scope, ali,
               size, time, attrsonly, attrs ) == -1 )
                   /* error */



SunOS 5.10          Last change: 27 Jan 2002                    4






LDAP Library Functions                          ber_encode(3LDAP)



           else
                   /* success */


RETURN VALUES
     If an error  occurs  during  encoding,  ber_alloc()  returns
     NULL; other functions generally return -1.

ATTRIBUTES
     See attributes(5) for a description of the following  attri-
     butes:

     ____________________________________________________________
    |       ATTRIBUTE TYPE        |       ATTRIBUTE VALUE       |
    | Availability                | SUNWcsl (32-bit)            |
    |                             | SUNWcslx (64-bit)           |
    | Interface Stability         | Evolving                    |
    |_____________________________|_____________________________|


SEE ALSO
     attributes(5), ber_decode(3LDAP)

     Yeong, W., Howes, T., and Hardcastle-Kille, S., "Lightweight
     Directory Access Protocol", OSI-DS-26, April 1992.

     Information Processing  -  Open  Systems  Interconnection  -
     Model  and  Notation - Service Definition - Specification of
     Basic Encoding  Rules  for  Abstract  Syntax  Notation  One,
     International  Organization  for  Standardization,  Interna-
     tional Standard 8825.

NOTES
     The return values for all of these functions are declared in
     the <lber.h> header file.




















SunOS 5.10          Last change: 27 Jan 2002                    5




--Boundary_(ID_Zi8kJyRMcM2M58BkdTqbuA)--

From jhutz@cmu.edu Tue Sep 30 10:36:04 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 m8UHa4ju022184
	for <psarc-ext@sac.sfbay.sun.com>; Tue, 30 Sep 2008 10:36:04 -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 m8UHa2vv006681;
	Tue, 30 Sep 2008 10:36:03 -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 <0K8000815RK17600@nwk-avmta-1.sfbay.Sun.COM>; Tue,
 30 Sep 2008 10:36:01 -0700 (PDT)
Received: from brmea-mail-1.sun.com ([192.18.98.31])
 by nwk-avmta-1.sfbay.Sun.COM
 (Sun Java System Messaging Server 6.2-3.04 (built Jul 15 2005))
 with ESMTP id <0K8000HWGRK0USC0@nwk-avmta-1.sfbay.Sun.COM>; Tue,
 30 Sep 2008 10:36:00 -0700 (PDT)
Received: from relay44i.sun.com ([192.5.209.118])
	by brmea-mail-1.sun.com (8.13.6+Sun/8.12.9) with ESMTP id m8UHTQI9010427; Tue,
 30 Sep 2008 17:35:59 +0000 (GMT)
Received: from mms49es.mms.us.syntegra.com ([160.41.221.232] [160.41.221.232])
 by relay44i.sun.com with ESMTP id BT-MMP-865885; Tue,
 30 Sep 2008 17:35:59 +0000 (Z)
Received: from relay41i.sun.com (relay41i.sun.com [192.5.209.70])
 by mms49es.mms.us.syntegra.com with ESMTP id BT-MMP-71152989; Tue,
 30 Sep 2008 17:35:59 +0000 (Z)
Received: from chokecherry.srv.cs.cmu.edu ([128.2.185.41] [128.2.185.41])
 by relay4i.sun.com with ESMTP id BT-MMP-14009221; Tue,
 30 Sep 2008 17:35:59 +0000 (Z)
Received: from MINBAR.FAC.CS.CMU.EDU (MINBAR.FAC.CS.CMU.EDU [128.2.216.42])
	(authenticated bits=0)	by chokecherry.srv.cs.cmu.edu (8.13.6/8.13.6)
 with ESMTP id m8UHZ5Y7019318
	(version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Tue,
 30 Sep 2008 13:35:05 -0400 (EDT)
Date: Tue, 30 Sep 2008 13:35:05 -0400
From: Jeffrey Hutzelman <jhutz@cmu.edu>
Subject: Re: [sparks-discuss] libldap:ber_printf() 'O' in format string
 [PSARC/2008/607 FastTrack timeout 10/01/2008]
In-reply-to: <20080930171013.GO1157@Sun.COM>
To: Nicolas Williams <Nicolas.Williams@sun.com>
Cc: Nicolas Williams <nw141292@sac.sfbay.sun.com>, PSARC-ext@sun.com,
        sparks-discuss@opensolaris.org, jhutz@cmu.edu
Message-id: <D92406EA0EF14D6DC1A5E950@minbar.fac.cs.cmu.edu>
MIME-version: 1.0
X-Mailer: Mulberry/4.0.8 (Linux/x86)
Content-type: text/plain; charset=us-ascii; format=flowed
Content-transfer-encoding: 7BIT
Content-disposition: inline
X-PMX-Version: 5.4.1.325704
X-Brightmail-Tracker: AAAAAA==
X-Scanned-By: mimedefang-cmuscs on 128.2.185.41
X-Antispam: No, score=0.0/5.0, scanned in 0.068sec at (localhost [127.0.0.1])
	by smf-spamd v1.3.1 - http://smfs.sf.net/
References: <200809242133.m8OLXx7h029364@sac.sfbay.sun.com>
 <20080925054319.GQ9765@Sun.COM>
 <11ECDC4E0D58936AEE3D5D00@minbar.fac.cs.cmu.edu>
 <20080930054639.GM1157@Sun.COM> <20080930171013.GO1157@Sun.COM>
Status: RO
Content-Length: 1066

--On Tuesday, September 30, 2008 12:10:13 PM -0500 Nicolas Williams 
<Nicolas.Williams@sun.com> wrote:

> On Tue, Sep 30, 2008 at 12:46:39AM -0500, Nicolas Williams wrote:
>> On Tue, Sep 30, 2008 at 12:07:43AM -0400, Jeffrey Hutzelman wrote:
>> > --On Thursday, September 25, 2008 12:43:19 AM -0500 Nicolas Williams
>> > <Nicolas.Williams@sun.com> wrote:
>> >
>> > >> 1. Introduction
>> > >>   1.1. Project/Component Working Name:
>> > >>	Support of 'O' in format string of libldap5:ber_printf()
>> >
>> > What does this mean?  Support for 'O' as a format conversion
>> > specifier?  As  a flag?  Or does it currently reject format strings
>> > which contain literal  'O' ?
>>
>> The diffmarked manpage in the case materials explained it a bit better:
>
> For some reason said file does not appear on the opensolaris.org page
> for this case.  Can someone tell me how to make it appear there?
>
> In the meantime I've attached it to this post.

OK; in context, I think all my questions are answered.
A pox upon whoever decided to name something "printf" that isn't.

From wyllys.ingersoll@sun.com Tue Sep 30 10:40:56 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 m8UHeu8A022283
	for <psarc-ext@sac.sfbay.sun.com>; Tue, 30 Sep 2008 10:40:56 -0700 (PDT)
Received: from brm-avmta-1.central.sun.com (brm-avmta-1.Central.Sun.COM [129.147.4.11])
	by sunmail3mpk.sfbay.sun.com (8.13.7+Sun/8.13.7/ENSMAIL,v2.2) with ESMTP id m8UHessF029899;
	Tue, 30 Sep 2008 10:40:55 -0700 (PDT)
Received: from pmxchannel-daemon.brm-avmta-1.central.sun.com by
 brm-avmta-1.central.sun.com
 (Sun Java System Messaging Server 6.2-3.04 (built Jul 15 2005))
 id <0K800060FRS65000@brm-avmta-1.central.sun.com>; Tue,
 30 Sep 2008 11:40:54 -0600 (MDT)
Received: from jurassic-x4600.sfbay.sun.com ([129.146.17.63])
 by brm-avmta-1.central.sun.com
 (Sun Java System Messaging Server 6.2-3.04 (built Jul 15 2005))
 with ESMTP id <0K8000K7ERS47FB0@brm-avmta-1.central.sun.com>; Tue,
 30 Sep 2008 11:40:52 -0600 (MDT)
Received: from [10.7.251.182] (punchin-wyllys.SFBay.Sun.COM [10.7.251.182])
	by jurassic-x4600.sfbay.sun.com (8.14.3+Sun/8.14.3)
 with ESMTP id m8UHe4L6771249
	(version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Tue,
 30 Sep 2008 10:40:12 -0700 (PDT)
Date: Tue, 30 Sep 2008 13:39:58 -0400
From: Wyllys Ingersoll <wyllys.ingersoll@sun.com>
Subject: Re: [sparks-discuss] libldap:ber_printf() 'O' in format string
 [PSARC/2008/607 FastTrack timeout 10/01/2008]
In-reply-to: <20080930171013.GO1157@Sun.COM>
To: Nicolas Williams <Nicolas.Williams@sun.com>
Cc: Jeffrey Hutzelman <jhutz@cmu.edu>,
        Nicolas Williams <nw141292@sac.sfbay.sun.com>, PSARC-ext@sun.com,
        sparks-discuss@opensolaris.org
Message-id: <48E2646E.9000100@sun.com>
MIME-version: 1.0
Content-type: text/plain; charset=ISO-8859-1; format=flowed
Content-transfer-encoding: 7BIT
X-PMX-Version: 5.4.1.325704
References: <200809242133.m8OLXx7h029364@sac.sfbay.sun.com>
 <20080925054319.GQ9765@Sun.COM>
 <11ECDC4E0D58936AEE3D5D00@minbar.fac.cs.cmu.edu>
 <20080930054639.GM1157@Sun.COM> <20080930171013.GO1157@Sun.COM>
User-Agent: Thunderbird 2.0.0.14 (X11/20080728)
Status: RO
Content-Length: 944

Nicolas Williams wrote:
>> The diffmarked manpage in the case materials explained it a bit better:
>>     
>
> For some reason said file does not appear on the opensolaris.org page
> for this case.  Can someone tell me how to make it appear there?
>
> In the meantime I've attached it to this post.
>
> Nico
>   


Why are these functions part of libldap and not in their own library ?  
They standalone very nicely
and are useful to other projects that have nothing to do with LDAP.    
KMF needed BER/DER
functions but with some additional format conversions that were not 
supported, so we ended up
making a project-private copy and modifying them to suit our needs.  If 
they had already been
part of a standalone library, we would have proposed changes to that 
library and kept it public.

So, has anyone considered factoring the ber_* functions out of libldap 
and created a new lib dedicated
to parsing and formatting ASN.1?

-Wyllys



From John.Plocher@sun.com Tue Sep 30 10:48:47 2008
Received: from sunmail5.uk.sun.com (sunmail5.UK.Sun.COM [129.156.85.165])
	by sac.sfbay.sun.com (8.13.8+Sun/8.13.8) with ESMTP id m8UHmkqP022343
	for <psarc-ext@sac.sfbay.sun.com>; Tue, 30 Sep 2008 10:48:47 -0700 (PDT)
Received: from nwk-avmta-2.sfbay.sun.com (nwk-avmta-2.SFBay.Sun.COM [129.145.155.6])
	by sunmail5.uk.sun.com (8.13.8+Sun/8.13.8/ENSMAIL,v2.2) with ESMTP id m8UHmeUm005852
	for <@sunmail2sca.sfbay.sun.com:PSARC-ext@sun.com>; Tue, 30 Sep 2008 18:48:43 +0100 (BST)
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 <0K8000803S55T100@nwk-avmta-2.sfbay.sun.com> for PSARC-ext@sun.com
 (ORCPT PSARC-ext@sun.com); Tue, 30 Sep 2008 10:48:41 -0700 (PDT)
Received: from sca-es-mail-1.sun.com ([192.18.43.132])
 by nwk-avmta-2.sfbay.sun.com
 (Sun Java System Messaging Server 6.2-3.04 (built Jul 15 2005))
 with ESMTP id <0K80007OVS55JM20@nwk-avmta-2.sfbay.sun.com> for
 PSARC-ext@sun.com (ORCPT PSARC-ext@sun.com); Tue,
 30 Sep 2008 10:48:41 -0700 (PDT)
Received: from fe-sfbay-09.sun.com ([192.18.43.129])
	by sca-es-mail-1.sun.com (8.13.7+Sun/8.12.9) with ESMTP id m8UHmfQc004145	for
 <PSARC-ext@sun.com>; Tue, 30 Sep 2008 10:48:41 -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 <0K8000701QQ2GM00@fe-sfbay-09.sun.com>
 (original mail from John.Plocher@Sun.COM)
 for PSARC-ext@sun.com (ORCPT PSARC-ext@sun.com); Tue,
 30 Sep 2008 10:48:41 -0700 (PDT)
Received: from wp668.SFBay.Sun.COM ([129.146.226.219])
 by fe-sfbay-09.sun.com (Sun Java System Messaging Server 6.2-8.04 (built Feb
 28 2007)) with ESMTPSA id <0K800029XS4XCG50@fe-sfbay-09.sun.com>; Tue,
 30 Sep 2008 10:48:33 -0700 (PDT)
Date: Tue, 30 Sep 2008 10:48:32 -0700
From: John Plocher <John.Plocher@sun.com>
Subject: Re: [sparks-discuss] libldap:ber_printf() 'O' in format string
	[PSARC/2008/607 FastTrack timeout 10/01/2008]
In-reply-to: <20080930171013.GO1157@Sun.COM>
Sender: John.Plocher@sun.com
To: Nicolas Williams <Nicolas.Williams@sun.com>
Cc: Jeffrey Hutzelman <jhutz@cmu.edu>, PSARC-ext@sun.com,
        Nicolas Williams <nw141292@sac.sfbay.sun.com>,
        sparks-discuss@opensolaris.org
Message-id: <48E26670.4000704@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
References: <200809242133.m8OLXx7h029364@sac.sfbay.sun.com>
 <20080925054319.GQ9765@Sun.COM>
 <11ECDC4E0D58936AEE3D5D00@minbar.fac.cs.cmu.edu>
 <20080930054639.GM1157@Sun.COM> <20080930171013.GO1157@Sun.COM>
User-Agent: Thunderbird 2.0.0.16 (Macintosh/20080707)
Status: RO
Content-Length: 1223

Nicolas Williams wrote:
> For some reason said file does not appear on the opensolaris.org page
> for this case.  Can someone tell me how to make it appear there?

I'm working on it.  I think it has to do with the embedded 
quotes in the IAM filename...

> In the meantime I've attached it to this post.

The man page description seems odd and inconsistent.

It says
	The format string can contain the following 
	characters: -b ... -n ... -o ... O ...

(note the leading hyphens in front of everything
except the new 'O' character)

The problem is that it doesn't.  The example shows

    ber_printf( ber, "{siiiib{v}}", ...)

no "-" signs at all, anywhere.  The man page should instead
present the characters in the list as quoted characters:

     'O'             Octet string. A struct berval * is supplied.  +
                     An octet string element is output.            +

(it is probably out of scope to complain about the misuse of
the printf() design pattern this way - printf uses '%' as
a formatting character escape/identifier and passes thru
everything else unchanged.  ber_printf() takes *every*
character in its format string as a formatting command,
and errors out on unexpected commands.)

  -John



From Milan.Jurik@sun.com Tue Sep 30 10:50:10 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 m8UHo9Nj022359
	for <psarc-ext@sac.sfbay.Sun.COM>; Tue, 30 Sep 2008 10:50:09 -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 m8UHnmn8025921
	for <@sunmail2sca.sfbay.sun.com:PSARC-ext@sun.com>; Wed, 1 Oct 2008 01:50:08 +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 <0K800080RS7IVC00@nwk-avmta-2.sfbay.sun.com> for PSARC-ext@sun.com
 (ORCPT PSARC-ext@sun.com); Tue, 30 Sep 2008 10:50:06 -0700 (PDT)
Received: from gmp-eb-inf-2.sun.com ([192.18.6.24])
 by nwk-avmta-2.sfbay.sun.com
 (Sun Java System Messaging Server 6.2-3.04 (built Jul 15 2005))
 with ESMTP id <0K80007K0S7GJB20@nwk-avmta-2.sfbay.sun.com> for
 PSARC-ext@sun.com (ORCPT PSARC-ext@sun.com); Tue,
 30 Sep 2008 10:50:05 -0700 (PDT)
Received: from fe-emea-10.sun.com (gmp-eb-lb-2-fe3.eu.sun.com [192.18.6.12])
	by gmp-eb-inf-2.sun.com (8.13.7+Sun/8.12.9) with ESMTP id m8UHo4Es029794	for
 <PSARC-ext@sun.com>; Tue, 30 Sep 2008 17:50:04 +0000 (GMT)
Received: from conversion-daemon.fe-emea-10.sun.com by fe-emea-10.sun.com
 (Sun Java System Messaging Server 6.2-8.04 (built Feb 28 2007))
 id <0K8000B01S780I00@fe-emea-10.sun.com>
 (original mail from Milan.Jurik@Sun.COM)
 for PSARC-ext@sun.com (ORCPT PSARC-ext@sun.com); Tue,
 30 Sep 2008 18:50:04 +0100 (BST)
Received: from [10.0.2.15] ([88.102.67.222])
 by fe-emea-10.sun.com (Sun Java System Messaging Server 6.2-8.04 (built Feb 28
 2007)) with ESMTPSA id <0K8000AFZS7F0N00@fe-emea-10.sun.com> for
 PSARC-ext@sun.com (ORCPT PSARC-ext@sun.com); Tue,
 30 Sep 2008 18:50:04 +0100 (BST)
Date: Tue, 30 Sep 2008 19:50:03 +0200
From: Milan Jurik <Milan.Jurik@sun.com>
Subject: Re: [sparks-discuss] libldap:ber_printf() 'O' in format string
	[PSARC/2008/607 FastTrack timeout 10/01/2008]
In-reply-to: <48E2646E.9000100@sun.com>
Sender: Milan.Jurik@sun.com
To: Wyllys Ingersoll <Wyllys.Ingersoll@sun.com>
Cc: PSARC-ext@sun.com, sparks-discuss@opensolaris.org
Message-id: <1222797003.672.9.camel@vbindiana>
Organization: Sun Microsystems
MIME-version: 1.0
X-Mailer: Evolution 2.22.2
Content-type: text/plain
Content-transfer-encoding: 8BIT
X-PMX-Version: 5.4.1.325704
References: <200809242133.m8OLXx7h029364@sac.sfbay.sun.com>
 <20080925054319.GQ9765@Sun.COM>
 <11ECDC4E0D58936AEE3D5D00@minbar.fac.cs.cmu.edu>
 <20080930054639.GM1157@Sun.COM> <20080930171013.GO1157@Sun.COM>
 <48E2646E.9000100@sun.com>
Status: RO
Content-Length: 1556

Hi Wyllys,

Wyllys Ingersoll pÃ­Å¡e v Ãºt 30. 09. 2008 v 13:39 -0400:
> Nicolas Williams wrote:
> >> The diffmarked manpage in the case materials explained it a bit better:
> >>     
> >
> > For some reason said file does not appear on the opensolaris.org page
> > for this case.  Can someone tell me how to make it appear there?
> >
> > In the meantime I've attached it to this post.
> >
> > Nico
> >   
> 
> 
> Why are these functions part of libldap and not in their own library ?

Because 15 years history of libldap? :-)

>   
> They standalone very nicely
> and are useful to other projects that have nothing to do with LDAP.    
> KMF needed BER/DER
> functions but with some additional format conversions that were not 
> supported, so we ended up
> making a project-private copy and modifying them to suit our needs.  If 
> they had already been
> part of a standalone library, we would have proposed changes to that 
> library and kept it public.
> 
> So, has anyone considered factoring the ber_* functions out of libldap 
> and created a new lib dedicated
> to parsing and formatting ASN.1?
> 

ber_printf()/ber_scanf() are committed interfaces of libldap in Solaris,
so you can use them in other projects (they don't depend in internal
status of libldap). If you want to split them out of libldap, then this
should be discussed with upstream (Mozilla) at first. Also, if you need
to enhance them, you can cooperate with upstream. We already forked the
code once already and it would be better to not to do it even more.

Best regards,

Milan


From Nicolas.Williams@Sun.COM Tue Sep 30 10:52:27 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 m8UHqQRO022396
	for <psarc-ext@sac.sfbay.Sun.COM>; Tue, 30 Sep 2008 10:52:27 -0700 (PDT)
Received: from nwk-avmta-1.SFBay.Sun.COM (nwk-avmta-1.SFBay.Sun.COM [129.146.11.74])
	by sunmail4.singapore.sun.com (8.13.4+Sun/8.13.3/ENSMAIL,v2.2) with ESMTP id m8UHqNOm026760
	for <@sunmail2sca.sfbay.sun.com:PSARC-ext@sun.com>; Wed, 1 Oct 2008 01:52:25 +0800 (SGT)
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 <0K800090FSBCS300@nwk-avmta-1.sfbay.Sun.COM> for PSARC-ext@sun.com
 (ORCPT PSARC-ext@sun.com); Tue, 30 Sep 2008 10:52:24 -0700 (PDT)
Received: from binky.Central.Sun.COM ([129.153.128.104])
 by nwk-avmta-1.sfbay.Sun.COM
 (Sun Java System Messaging Server 6.2-3.04 (built Jul 15 2005))
 with ESMTP id <0K8000HEISBCVUF0@nwk-avmta-1.sfbay.Sun.COM> for
 PSARC-ext@sun.com (ORCPT PSARC-ext@sun.com); Tue,
 30 Sep 2008 10:52:24 -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 m8UHbB6H027312;
 Tue, 30 Sep 2008 12:37:11 -0500 (CDT)
Received: (from nw141292@localhost)
	by binky.Central.Sun.COM (8.14.3+Sun/8.14.3/Submit) id m8UHbBIP027311; Tue,
 30 Sep 2008 12:37:11 -0500 (CDT)
Date: Tue, 30 Sep 2008 12:37:11 -0500
From: Nicolas Williams <Nicolas.Williams@Sun.COM>
Subject: Re: [sparks-discuss] libldap:ber_printf() 'O' in format string
 [PSARC/2008/607 FastTrack timeout 10/01/2008]
In-reply-to: <D92406EA0EF14D6DC1A5E950@minbar.fac.cs.cmu.edu>
To: Jeffrey Hutzelman <jhutz@cmu.edu>
Cc: Nicolas Williams <nw141292@sac.sfbay.sun.com>, PSARC-ext@Sun.COM,
        sparks-discuss@opensolaris.org
Message-id: <20080930173710.GQ1157@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: <200809242133.m8OLXx7h029364@sac.sfbay.sun.com>
 <20080925054319.GQ9765@Sun.COM>
 <11ECDC4E0D58936AEE3D5D00@minbar.fac.cs.cmu.edu>
 <20080930054639.GM1157@Sun.COM> <20080930171013.GO1157@Sun.COM>
 <D92406EA0EF14D6DC1A5E950@minbar.fac.cs.cmu.edu>
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: 1298

On Tue, Sep 30, 2008 at 01:35:05PM -0400, Jeffrey Hutzelman wrote:
> --On Tuesday, September 30, 2008 12:10:13 PM -0500 Nicolas Williams 
> <Nicolas.Williams@sun.com> wrote:
> 
> >On Tue, Sep 30, 2008 at 12:46:39AM -0500, Nicolas Williams wrote:
> >>On Tue, Sep 30, 2008 at 12:07:43AM -0400, Jeffrey Hutzelman wrote:
> >>> --On Thursday, September 25, 2008 12:43:19 AM -0500 Nicolas Williams
> >>> <Nicolas.Williams@sun.com> wrote:
> >>>
> >>> >> 1. Introduction
> >>> >>   1.1. Project/Component Working Name:
> >>> >>	Support of 'O' in format string of libldap5:ber_printf()
> >>>
> >>> What does this mean?  Support for 'O' as a format conversion
> >>> specifier?  As  a flag?  Or does it currently reject format strings
> >>> which contain literal  'O' ?
> >>
> >>The diffmarked manpage in the case materials explained it a bit better:
> >
> >For some reason said file does not appear on the opensolaris.org page
> >for this case.  Can someone tell me how to make it appear there?
> >
> >In the meantime I've attached it to this post.
> 
> OK; in context, I think all my questions are answered.
> A pox upon whoever decided to name something "printf" that isn't.

Apparently it is printf-like, it's just that the manpage is not clear on
this at all.  Milan posted the CR # for the manpage bug.

From Nicolas.Williams@sun.com Tue Sep 30 12:40:48 2008
Received: from newsunmail1brm.central.sun.com (newsunmail1brm.Central.Sun.COM [129.147.62.245])
	by sac.sfbay.sun.com (8.13.8+Sun/8.13.8) with ESMTP id m8UJemYQ024967
	for <psarc-ext@sac.sfbay.sun.com>; Tue, 30 Sep 2008 12:40:48 -0700 (PDT)
Received: from nwk-avmta-2.sfbay.sun.com (nwk-avmta-2.SFBay.Sun.COM [129.145.155.6])
	by newsunmail1brm.central.sun.com (8.13.7+Sun/8.13.7/ENSMAIL,v2.2) with ESMTP id m8UJei9V019362;
	Tue, 30 Sep 2008 13:40:46 -0600 (MDT)
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 <0K8000C01XBYY100@nwk-avmta-2.sfbay.sun.com>; Tue,
 30 Sep 2008 12:40:46 -0700 (PDT)
Received: from binky.Central.Sun.COM ([129.153.128.104])
 by nwk-avmta-2.sfbay.sun.com
 (Sun Java System Messaging Server 6.2-3.04 (built Jul 15 2005))
 with ESMTP id <0K80007W2XBXJJA0@nwk-avmta-2.sfbay.sun.com>; Tue,
 30 Sep 2008 12:40:45 -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 m8UJX3d0028529;
 Tue, 30 Sep 2008 14:33:03 -0500 (CDT)
Received: (from nw141292@localhost)
	by binky.Central.Sun.COM (8.14.3+Sun/8.14.3/Submit) id m8UJX37T028528; Tue,
 30 Sep 2008 14:33:03 -0500 (CDT)
Date: Tue, 30 Sep 2008 14:33:03 -0500
From: Nicolas Williams <Nicolas.Williams@sun.com>
Subject: Re: [sparks-discuss] libldap:ber_printf() 'O' in format string
 [PSARC/2008/607 FastTrack timeout 10/01/2008]
In-reply-to: <1222797003.672.9.camel@vbindiana>
To: Milan Jurik <Milan.Jurik@sun.com>
Cc: Wyllys Ingersoll <Wyllys.Ingersoll@sun.com>, PSARC-ext@sun.com,
        sparks-discuss@opensolaris.org
Message-id: <20080930193302.GR1157@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: <200809242133.m8OLXx7h029364@sac.sfbay.sun.com>
 <20080925054319.GQ9765@Sun.COM>
 <11ECDC4E0D58936AEE3D5D00@minbar.fac.cs.cmu.edu>
 <20080930054639.GM1157@Sun.COM> <20080930171013.GO1157@Sun.COM>
 <48E2646E.9000100@sun.com> <1222797003.672.9.camel@vbindiana>
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: 859

On Tue, Sep 30, 2008 at 07:50:03PM +0200, Milan Jurik wrote:
> > Why are these functions part of libldap and not in their own library ?
> 
> Because 15 years history of libldap? :-)

Well, we could move these functions out into a separate library and then
leave behind filters for backwards compatibility.

But that's not this case.  Also, there's been a lot of reluctance to
make any changes to our libldap sources that aren't synchronized with
the upstream sources.  That's been a source of frustration for some of
us (e.g., idmapd has to work around an annoying SASL-related bug in
libldap; the workaround is for idmapd to do its own connection
management that duplicates what libldap already does).  If you can make
the case that we that we would get more value from diverging where
useful/necessary than from keeping diffs to a minimum, great.

Nico
-- 

From Nicolas.Williams@sun.com Thu Oct  2 11:50:33 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 m92IoX8V021046
	for <psarc-ext@sac.sfbay.sun.com>; Thu, 2 Oct 2008 11:50:33 -0700 (PDT)
Received: from nwk-avmta-1.SFBay.Sun.COM (nwk-avmta-1.SFBay.Sun.COM [129.146.11.74])
	by sunmail3mpk.sfbay.sun.com (8.13.7+Sun/8.13.7/ENSMAIL,v2.2) with ESMTP id m92IoWSH003951
	for <@sunmail2sca.sfbay.sun.com:PSARC-ext@sun.com>; Thu, 2 Oct 2008 11:50:33 -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 <0K840050FKC7T300@nwk-avmta-1.sfbay.Sun.COM> for PSARC-ext@sun.com
 (ORCPT PSARC-ext@sun.com); Thu, 02 Oct 2008 11:50:31 -0700 (PDT)
Received: from binky.Central.Sun.COM ([129.153.128.104])
 by nwk-avmta-1.sfbay.Sun.COM
 (Sun Java System Messaging Server 6.2-3.04 (built Jul 15 2005))
 with ESMTP id <0K84001XCKC62770@nwk-avmta-1.sfbay.Sun.COM> for
 PSARC-ext@sun.com (ORCPT PSARC-ext@sun.com); Thu,
 02 Oct 2008 11:50:31 -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 m92Igk3c028852;
 Thu, 02 Oct 2008 13:42:46 -0500 (CDT)
Received: (from nw141292@localhost)
	by binky.Central.Sun.COM (8.14.3+Sun/8.14.3/Submit) id m92IgkIm028851; Thu,
 02 Oct 2008 13:42:46 -0500 (CDT)
Date: Thu, 02 Oct 2008 13:42:46 -0500
From: Nicolas Williams <Nicolas.Williams@sun.com>
Subject: Re: libldap:ber_printf() 'O' in format string [PSARC/2008/607
 FastTrack timeout 10/01/2008]
In-reply-to: <200809242133.m8OLXx7h029364@sac.sfbay.sun.com>
To: Nicolas Williams <nw141292@sac.sfbay.sun.com>
Cc: PSARC-ext@sun.com, sparks-discuss@opensolaris.org
Message-id: <20081002184246.GQ1157@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: <200809242133.m8OLXx7h029364@sac.sfbay.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: 118

The timer has expired.  There has been review.  No spec changes were
needed.

I'm closing this as approved.

Nico
-- 

