[Date Prev][Date Next]
[Chronological]
[Thread]
[Top]
Re: search on a DN typed attribute
Michael Parienti wrote:
>
> On Wed, 10 Oct 2001 18:41:59 +0200
> Pierangelo Masarati <masarati@aero.polimi.it> wrote:
>
> > "Michaël Parienti" wrote:
> > >
> > > I would like to perform a search on an attribute which is a
> > > 'DN attribute'. Here is a subset of my schema:
> > >
> > > attributetype ( 1.3.6.1.4.1.10650.2.10.0.0.27.2.1.3 NAME (
> > 'eeadminattach' )
> > > SYNTAX 1.3.6.1.4.1.1466.115.121.1.12
> > > SINGLE-VALUE )
> > >
> > > objectclass ( 1.3.6.1.4.1.10650.2.10.0.0.27.2.2.1 NAME 'eeperson' SUP
> > person STRUCTURAL
> > > MAY ( gn $ mail $ title $ eeadminattach ) )
> > >
> > > The attribute 'eeadminattach' is the DN of another entry in
> > > my directory.
> > >
> > > Now, I want to get all the people whose 'eeadminattach' has
> > > the following DN: 'cn=Ouest,dc=easter-eggs,dc=com'. How do I
> > > write the filter to perform this search ?
> > >
> > > I tried:
> > > p5adminattach=cn=Ouest,dc=easter-eggs,dc=com
> > > p5adminattach=cn=Ouest\,dc=easter-eggs\,dc=com
> >
> > According to your mail, you are using a wrong attribute type;
> > you should filter for
> >
> > '(eeadminattach=cn=Ouest,dc=easter-eggs,dc=com)'
>
> Of course I made a typing mistake. What I tried was:
> eeadminattach=cn=Ouest,dc=easter-eggs,dc=com
> eeadminattach=cn=Ouest\,dc=easter-eggs\,dc=com
I also note that the attribute type definition lacks the
EQUALITY distinguishedNameMatch
matching rule, which is required for the filter to work.
So your schema file should read
attributetype ( 1.3.6.1.4.1.10650.2.10.0.0.27.2.1.3
NAME 'eeadminattach'
EQUALITY distinguishedNameMatch
SYNTAX 1.3.6.1.4.1.1466.115.121.1.12
SINGLE-VALUE )
Another point is ACLs: you need to have read access to the attribute,
to the entry end to the subtree where it resides. This is not the
point, of course, if you're testing it using the rootdn.
Pierangelo.
--
Dr. Pierangelo Masarati | voice: +39 02 2399 8309
Dip. Ing. Aerospaziale | fax: +39 02 2399 8334
Politecnico di Milano | mailto:masarati@aero.polimi.it
via La Masa 34, 20156 Milano, Italy |
http://www.aero.polimi.it/~masarati