]> git.ipfire.org Git - thirdparty/freeradius-server.git/commitdiff
Improve / correct comments on LDAP code
authorNick Porter <nick@portercomputing.co.uk>
Thu, 20 Apr 2023 13:20:34 +0000 (14:20 +0100)
committerNick Porter <nick@portercomputing.co.uk>
Thu, 20 Apr 2023 15:54:41 +0000 (16:54 +0100)
src/lib/ldap/base.c
src/modules/rlm_ldap/rlm_ldap.c

index 278f7ee3a3c9c1990625769cca081f83adb2e6a5..fba2da020717edfd866ab0b5a28a41d60096c99c 100644 (file)
@@ -509,7 +509,10 @@ fr_ldap_rcode_t fr_ldap_result(LDAPMessage **result, LDAPControl ***ctrls,
 
 /** Search for something in the LDAP directory
  *
- * Binds as the administrative user and performs a search, dealing with any errors.
+ * Performs an LDAP search, typically on a connection bound as the
+ * administrative user, dealing with any errors.
+ * Called from the trunk mux function and elsewhere where appropriate
+ * event handlers have been set on the connection fd.
  *
  * @param[out] msgid           to match response to request.
  * @param[in] request          Current request.
@@ -740,7 +743,7 @@ unlang_action_t fr_ldap_trunk_search(rlm_rcode_t *p_result,
        return UNLANG_ACTION_PUSHED_CHILD;
 }
 
-/** Run an async or sync modification LDAP query on a trunk connection
+/** Run an async modification LDAP query on a trunk connection
  *
  * @param[out] p_result                from synchronous evaluation.
  * @param[in] ctx              to allocate the query in.
@@ -792,7 +795,8 @@ unlang_action_t fr_ldap_trunk_modify(rlm_rcode_t *p_result,
 
 /** Modify something in the LDAP directory
  *
- * Binds as the administrative user and attempts to modify an LDAP object.
+ * Used on connections bound as the administrative user to attempt to modify an LDAP object.
+ * Called by the trunk mux function
  *
  * @param[out] msgid           LDAP message ID.
  * @param[in] request          Current request.
@@ -932,6 +936,15 @@ fr_ldap_query_t *fr_ldap_search_alloc(TALLOC_CTX *ctx,
        return query;
 }
 
+/** Allocate a new LDAP modify object
+ *
+ * @param[in] ctx              to allocate the query in.
+ * @param[in] dn               of the object to modify.
+ * @param[in] mods             to apply to the object.
+ * @param[in] serverctrls      Controls to pass to the server.  May be NULL.
+ * @param[in] clientctrls      Client controls.  May be NULL.
+ * @return LDAP query object
+ */
 fr_ldap_query_t *fr_ldap_modify_alloc(TALLOC_CTX *ctx, char const *dn,
                                      LDAPMod *mods[], LDAPControl **serverctrls, LDAPControl **clientctrls)
 {
index d2e5221db2a3e8bafb3f5a69ab91430928094fc5..906d32bb1a0d3210726599869d0803265ac83d71 100644 (file)
@@ -1744,6 +1744,7 @@ static unlang_action_t user_modify_resume(rlm_rcode_t *p_result, UNUSED int *pri
  * @param[in] inst             rlm_ldap instance.
  * @param[in] request          Current request.
  * @param[in] section          that holds the map to process.
+ * @param[in] mod_env          Module environment.  Contains expanded base and filter to find user.
  * @return one of the RLM_MODULE_* values.
  */
 static unlang_action_t user_modify(rlm_rcode_t *p_result, rlm_ldap_t const *inst, request_t *request,