3.1.3 Initialization

The algorithm MUST perform these initialization tasks before any directory operation (sections 3.1.6.1 through 3.1.6.9) is called:

  • Set the CachedLDAPConnection.Handle (section 3.1.1.6) ADM element attribute to NULL and the CachedLDAPConnection.RefCount ADM element attribute to zero.

  • Raise a Prepare an LDAP Connection (section 3.1.6.18) event. The event takes no arguments. If the rStatus returned is not DirectoryOperationResult.Success, the CachedConfigurationNamingContext ADM element MUST be set to an empty string, and processing MUST end. Otherwise, let DirectoryServerConnection be a variable of type ADCONNECTION_HANDLE ([MS-DTYP] section 2.2.2) initialized to the value returned in rADConnection.

  • Construct an LDAPMessage ([RFC2251] section 4.1):

    • messageID = set as described in [RFC2251] section 4.1.1.1.

    • protocolOp = searchRequest

    • controls = none

    • baseObject = an empty string

    • scope = baseObject

    • derefAliases = neverDerefAliases

    • sizeLimit = 0

    • timeLimit = 0

    • typesOnly = FALSE

    • filter = "(objectClass=*)"

    • attributes = an empty list

  • Perform the Performing an LDAP Operation on an ADConnection task ([MS-ADTS] section 7.6.1.6) with the following parameters:

    • TaskInputADConnection = DirectoryServerConnection

    • TaskInputRequestMessage = the LDAPMessage constructed in the preceding step

  • If the value of TaskReturnStatus is not success, as defined in [RFC2251] section 4.1.10, the CachedConfigurationNamingContext ADM element MUST be set to an empty string. If the result message returned in TaskOutputResultMessages is not success, as defined in [RFC2251] section 4.1.10, the CachedConfigurationNamingContext ADM element MUST be set to an empty string. Otherwise, the CachedConfigurationNamingContext ADM element MUST be set to the value of the configurationNamingContext attribute extracted from the result message returned in TaskOutputResultMessages.

  • Raise a Shut Down an LDAP Connection (section 3.1.6.21) event.