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

Re: (ITS#5312) ldapmodify(1) man page claims that "changetype:" not necessary

hyc@symas.com writes:
>daveh@coreng.com.au wrote:
>> As a followup, I should point out that this behaviour worked in at least
>> 2.2 and 2.3.
> Yes, I recall changing this in the 2.4 code; I guess I didn't update
> the manpage.

Not sure which of this discussion should go where - I saw it first in
the ldap@umich list.  But anyway, I suggest to revert that change.  If
anything, the LDIF RFC could be revised instead.  This format has been
supported since umich ldap (before the LDIF RFC was written).

Note that the format which OpenLDAP-2.4 ldapmodify reads is still not
LDIF, since "changetype:" defaults to modify instead of add.  That's
incompatible with LDIF.  OTOH default operation "replace:" for
changetype "modify" was compatible with LDIF, since LDIF does not
support a missing "add/delete/replace:" for changetype modify.

Some history:

- umich ldap-3.3 (1996): There were two LDIF defaults: Whether a missing
  "changetype:" would default to "add" or "modify", and whether a
  missing attribute operation type would default to "add" or "replace".
  These were controlled by different flags: -a (or invoking as ldapadd)
  for the first, -r (replace) for the second.

- RFC 2849 - LDIF (2000): The defaults "changetype:modify" and
  "replace:" were dropped, presumably because a file format could not
  support command line options.

- OpenLDAP 2.1 (2002): Removed the -r option and instead made it the
  default when changetype was modify (and thus for ldapmodify).  -r was
  only used with ldapmodify and was usually what one wanted there.
  (Note that "replace:" is equivalent to "add:" if the attribute does
  not already exist in the entry.)