[sparks-discuss] libldap:ber_printf() 'O' in format string [PSARC/2008/607 FastTrack timeout 10/01/2008]

Milan Jurik Milan.Jurik at sun.com
Tue Sep 30 00:56:24 PDT 2008


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 at 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




More information about the opensolaris-arc mailing list