[Date Prev][Date Next]
[Chronological]
[Thread]
[Top]
Re: assert control <draft-zeilenga-ldap-assert>& add
From the I-D,
The control may be attached to directory update operations
(excepting Add) to support conditional deletion, modification,
and renaming of the target object. The control may not be
attached to the Add operation as the target object does not
(yet) exist in the directory.
The fact that an error wasn't returned when you attached the
control to an Add request should be considered a bug.
Kurt
At 04:46 AM 12/16/2005, Pierangelo Masarati wrote:
>I'm trying to use the "assert" control <draft-zeilenga-ldap-assert> to
>selectively add entries based on a filter on entryDN. It works almost
>always as expected; however, when I try, for example, to add an entry
>"cn=Foo" that already exists, and the assertion states
>"(!(entryDN:dnSubtreeMatch:=cn=Foo))", according to the specification
>I'd expect assertion occurs based on the entry that I'm adding, while
>slapd doesn't even get to checking the "assert" because it first finds
>that the entry exist and returns 68. Similar behavior occurs if the
>parent does not exist (32 is returned), or the database is shadow (10 is
>returned). My interpretation of the I.D.:
>
> When the control is attached to an LDAP request, the processing of the
> request is conditional on the evaluation of the Filter as applied
> against the target of the operation. If the Filter evaluates to TRUE,
> then the request is processed normally. If the Filter evaluates to
> FALSE or Undefined, then assertionFailed (IANA-ASSIGNED-CODE)
> resultCode is returned and no further processing is performed.
>
>in this case would be the opposite: for ADD all the info is available
>without even accessing the database, so discovering if the entry already
>exists or the parent does not exist yet is part of the "processing",
>which is conditioned to the "evaluation of the Filter". So the
>assertion should be evaluated __before__ trying to access the datum. Or
>am I missing something?
>
>p.
>
>
>
>
>Ing. Pierangelo Masarati
>Responsabile Open Solution
>
>SysNet s.n.c.
>Via Dossi, 8 - 27100 Pavia - ITALIA
>http://www.sys-net.it
>------------------------------------------
>Office: +39.02.23998309
>Mobile: +39.333.4963172
>Email: pierangelo.masarati@sys-net.it
>------------------------------------------