1 .TH LDAPFILTER.CONF 5 "21 September 1994" "U-M LDAP LDVERSION"
3 ldapfilter.conf \- configuration file for LDAP get filter routines
9 .B ETCDIR/ldapfilter.conf
10 contains information used by
11 the LDAP get filter routines (see
12 .BR ldap-getfilter (3)).
14 lines that have a first character of `#' are treated as comments and
15 ignored. The configuration information consists of lines that contain
16 one, two, three, four, or five tokens. Tokens are separated
17 by white space, and double quotes `"' can be used to include white space
20 The file consists of a sequence of one or more filter sets. A filter
21 set begins with a line containing a single token called a
26 .BR ldap_getfirstfilter (3)
27 call to select the filter set.
29 The filter set consists of a sequence of one or more filter lists. The
30 first line in a filter list must contain four or five tokens: the
42 is a regular expression that is matched against the
45 .BR ldap_getfirstfilter (3)
46 call to select the filter list.
50 is a list of characters (in the form of a single string) that are used to
57 is used to construct an LDAP filter (it is described further below)
61 is returned to the called along with a filter as a piece of text that can
62 be used to describe the sort of LDAP search that took place. It should
63 correctly compete both of the following phrases:
66 match was found for..."
70 matches were found for...."
74 is optional, and should be one of "base", "onelevel", or "subtree". If
76 is not provided, the default is "subtree".
78 The remaining lines of the filter list should contain two or three tokens,
89 is similar in concept to a printf(3) style format
90 string. Everything is taken literally except for the character
103 means to substitute the entire
105 string in place of the
108 means substitute the last word in this spot.
111 where N is a single digit 1-9, means substitute word N in this spot.
112 Words are number from left to right within the value starting at 1.
115 where M and N are both single digits 1-9, means substitute the indicated
119 where N is again a single digit 1-9, means substitute word N through the
123 The following ldap filter configuration file contains two filter sets
128 each of which contains four filter lists.
134 "=" " " "%v" "arbitrary filter"
136 "[0-9][0-9\-]*" " " "(telephoneNumber=*%v)" "phone number"
138 "@" " " "(mail=%v)" "email address"
140 "^.[. _].*" ". _" "(cn=%v1* %v2-)" "first initial"
142 ".*[. _].$" ". _" "(cn=%v1-*)" "last initial"
144 "[. _]" ". _" "(|(sn=%v1-)(cn=%v1-))" "exact"
145 "(|(sn~=%v1-)(cn~=%v1-))" "approximate"
147 ".*" ". " "(|(cn=%v1)(sn=%v1)(uid=%v1))" "exact"
148 "(|(cn~=%v1)(sn~=%v1))" "approximate"
151 "^..$" " " "(|(o=%v)(c=%v)(l=%v)(co=%v))" "exact" "onelevel"
152 "(|(o~=%v)(c~=%v)(l~=%v)(co~=%v))" "approximate" "onelevel"
154 " " " " "(|(o=%v)(l=%v)(co=%v)" "exact" "onelevel"
155 "(|(o~=%v)(l~=%v)(co~=%v)" "approximate" "onelevel"
157 "\." " " "(associatedDomain=%v)" "exact" "onelevel"
159 ".*" " " "(|(o=%v)(l=%v)(co=%v)" "exact" "onelevel"
160 "(|(o~=%v)(l~=%v)(co~=%v)" "approximate" "onelevel"
165 ldap_getfirstfilter( lfdp, "finger", "m.smith" );
167 will return an LDAPFiltInfo structure with the
169 member containing the string
173 member containing the string
177 containing the value LDAP_SCOPE_SUBTREE.
181 ldap_getfirstfilter( lfdp, "go500gw onelevel", "umich" );
183 will return an LDAPFiltInfo structure with the
185 member containing the string
186 .I (|(o=umich)(l=umich)(co=umich)
189 member containing the string
193 containing the value LDAP_SCOPE_ONELEVEL.
195 ETCDIR/ldapfilter.conf
198 .BR ldap_getfilter (3)