             EntrySourceException
             SearchScope])
   (:import [com.unboundid.ldap.sdk.extensions
-            PasswordModifyExtendedRequest])
+            PasswordModifyExtendedRequest
+            PasswordModifyExtendedResult])
   (:import [com.unboundid.ldap.sdk.controls
             PreReadRequestControl
             PostReadRequestControl

    (let [request (PasswordModifyExtendedRequest. old new)]
      (.processExtendedOperation connection request)))

  ([connection dn old new]
    (let [request  (PasswordModifyExtendedRequest. dn old new)]
      (.processExtendedOperation connection request))))

(defn delete

      (connect-to-hosts options)
      (connect-to-host options))))

(defn bind?
  "Performs a bind operation using the provided connection, bindDN and
password. Returns true if successful.

When an LDAP connection object is used as the connection argument the
bind? function will attempt to change the identity of that connection
to that of the provided DN. Subsequent operations on that connection
will be done using the bound identity.

If an LDAP connection pool object is passed as the connection argument
the bind attempt will have no side-effects, leaving the state of the
underlying connections unchanged."
  [connection bind-dn password]
  (try 
    (let [bind-result (.bind connection bind-dn password)]
      (if (= ResultCode/SUCCESS (.getResultCode bind-result)) true false))
    (catch Exception _ false)))

(defn get
  "If successful, returns a map containing the entry for the given DN.
