Move everything from /var/adm to /var/log
[unleashed/lotheac.git] / share / man / man4 / ldapfilter.conf.4
blob43d6f0908882066a7cfe386a878a79dbda5e0b76
1 '\" te
2 .\" Copyright (C) 1990, Regents of the University of Michigan.  All Rights Reserved.
3 .\" Portions Copyright (C) 1997, Sun Microsystems, Inc. All Rights Reserved.
4 .\" The contents of this file are subject to the terms of the Common Development and Distribution License (the "License").  You may not use this file except in compliance with the License.
5 .\" You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE or http://www.opensolaris.org/os/licensing.  See the License for the specific language governing permissions and limitations under the License.
6 .\" When distributing Covered Code, include this CDDL HEADER in each file and include the License file at usr/src/OPENSOLARIS.LICENSE.  If applicable, add the following below this CDDL HEADER, with the fields enclosed by brackets "[]" replaced with your own identifying information: Portions Copyright [yyyy] [name of copyright owner]
7 .TH LDAPFILTER.CONF 4 "Jul 9, 2003"
8 .SH NAME
9 ldapfilter.conf \- configuration file for LDAP filtering routines
10 .SH SYNOPSIS
11 .LP
12 .nf
13 \fB/etc/opt/SUNWconn/ldap/current/ldapfilter.conf\fR
14 .fi
16 .SH DESCRIPTION
17 .sp
18 .LP
19 The \fBldapfilter.conf\fR file contains information used by the LDAP filtering
20 routines.
21 .sp
22 .LP
23 Blank lines and lines that begin with a hash character (\fB#\fR) are treated as
24 comments and ignored. The configuration information consists of lines that
25 contain one to five tokens. Tokens are separated by white space, and double
26 quotes can be used to include white space inside a token.
27 .sp
28 .LP
29 The file consists of a sequence of one or more filter sets. A filter set begins
30 with a line containing a single token called a \fItag\fR.
31 .sp
32 .LP
33 The filter set consists of a sequence of one or more filter lists. The first
34 line in a filter list must contain four or five tokens: the \fIvalue
35 pattern\fR, the \fIdelimiter list\fR, a \fIfiltertemplate\fR, a \fImatch
36 description\fR, and an optional \fIsearch scope\fR. The \fIvalue pattern\fR is
37 a regular expression that is matched against the value passed to the LDAP
38 library call to select the filter list.
39 .sp
40 .LP
41 The \fIdelimiter list\fR is a list of the characters (in the form of a single
42 string) that can be used to break the \fBvalue\fR into distinct words.
43 .sp
44 .LP
45 The \fIfilter template\fR is used to construct an LDAP filter (see description
46 below)
47 .sp
48 .LP
49 The \fImatch description\fR is returned to the caller along with a filter as a
50 piece of text that can be used to describe the sort of LDAP search that took
51 place. It should correctly compete both of the following phrases: "One \fImatch
52 description\fR match was found for ..." and "Three \fImatch description\fR
53 matches were found for...."
54 .sp
55 .LP
56 The \fIsearch scope\fR is optional, and should be one of \fBbase\fR,
57 \fBonelevel\fR, or \fBsubtree\fR. If \fIsearch scope\fR is not provided, the
58 default is \fBsubtree\fR.
59 .sp
60 .LP
61 The remaining lines of the filter list should contain two or three tokens, a
62 \fIfilter template,\fR a \fImatch description\fR and an optional \fIsearch
63 scope\fR.
64 .sp
65 .LP
66 The \fIfilter template\fR is similar in concept to a \fBprintf\fR(3C) style
67 format string. Everything is taken literally except for the character
68 sequences:
69 .sp
70 .ne 2
71 .na
72 \fB\fB%v\fR \fR
73 .ad
74 .RS 9n
75 Substitute the entire \fBvalue\fR string in place of the \fB%v\fR.
76 .RE
78 .sp
79 .ne 2
80 .na
81 \fB\fB%v$\fR \fR
82 .ad
83 .RS 9n
84 Substitute the last word in this field.
85 .RE
87 .sp
88 .ne 2
89 .na
90 \fB\fB%v\fR\fIN\fR\fR
91 .ad
92 .RS 9n
93 Substitute word \fIN\fR in this field (where \fIN\fR is a single digit
94 \fB1\fR-\fB9\fR). Words are numbered from left to right within the value
95 starting at \fB1\fR.
96 .RE
98 .sp
99 .ne 2
101 \fB\fB%v\fR\fIM-N\fR\fR
103 .RS 9n
104 Substitute the indicated sequence of words where \fIM\fR and \fIN\fR are both
105 single digits \fB1\fR-\fB9\fR.
109 .ne 2
111 \fB\fB%v\fR\fIN-\fR\fR
113 .RS 9n
114 Substitute word \fIN\fR through the last word in \fBvalue\fR where \fIN\fR is
115 again a single digit \fB1\fR-\fB9\fR.
118 .SH EXAMPLES
120 \fBExample 1 \fRAn LDAP Filter Configuration File
123 The following LDAP filter configuration file contains two filter sets,
124 \fBexample1\fR and \fBexample2 onelevel\fR, each of which contains four filter
125 lists.
128 .in +2
130 # ldap filter file
132 example1
133 "="                " "     "%v"                    "arbitrary filter"
134 "[0-9][0-9-]*"    " "     "(telephoneNumber=*%v)" "phone number"
136 "@"                " "     "(mail=%v)"             "email address"
138 "^.[. _].*"        ". _"   "(cn=%v1* %v2-)"        "first initial"
140 ".*[. _].$"        ". _"   "(cn=%v1-*)"            "last initial"
142 "[. _]"            ". _"   "(|(sn=%v1-)(cn=%v1-))"        "exact"
143                            "(|(sn~=%v1-)(cn~=%v1-))"      "approximate"
145 ".*"               ". "    "(|(cn=%v1)(sn=%v1)(uid=%v1))" "exact"
146                            "(|(cn~=%v1)(sn~=%v1))"        "approximate"
148 "example2 onelevel"
149 "^..$"  " "   "(|(o=%v)(c=%v)(l=%v)(co=%v))"       "exact" "onelevel"
150               "(|(o~=%v)(c~=%v)(l~=%v)(co~=%v))"   "approximate"
151 "onelevel"
153 " "     " "   "(|(o=%v)(l=%v)(co=%v)"       "exact"        "onelevel"
154               "(|(o~=%v)(l~=%v)(co~=%v)"    "approximate"  "onelevel"
156 "."    " "   "(associatedDomain=%v)"       "exact"        "onelevel"
158 ".*"    " "   "(|(o=%v)(l=%v)(co=%v)"       "exact"        "onelevel"
159               "(|(o~=%v)(l~=%v)(co~=%v)"    "approximate"  "onelevel"
161 .in -2
164 .SH ATTRIBUTES
167 See \fBattributes\fR(5) for a description of the following attributes:
172 box;
173 l | l
174 l | l .
175 ATTRIBUTE TYPE  ATTRIBUTE VALUE
176 Stability Level Evolving
179 .SH SEE ALSO
182 \fBldap_getfilter\fR(3LDAP), \fBldap_ufn\fR(3LDAP), \fBattributes\fR(5)