Subject: LDIF Standard

From: Chris Leong <[email-masked]>
Date: Tue, 23 Feb 2010 16:52:31 +1100

Hi,

I am implementing a parser for LDIF, working off the document here:
http://tools.ietf.org/html/rfc2849. A ldif-change file has a
changetype: possibly after some control: lines. This changetype line
seems to be the only difference between change and content ldif files.
However, looking closely at the specification, the standard doesn't
actually say that LDIF content files *can't* be this format either
through the syntax or in a note. Is this an omission?

Thanks,

Chris

-- 
Chris Leong
ICT Security
Blog: http://www.casebash.wordpress.com/

---

From: Kurt Zeilenga <[email-masked]>
Date: Tue, 23 Feb 2010 14:22:12 -0800

> through the syntax or in a note. Is this an omission?

RFC 4829:
   An LDIF file specifies a set of directory entries, or a set
   of changes to be applied to directory entries, but not both.

-- Kurt

---

From: Chris Leong <[email-masked]>
Date: Wed, 24 Feb 2010 09:31:45 +1100

I am aware of this, but the syntax still seems ambiguous. The only way
I could find to tell if an LDIF file is a set of directory entries or
a set of changes is to see if there is a changetype possibly after
some controls. But even then, the standard doesn't state that this
can't be interpreted as a content file.

---

From: Kurt Zeilenga <[email-masked]>
Date: Tue, 23 Feb 2010 15:30:28 -0800

On Feb 23, 2010, at 2:31 PM, Chris Leong wrote:

> some controls.

If the "dn-spec" is followed by a control or by a changerecord, the record is a ldif-change-record.  Otherwise it's a ldif-attrval-record.

There is a conflict between LDIF keywords and AttributeDescriptions.  This issue was addressed (after the publication of RFC 2849) by reserving LDIF keywords in the LDAP descriptor registry for use in LDIF.  With this, one shouldn't have an attribute called "control" or "changetype".

If ever RFC 2849 is revised, a note concerning how LDIF parsers should distinguish change and content records could be added.

Note: Discussion of LDIF standardization can be taken [email-masked] mailing list.

-- Kurt