1 .TH LDAPFILTER.CONF 5 "22 September 1998" "OpenLDAP LDVERSION"
3 .\" Copyright 1998-1999 The OpenLDAP Foundation All Rights Reserved.
4 .\" Copying restrictions apply. See COPYRIGHT/LICENSE.
6 ldapfilter.conf \- configuration file for LDAP get filter routines
12 .B ETCDIR/ldapfilter.conf
13 contains information used by
14 the LDAP get filter routines (see
15 .BR ldap-getfilter (3)).
17 lines that have a first character of `#' are treated as comments and
18 ignored. The configuration information consists of lines that contain
19 one, two, three, four, or five tokens. Tokens are separated
20 by white space, and double quotes `"' can be used to include white space
23 The file consists of a sequence of one or more filter sets. A filter
24 set begins with a line containing a single token called a
29 .BR ldap_getfirstfilter (3)
30 call to select the filter set.
32 The filter set consists of a sequence of one or more filter lists. The
33 first line in a filter list must contain four or five tokens: the
45 is a regular expression that is matched against the
48 .BR ldap_getfirstfilter (3)
49 call to select the filter list.
53 is a list of characters (in the form of a single string) that are used to
60 is used to construct an LDAP filter (it is described further below)
64 is returned to the called along with a filter as a piece of text that can
65 be used to describe the sort of LDAP search that took place. It should
66 correctly compete both of the following phrases:
69 match was found for..."
73 matches were found for...."
77 is optional, and should be one of "base", "onelevel", or "subtree". If
79 is not provided, the default is "subtree".
81 The remaining lines of the filter list should contain two or three tokens,
92 is similar in concept to a printf(3) style format
93 string. Everything is taken literally except for the character
106 means to substitute the entire
108 string in place of the
111 means substitute the last word in this spot.
114 where N is a single digit 1-9, means substitute word N in this spot.
115 Words are number from left to right within the value starting at 1.
118 where M and N are both single digits 1-9, means substitute the indicated
122 where N is again a single digit 1-9, means substitute word N through the
126 The following ldap filter configuration file contains two filter sets
131 each of which contains four filter lists.
137 "=" " " "%v" "arbitrary filter"
139 "[0-9][0-9\-]*" " " "(telephoneNumber=*%v)" "phone number"
141 "@" " " "(mail=%v)" "email address"
143 "^.[. _].*" ". _" "(cn=%v1* %v2-)" "first initial"
145 ".*[. _].$" ". _" "(cn=%v1-*)" "last initial"
147 "[. _]" ". _" "(|(sn=%v1-)(cn=%v1-))" "exact"
148 "(|(sn~=%v1-)(cn~=%v1-))" "approximate"
150 ".*" ". " "(|(cn=%v1)(sn=%v1)(uid=%v1))" "exact"
151 "(|(cn~=%v1)(sn~=%v1))" "approximate"
154 "^..$" " " "(|(o=%v)(c=%v)(l=%v)(co=%v))" "exact" "onelevel"
155 "(|(o~=%v)(c~=%v)(l~=%v)(co~=%v))" "approximate" "onelevel"
157 " " " " "(|(o=%v)(l=%v)(co=%v)" "exact" "onelevel"
158 "(|(o~=%v)(l~=%v)(co~=%v)" "approximate" "onelevel"
160 "\." " " "(associatedDomain=%v)" "exact" "onelevel"
162 ".*" " " "(|(o=%v)(l=%v)(co=%v)" "exact" "onelevel"
163 "(|(o~=%v)(l~=%v)(co~=%v)" "approximate" "onelevel"
168 ldap_getfirstfilter( lfdp, "finger", "m.smith" );
170 will return an LDAPFiltInfo structure with the
172 member containing the string
176 member containing the string
180 containing the value LDAP_SCOPE_SUBTREE.
184 ldap_getfirstfilter( lfdp, "go500gw onelevel", "umich" );
186 will return an LDAPFiltInfo structure with the
188 member containing the string
189 .I (|(o=umich)(l=umich)(co=umich)
192 member containing the string
196 containing the value LDAP_SCOPE_ONELEVEL.
198 ETCDIR/ldapfilter.conf
201 .BR ldap_getfilter (3)
204 is developed and maintained by The OpenLDAP Project (http://www.openldap.org/).
206 is derived from University of Michigan LDAP 3.3 Release.