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

Re: commit: ldap/servers/slapd slap.h controls.c



> At 11:23 PM 6/15/2004, Pierangelo Masarati wrote:
>>> I think this change should be backed out.  The specification
>>> here is flawed here for a number of reasons.  First, because
>>> completely ignoring such a pagedresult control can lead to
>>> masking of other errors, such as protocol errors due to
>>> attachment of two pagedresult controls to the request.
>>
>>I think the specification is clear in this point; if it's flawed that's
>>somthing I can't tell.
>
> Well, I think you are also being overly elevating a
> "should ignore" to a "will completely ignore" or "MUST
> completely ignore".
>
> The language "should ignore" does not imply an absolute
> imperative.  I think it simply meant that were
> sizeLimitExceeded is returned, no paging occurs.
>
> But I don't think it meant the server should otherwise
> ignore the control.  The server should parse the whole
> control (including the cookie) (returning errors as
> appropriate), should abandon if requested, should detect
> protocol errors due to combination of this control with
> other controls, etc..
>
>>In any case, I think my essential point was to introduce
>>the possibility of ignoring a control, in case slapd deems
>>it appropriate, and make the pr a bit rfc-compliant, since
>>I happened to read it again :)
>
> This (the general "ignore" mechanism I find even more
> problematic at is counter to what RFC 2251 implies.  If
> a control is recognized and appropriate for the operation,
> the server is to make use of the control.  So, any
> ignoring of this control must be part of making use of
> it, not a general control capability.
>
> Your point about reducing work in slapd in this
> pagedresult case is valid.  My suggestion here is to
> set the o_pagedresults_size to -1 (or other negative
> value) and use that to disable paging work.

What I mean by "slapd to ignore a control" is: after parsing
it, and after finding that it was correctly sent and interpreted,
but for some reason does not apply to the corrent operation,
safely ignore it.  In fact, AFAIR, I put this check after all
the consistency checks (but, actually, before the cookie was
checked for validity).

I guess a better solution would be to check the cookie first;
then, if pageSize >= sizeLimit, set o_pagedresults = SLAP_IGNORED_CONTROL
(to be defined and set e.g. to -1) to allow checking for
duplicate control, and inform the frontend that the control
was ignored.  My idea of ignoring a control is also that there
might be controls that are not requested to be critical, and
which can be safely ignored (i.e. as if they never came in)
as opposed to being passed thru to the operation.  If you think
this would never be the case, I'm fine with removing that
possibility.

In the meanwhile, I'm adding the SLAP_IGNORE_CONTROL feature
to pagedResults.

Ciao, p.

-- 
Pierangelo Masarati
mailto:pierangelo.masarati@sys-net.it


    SysNet - via Dossi,8 27100 Pavia Tel: +390382573859 Fax: +390382476497