Compartilhar via


7.6.2.5 Performing an LDAP Operation Against a Directory Server

This task sends an LDAP request to an Active Directory server.

The parameters for this task are as follows:

Name

Type

Description

Optional

TaskInputConnectionInfo

ConnectionInfo

An initialized ConnectionInfo on which to send the LDAP request.

No

TaskInputRequestMessage

LDAPRequest

The request to send to the directory server, including any ExtendedRequest as documented in section 3.1.1.3.4.2, LDAP Extended Operations.

No

The task returns the following results to the caller:

Name

Type

Description

TaskReturnStatus

Boolean

This task returns TRUE if the client successfully sends the request to the directory server. Otherwise, it returns FALSE.

The task performs the following actions:

  1. Let ldapRequest be the LDAPRequest instance received in TaskInputRequestMessage.

  2. Let containingADConnection be the ADConnection instance contained in ADCList for which containingADConnection.primaryConnection is set to TaskInputConnectionInfo or for which the containingADConnection.referralConnections list contains TaskInputConnectionInfo.

  3. Let operationTimeout be an unsigned integer initialized to the value of containingADConnection.LDAP_OPT_TIMELIMIT.

  4. If operationTimeout is 0 and TaskInputRequestMessage.requestMessage.protocolOp is of type BindRequest, set operationTimeout to 120.

  5. If TaskInputRequestMessage.requestMessage.protocolOp is of type SearchRequest:

    1. If TaskInputRequestMessage.requestMessage.protocolOp.sizeLimit was not specified, then it is set to containingADConnection.LDAP_OPT_SIZELIMIT.

    2. If TaskInputRequestMessage.requestMessage.protocolOp.timeLimit was not specified, then it is set to operationTimeout.

  6. ldapRequest.requestMessage.messageID is set, as described in [RFC2251] section 4.1.1.1, Message ID.

  7. The client sends ldapRequest to the directory server through the TCP connection represented by TaskInputConnectionInfo.networkConnection.

    If the send is successful:

    1. ldapRequest.requestTimer is set to operationTimeout and begins counting down.

    2. ldapRequest is appended to TaskInputConnectionInfo.pendingRequestList, if not already present.

    3. This task returns TRUE.

      If the send is not successful, this task returns FALSE.