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

search problem

I am migrating our current LDAP directory to OpenLDAP 2.2.13

As part of this I am now storing a DN in the attribute roleoccupant (as one should). The problem I have is that I don't seem to be able to search on this attribute. For example using the Net::LDAP Perl module to do the following

$filter = "(roleoccupant=employeenumber=1182,ou=people,o=bath.ac.uk)"

$result = $ldap->search (
    base   => $base,
    scope => "sub",
    filter => $filter

Seems to return all entries for which any attribute has the value
"employeenumber=1182,ou=people,o=bath.ac.uk" not just roleoccupant.

For example the following record is returned along with the expected one.

dn: shortou=ADM-PENT,ou=units,o=bath.ac.uk
cn: Modern Pentathlon Association of Great Britain
objectClass: BathOu
parentou: ADM-REGR
shortou: ADM-PENT
maintainer: employeeNumber=1182,ou=people,o=bath.ac.uk
maintainer: employeeNumber=121867,ou=people,o=bath.ac.uk
maintainer: employeeNumber=45410,ou=people,o=bath.ac.uk
maintainer: employeeNumber=786953,ou=people,o=bath.ac.uk

I have defined "maintainer" as follows in the local schema file

attributetype ( BathAttributeType:31 NAME 'maintainer'
   DESC 'Directory Maintainer'
   SUP roleoccupant

ie with SUP roleoccupant, but I would not expect that to lead to the observed behaviour.

The record I am searching for contains
roleoccupant: employeenumber=1182,ou=people,o=bath.ac.uk

Can anyone explain this behaviour?

Paul Christie
Bath University Computing Services