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 LDAPSEARCHPREFS.CONF 4 "Nov 26, 2017"
   8 .SH NAME
   9 ldapsearchprefs.conf \- configuration file for LDAP search preference routines
  10 .SH SYNOPSIS
  11 .LP
  12 .nf
  13 \fB/etc/opt/SUNWconn/ldap/current/ldapsearchprefs.conf\fR
  14 .fi
  15 
  16 .SH DESCRIPTION
  17 .LP
  18 The \fBldapsearchprefs.conf\fR file contains information used by LDAP when
  19 searching the directory. Blank lines and lines that start with a hash ('#')
  20 character are treated as comments and ignored. Non-comment lines contain one or
  21 more tokens. Tokens are separated by white space, and double quotes can be used
  22 to include white space inside a token.
  23 .sp
  24 .LP
  25 Search preferences are typically used by LDAP-based client programs to specify
  26 what a user may search for, which attributes are searched, and which options
  27 are available to the user.
  28 .sp
  29 .LP
  30 The first non-commment line specifies the version of the template information
  31 and must contain the token \fBVersion\fR followed by an integer version number.
  32 For example:
  33 .sp
  34 .in +2
  35 .nf
  36 Version 1
  37 .fi
  38 .in -2
  39 .sp
  40 
  41 .sp
  42 .LP
  43 The current version is \fI1,\fR so the above example is always the correct
  44 opening line.
  45 .sp
  46 .LP
  47 The remainder of the file consists of one or more search preference
  48 configurations. The first line of a search preference is a human-readable name
  49 for the type of object being searched for, for example \fBPeople\fR or
  50 \fBOrganizations\fR. This name is stored in the \fIso_objtypeprompt\fR member
  51 of the \fBldap_searchobj\fR structure (see \fBldap_searchprefs\fR(3LDAP)). For
  52 example:
  53 .sp
  54 .in +2
  55 .nf
  56 People
  57 .fi
  58 .in -2
  59 .sp
  60 
  61 .sp
  62 .LP
  63 specifies a label for a search preference designed to find X.500 entries for
  64 people.
  65 .sp
  66 .LP
  67 The next line specifies a list of options for this search object. The only
  68 option currently allowed is "internal" which means that this search object
  69 should not be presented directly to a user. Options are placed in the
  70 \fIso_options\fR member of the \fIldap_searchobj\fR structure and can be tested
  71 using the \fBLDAP_IS_SEARCHOBJ_OPTION_SET()\fR macro. Use "" if no special
  72 options are required.
  73 .sp
  74 .LP
  75 The next line specifies a label to use for "Fewer Choices" searches. "Fewer
  76 Choices" searches are those where the user's input is fed to the ldap_filter
  77 routines to determine an appropriate filter to use. This contrasts with
  78 explicitly-constructed LDAP filters, or "More Choices" searches, where the user
  79 can explicitly construct an LDAP filter.
  80 .sp
  81 .LP
  82 For example:
  83 .sp
  84 .in +2
  85 .nf
  86 "Search For:"
  87 .fi
  88 .in -2
  89 .sp
  90 
  91 .sp
  92 .LP
  93 can be used by LDAP client programs to label the field into which the user can
  94 type a "Fewer Choices" search.
  95 .sp
  96 .LP
  97 The next line specifies an LDAP filter prefix to append to all "More Choices"
  98 searched. This is typically used to limit the types of entries returned to
  99 those containing a specific object class. For example:
 100 .sp
 101 .in +2
 102 .nf
 103 "(&(objectClass=person)"
 104 .fi
 105 .in -2
 106 .sp
 107 
 108 .sp
 109 .LP
 110 would cause only entries containing the object class \fIperson\fR to be
 111 returned by a search. Note that parentheses may be unbalanced here, since this
 112 is a filter prefix, not an entire filter.
 113 .sp
 114 .LP
 115 The next line is an LDAP filter tag which specifies the set of LDAP filters to
 116 be applied for "Fewer Choices" searching. The line
 117 .sp
 118 .in +2
 119 .nf
 120 \fB"x500-People"\fR
 121 .fi
 122 .in -2
 123 .sp
 124 
 125 .sp
 126 .LP
 127 would tell the client program to use the set of LDAP filters from the ldap
 128 filter configuration file tagged "x500-People".
 129 .sp
 130 .LP
 131 The next line specifies an LDAP attribute to retrieve to help the user choose
 132 when several entries match the search terms specified. For example:
 133 .sp
 134 .in +2
 135 .nf
 136 "title"
 137 .fi
 138 .in -2
 139 .sp
 140 
 141 .sp
 142 .LP
 143 specifies that if more than one entry matches the search criteria, the client
 144 program should retrieve the \fBtitle\fR attribute that and present that to the
 145 user to allow them to select the appropriate entry. The next line specifies a
 146 label for the above attribute, for example,
 147 .sp
 148 .in +2
 149 .nf
 150 "Title:"
 151 .fi
 152 .in -2
 153 .sp
 154 
 155 .sp
 156 .LP
 157 Note that the values defined so far in the file are defaults, and are intended
 158 to be overridden by the specific search options that follow.
 159 .sp
 160 .LP
 161 The next line specifies the scope of the LDAP search to be performed.
 162 Acceptable values are subtree, onelevel, and base.
 163 .sp
 164 .LP
 165 The next section is a list of "More Choices" search options, terminated by a
 166 line containing only the string \fBEND\fR. For example:
 167 .sp
 168 .in +2
 169 .nf
 170 "Common Name"   cn      11111   ""      ""
 171 "Surname"       sn      11111   ""      ""
 172 "Business Phone"        "telephoneNumber"       11101   ""      ""
 173 END
 174 .fi
 175 .in -2
 176 .sp
 177 
 178 .sp
 179 .LP
 180  Each line represents one method of searching. In this example, there are three
 181 ways of searching - by Common Name, by Surname, and by Business Phone number.
 182 The first field is the text which should be displayed to user. The second field
 183 is the attribute which will be searched. The third field is a bitmap which
 184 specifies which of the match types are permitted for this search type. A "1"
 185 value in a given bit position indicates that a particular match type is valid,
 186 and a "0" indicates that is it not valid. The fourth and fifth fields are,
 187 respectively, the select attribute name and on-screen name for the selected
 188 attribute. These values are intended to override the defaults defined above. If
 189 no specific values are specified, the client software uses the default values
 190 above.
 191 .sp
 192 .LP
 193 The next section is a list of search match options, terminated by a a line
 194 containing only the string \fBEND\fR. Example:
 195 .sp
 196 .in +2
 197 .nf
 198 "exactly matches"       "(%a=%v))"
 199 "approximately matches" "(%a~=%v))"
 200 "starts with"   "(%a=%v*))"
 201 "ends with"     "(%a=*%v))"
 202 "contains"      "(%a=*%v*))"
 203 END
 204 .fi
 205 .in -2
 206 .sp
 207 
 208 .sp
 209 .LP
 210 In this example, there are five ways of refining the search. For each method,
 211 there is an LDAP filter suffix which is appended to the ldap filter.
 212 .SH EXAMPLES
 213 .LP
 214 \fBExample 1 \fRA Sample Configuration Using Search Preference for "people"
 215 .sp
 216 .LP
 217 The following example illustrates one possible configuration of search
 218 preferences for "people".
 219 
 220 .sp
 221 .in +2
 222 .nf
 223 # Version number
 224 Version 1
 225 # Name for this search object
 226 People
 227 # Label to place before text box user types in
 228 "Search For:"
 229 # Filter prefix to append to all "More Choices" searches
 230 "(&(objectClass=person)"
 231 # Tag to use for "Fewer Choices" searches - from ldapfilter.conf file
 232 "x500-People"
 233 # If a search results in > 1 match, retrieve this attribute to help
 234 # user distinguish between the entries...
 235 multilineDescription
 236 # ...and label it with this string:
 237 "Description"
 238 # Search scope to use when searching
 239 subtree
 240 # Follows a list of "More Choices" search options. Format is:
 241 # Label, attribute, select-bitmap, extra attr display name, extra attr ldap name
 242 # If last two are null, "Fewer Choices" name/attributes used
 243 "Common Name"                   cn                 11111  ""  ""
 244 "Surname"                       sn                 11111  ""  ""
 245 "Business Phone"                "telephoneNumber"  11101  ""  ""
 246 "E-Mail Address"                "mail"             11111  ""  ""
 247 "Uniqname"                      "uid"              11111  ""  ""
 248 END
 249 # Match types
 250 "exactly matches"               "(%a=%v))"
 251 "approximately matches"         "(%a~=%v))"
 252 "starts with"                   "(%a=%v*))"
 253 "ends with"                     "(%a=*%v))"
 254 "contains"                      "(%a=*%v*))"
 255 END
 256 .fi
 257 .in -2
 258 
 259 .sp
 260 .LP
 261 In this example, the user may search for People. For "fewer choices" searching,
 262 the tag for the \fBldapfilter.conf\fR(4) file is "x500-People".
 263 .SH ATTRIBUTES
 264 .LP
 265 See \fBattributes\fR(5) for a description of the following attributes:
 266 .sp
 267 
 268 .sp
 269 .TS
 270 box;
 271 c | c
 272 l | l .
 273 ATTRIBUTE TYPE  ATTRIBUTE VALUE
 274 Stability Level Evolving
 275 .TE
 276 
 277 .SH SEE ALSO
 278 .LP
 279 \fBldap_searchprefs\fR(3LDAP), \fBattributes\fR(5)