hi list,
is it possible to write a filter like:
(&(objectClass=inetOrgPerson)(mail=cn))
to retrieve all entry that attribute mail equal to attribute cn.
thanks
On 03/05/2014 02:52 AM, Lanfeust troy wrote:
hi list,
is it possible to write a filter like:
(&(objectClass=inetOrgPerson)(mail=cn))
to retrieve all entry that attribute mail equal to attribute cn.
thanks
I have never tried it, but I bet not. For starters I don't see how the interpreter would be able to tell that your value on the right side of the = is an attribute name and not a value to compare to.
Am 05.03.2014 09:52, schrieb Lanfeust troy:
hi list,
is it possible to write a filter like:
(&(objectClass=inetOrgPerson)(mail=cn))
to retrieve all entry that attribute mail equal to attribute cn.
thanks
No, RFC 4515 does not define such. On the right side of the operator ("filtertype") an attribute value ("assertionvalue") is expected and not an attribute type ("attr" which is "attributedescription"). "attr" is only is expected on the left side of the operator:
simple = attr filtertype assertionvalue
You will need a little scripting to achieve what you want.
Cheers,
Peter
Peter Gietz wrote:
Am 05.03.2014 09:52, schrieb Lanfeust troy:
hi list,
is it possible to write a filter like:
(&(objectClass=inetOrgPerson)(mail=cn))
to retrieve all entry that attribute mail equal to attribute cn.
thanks
No, RFC 4515 does not define such. On the right side of the operator ("filtertype") an attribute value ("assertionvalue") is expected and not an attribute type ("attr" which is "attributedescription"). "attr" is only is expected on the left side of the operator:
simple = attr filtertype assertionvalue
You will need a little scripting to achieve what you want.
Or propose an extended matching rule, write a spec for it, and get some code written to implement it. For this particular use case it probably wouldn't be too hard.
Cheers,
Peter
openldap-technical@openldap.org