struct dict_ldap_settings *set;
enum section_type type;
- struct dict_ldap_map cur_map;
+ struct dict_ldap_map_settings cur_map;
ARRAY(struct dict_ldap_map_attribute) cur_attributes;
};
#undef DEF_BOOL
#undef DEF_UINT
-#define DEF_STR(name) DEF_STRUCT_STR(name, dict_ldap_map)
-#define DEF_BOOL(name) DEF_STRUCT_BOOL(name, dict_ldap_map)
-#define DEF_UINT(name) DEF_STRUCT_UINT(name ,dict_ldap_map)
+#define DEF_STR(name) DEF_STRUCT_STR(name, dict_ldap_map_settings)
+#define DEF_BOOL(name) DEF_STRUCT_BOOL(name, dict_ldap_map_settings)
+#define DEF_UINT(name) DEF_STRUCT_UINT(name ,dict_ldap_map_settings)
static const struct setting_def dict_ldap_map_setting_defs[] = {
DEF_STR(pattern),
#ifndef DICT_LDAP_SETTINGS_H
#define DICT_LDAP_SETTINGS_H
-struct dict_ldap_map {
+struct dict_ldap_map_settings {
/* pattern is in simplified form: all variables are stored as simple
'$' character. fields array is sorted by the variable index. */
const char *pattern;
unsigned int debug;
bool require_ssl;
bool start_tls;
- ARRAY(struct dict_ldap_map) parsed_maps;
+ ARRAY(struct dict_ldap_map_settings) parsed_maps;
};
struct dict_ldap_settings *
struct dict_ldap_op {
struct ldap_dict *dict;
struct event *event;
- const struct dict_ldap_map *map;
+ const struct dict_ldap_map_settings *map;
pool_t pool;
unsigned long txid;
struct dict_lookup_result res;
static bool
-dict_ldap_map_match(const struct dict_ldap_map *map, const char *path,
+dict_ldap_map_match(const struct dict_ldap_map_settings *map, const char *path,
ARRAY_TYPE(const_string) *values)
{
const char *pat, *attribute, *p;
return *pat == '\0' && *path == '\0';
}
-static const struct dict_ldap_map *
+static const struct dict_ldap_map_settings *
ldap_dict_find_map(struct ldap_dict *dict, const char *path,
ARRAY_TYPE(const_string) *values)
{
- const struct dict_ldap_map *maps;
+ const struct dict_ldap_map_settings *maps;
unsigned int i, count;
t_array_init(values, 2);
static bool
ldap_dict_build_query(const struct dict_op_settings *set,
- const struct dict_ldap_map *map,
+ const struct dict_ldap_map_settings *map,
ARRAY_TYPE(const_string) *values, bool priv,
string_t *query_r, const char **error_r)
{
ARRAY_TYPE(const_string) values;
const char *attributes[2] = {0, 0};
t_array_init(&values, 8);
- const struct dict_ldap_map *map = ldap_dict_find_map(ctx, key, &values);
+ const struct dict_ldap_map_settings *map = ldap_dict_find_map(ctx, key, &values);
if (map != NULL) {
op->map = map;