* @param[in] handle associated with entry.
* @param[in] expanded attributes (rhs of map).
* @param[in] entry to retrieve attributes from.
- * @return number of maps successfully applied, or -1 on error.
+ * @return
+ * - Number of maps successfully applied.
+ * - -1 on failure.
*/
int rlm_ldap_map_do(const rlm_ldap_t *inst, REQUEST *request, LDAP *handle,
rlm_ldap_map_exp_t const *expanded, LDAPMessage *entry)
* @param[out] values array of char pointers.
* @param[in,out] idx records current array offset.
* @param[in] cs to iterate over.
- * @return 0 on success else -1 on error.
+ * @return
+ * - 0 on success.
+ * - -1 on failure.
*/
static int rlm_ldap_client_get_attrs(char const **values, int *idx, CONF_SECTION const *cs)
{
* @param[in] inst rlm_ldap configuration.
* @param[in] tmpl to use as the base for the new client.
* @param[in] map to load client attribute/LDAP attribute mappings from.
- * @return -1 on error else 0.
+ * @return
+ * - 0 on success.
+ * - -1 on failure.
*/
int rlm_ldap_client_load(rlm_ldap_t const *inst, CONF_SECTION *tmpl, CONF_SECTION *map)
{
*
* @param[out] request_bv where to write the request BER value (must be freed with ber_bvfree).
* @param[in] dn to query for.
- * @return 0 on success, and < 0 on error.
+ * @return
+ * - 0 on success.
+ * - < 0 on error.
*/
static int ber_encode_request_data(char const *dn, struct berval **request_bv)
{
* @param[out] server_version that responded.
* @param[out] out data.
* @param[out] outlen Length of data written to out.
- * @return 0 on success, and < 0 on error.
+ * @return
+ * - 0 on success.
+ * - < 0 on error.
*/
static int ber_decode_login_data(struct berval *reply_bv, int *server_version, void *out, size_t *outlen)
{
* @param[in] dn of user we want to retrieve the password for.
* @param[out] password Where to write the retrieved password.
* @param[out] passlen Length of data written to the password buffer.
- * @return 0 on success and < 0 on failure.
+ * @return
+ * - 0 on success.
+ * - < 0 on failure.
*/
int nmasldap_get_password(LDAP *ld, char const *dn, char *password, size_t *passlen)
{
*
* @param[in] in Str to check.
* @param[in] inlen Length of string to check.
- * @return true if string looks like a DN, else false.
+ * @return
+ * - true if string looks like a DN.
+ * - false if string does not look like DN.
*/
bool rlm_ldap_is_dn(char const *in, size_t inlen)
{
*
* @param full DN.
* @param part Partial DN as returned by ldap_parse_result.
- * @return the length of the portion of full which wasn't matched or -1 on error.
+ * @return
+ * - Length of the portion of full which wasn't matched
+ * - -1 on failure.
*/
static size_t rlm_ldap_common_dn(char const *full, char const *part)
{
* @param[out] error Where to write the error string, may be NULL, must not be freed.
* @param[out] extra Where to write additional error string to, may be NULL (faster) or must be freed
* (with talloc_free).
- * @return One of the LDAP_PROC_* codes.
+ * @return One of the LDAP_PROC_* (#ldap_rcode_t) values.
*/
static ldap_rcode_t rlm_ldap_result(rlm_ldap_t const *inst, ldap_handle_t const *conn, int msgid, char const *dn,
LDAPMessage **result, char const **error, char **extra)
/*
* Now retrieve the result and check for errors
- * ldap_result returns -1 on error, and 0 on timeout
+ * ldap_result returns -1 on failure, and 0 on timeout
*/
lib_errno = ldap_result(conn->handle, msgid, 1, &tv, result);
if (lib_errno == 0) {
* @param[in] attrs to retrieve.
* @param[in] serverctrls Search controls to pass to the server. May be NULL.
* @param[in] clientctrls Search controls for ldap_search. May be NULL.
- * @return One of the LDAP_PROC_* values.
+ * @return One of the LDAP_PROC_* (#ldap_rcode_t) values.
*/
ldap_rcode_t rlm_ldap_search(LDAPMessage **result, rlm_ldap_t const *inst, REQUEST *request,
ldap_handle_t **pconn,
* @param[in,out] pconn to use. May change as this function calls functions which auto re-connect.
* @param[in] dn of the object to modify.
* @param[in] mods to make, see 'man ldap_modify' for more information.
- * @return One of the LDAP_PROC_* values.
+ * @return One of the LDAP_PROC_* (#ldap_rcode_t) values.
*/
ldap_rcode_t rlm_ldap_modify(rlm_ldap_t const *inst, REQUEST *request, ldap_handle_t **pconn,
char const *dn, LDAPMod *mods[])
* @param[in] request Current request.
* @param[in] conn used to retrieve access attributes.
* @param[in] entry retrieved by rlm_ldap_find_user or rlm_ldap_search.
- * @return RLM_MODULE_USERLOCK if the user was denied access, else RLM_MODULE_OK.
+ * @return
+ * - #RLM_MODULE_USERLOCK if the user was denied access.
+ * - #RLM_MODULE_OK otherwise.
*/
rlm_rcode_t rlm_ldap_check_access(rlm_ldap_t const *inst, REQUEST *request,
ldap_handle_t const *conn, LDAPMessage *entry)
* @param check Which group to check for user membership.
* @param check_pairs Unknown.
* @param reply_pairs Unknown.
- * @return 1 on failure (or if the user is not a member), else 0.
+ * @return
+ * - 1 on failure (or if the user is not a member).
+ * - 0 on success.
*/
static int rlm_ldap_groupcmp(void *instance, REQUEST *request, UNUSED VALUE_PAIR *thing, VALUE_PAIR *check,
UNUSED VALUE_PAIR *check_pairs, UNUSED VALUE_PAIR **reply_pairs)
* @param[in] parent of the config section.
* @param[out] config to write the sub section parameters to.
* @param[in] comp The section name were parsing the config for.
- * @return 0 on success, else < 0 on failure.
+ * @return
+ * - 0 on success.
+ * - < 0 on failure.
*/
static int parse_sub_section(rlm_ldap_t *inst, CONF_SECTION *parent, ldap_acct_section_t **config,
rlm_components_t comp)
*
* @param conf to parse.
* @param instance configuration data.
- * @return 0 on success < 0 on failure.
+ * @return
+ * - 0 on success.
+ * - < 0 on failure.
*/
static int mod_bootstrap(CONF_SECTION *conf, void *instance)
{
*
* @param conf to parse.
* @param instance configuration data.
- * @return 0 on success < 0 on failure.
+ * @return
+ * - 0 on success.
+ * - < 0 on failure.
*/
static int mod_instantiate(CONF_SECTION *conf, void *instance)
{