[Date Prev][Date Next] [Chronological] [Thread] [Top]

Empty LDIF values (ITS#2218)

Version: REL_ENG_2_1
URL: ftp://ftp.openldap.org/incoming/
Submission from: (NULL) (

>From posting to openldap-devel mailing list:

Michael Ströder writes:

>> If I set the RootDSE's DN in the LDIF with a line containing "dn:" it works.

>> But with "dn: " I get "root_dse: could not parse entry".
>>  From my understanding of RFC 2849 both should work.
>> dn-spec                  = "dn:" (FILL distinguishedName /
>>                                    ":" FILL base64-distinguishedName)
>> FILL                     = *SPACE

Indeed.  Also from RFC 2849:

      5)  When a zero-length attribute value is to be included directly
          in an LDIF file, it MUST be represented as
          AttributeDescription ":" FILL SEP.

The libldif code to return different values for "attr:" and "attr: "
looks like a feature, since it handles both cases distinctly, but I
can't understand why.  ("if ( *s == '\0' )" line 117 vs. line 146.)
Since an empty value can be returned in any case, it looks better to
remove the error for "attr: " and return an empty value then too.