[Date Prev][Date Next]
[Chronological]
[Thread]
[Top]
compare result codes
I've been reviewing the BLITS compare tests and had a couple
of questions regarding the proper result code to return
upon certain conditions:
1) unknown attribute type
2) compare known attribute type without defined equality matching rule
3) not present attribute type with asserted value of invalid syntax
4) not present attribute type with asserted value of valid syntax
5) present attribute type with asserted value of invalid syntax
6) present attribute type with asserted value of valid syntax
and attribute without asserted value
7) present attribute with asserted value of valid syntax
and attribute with value
What result code is appropriate for each case?
Here are my initial thoughts:
1) undefinedAttributeType
2) inappropriateMatching
3) noSuchAttribute (syntax not relevant in this case)
4) noSuchAttribute
5) invalidAttributeSyntax
6) compareFalse
7) compareTrue
This usage is fairly consistent with X.511, 12.4.
"An attributeError reports an attribute-related problem."
a) noSuchAttributeOrValue - The named entry lacks one of the
attributes or attribute values specified as an argument
of the operation.
b) invalidAttributeSyntax - A purported attribute value, specified
as an argument of the operation, does not conform to the attribute
syntax of the attribute type.
c) undefinedAttributeType - An undefined attribute type was provided
as an argument to the operation. This error may occur only in
relation to addEntry or modifyEntry operations.
d) inappropriateMatching - An attempt was made, e.g. in a filter,
to use a matching rule not defined for the attribute type concerned.
excepting that c) specifically says the error may only occur in
relation to addEntry or modifyEntry operations. Now, one could
return noSuchAttribute(OrValue), but this seems inappropriate
as it implies able to determine the entry doesn't contain the
attribute type... which implies the attribute type is defined...
which it isn't.
Maybe a clarification to X.511 is in order to either:
A) change c) above to allow return by compare
B) clarifiy which result codes should be returned
in the cases listed above.
Maybe this could be done for LDAP in the rescodes I-D.
Kurt