-.TH LDAP_SEARCH 3 "23 November 1994" "U-M LDAP LDVERSION"
+.TH LDAP_SEARCH 3 "25 July 1999" "OpenLDAP LDVERSION"
+.\" $OpenLDAP$
+.\" Copyright 1998-2002 The OpenLDAP Foundation All Rights Reserved.
+.\" Copying restrictions apply. See COPYRIGHT/LICENSE.
.SH NAME
ldap_search, ldap_search_s, ldap_search_st \- Perform an LDAP search operation
.SH SYNOPSIS
.nf
.ft B
#include <sys/time.h> /* for struct timeval definition */
-#include <lber.h>
#include <ldap.h>
.LP
.ft B
.LP
The '~=' construct is used to specify approximate matching. The
representation for <attributetype> and <attributevalue> are as
-described in RFC 1778. In addition, <attributevalue> can be a single *
+described in RFC 2254. In addition, <attributevalue> can be a single *
to achieve an attribute existence test, or can contain text and *'s
interspersed to achieve substring matching.
.LP
attribute. The filter "mail=*@terminator.rs.itd.umich.edu" will find
any entries that have a mail attribute ending in the specified string.
To put parentheses in a filter, escape them with a backslash '\\'
-character. See RFC 1588 for a more complete description of allowable
+character. See RFC 2254 for a more complete description of allowable
filters. See
.BR ldap_getfilter (3)
for routines to help in constructing search filters automatically.
.LP
\fIAttrs\fP is a null-terminated array of attribute types to return
-from entries that match \fIfilter\fP. If NULL is specified, all
-attributes will be returned. \fIAttrsonly\fP should be set to 1 if
+from entries that match \fIfilter\fP.
+If NULL is specified, all attributes will be returned.
+The type "*" (LDAP_ALL_USER_ATTRIBUTES) may be used to request
+all user attributes to be returned.
+The type "+"(LDAP_ALL_OPERATIONAL_ATTRIBUTES) may be used to request
+all operational attributes to be returned.
+To request no attributes, the type "1.1" (LDAP_NO_ATTRS)
+should be listed by itself.
+.LP
+\fIAttrsonly\fP should be set to 1 if
only attribute types are wanted. It should be set to 0 if both
attributes types and attribute values are wanted.
.SH ERRORS
by using a filter like "objectclass=*" and a scope of LDAP_SCOPE_BASE (to
emulate read) or LDAP_SCOPE_ONELEVEL (to emulate list).
.LP
-These routines may malloc memory. Return values are contained
+These routines may dynamically allocate memory. The caller is
+responsible for freeing such memory using supplied deallocation
+routines. Return values are contained
in <ldap.h>.
.SH SEE ALSO
.BR ldap (3),
.BR ldap_result (3),
.BR ldap_getfilter (3),
.BR ldap_error (3)
+.SH ACKNOWLEDGEMENTS
+.B OpenLDAP
+is developed and maintained by The OpenLDAP Project (http://www.openldap.org/).
+.B OpenLDAP
+is derived from University of Michigan LDAP 3.3 Release.