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

RE: LDAP Filter



> -----Original Message-----
> From: owner-openldap-software@OpenLDAP.org
> [mailto:owner-openldap-software@OpenLDAP.org]On Behalf Of Quanah
Gibson-Mount

> --On Friday, May 21, 2004 11:47 AM -0700 ms419@freezone.co.uk wrote:
>
> > I am trying to define an LDAP filter which matches entries with
> > attributes a: x, b: y, c: z; AND, if no entries have these
> attributes,
> > entries with attributes a: x, b: y, and no attribute c.

Since a: x, b: y are required regardless of c, you should factor them out:
  (a: x AND b: y) AND (c: z OR c: <absent>)

> "(&(&(a=x)(b=y)(c=z))(&(a=x)(b=y)(!(c=*))))"

(&(&(a=x)(b=y)(|(c=z)(!(c=*)))))

  -- Howard Chu
  Chief Architect, Symas Corp.       Director, Highland Sun
  http://www.symas.com               http://highlandsun.com/hyc
  Symas: Premier OpenSource Development and Support