summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorSergey Poznyakoff <gray@gnu.org.ua>2016-11-03 17:59:06 +0200
committerSergey Poznyakoff <gray@gnu.org.ua>2016-11-03 18:07:28 +0200
commitedb05144ade1984e28d88cfaea7c2fb0ec675f5b (patch)
tree0a06f61a55274abbdcd0daa921084783fc5d828a /include
parentd644964e497147d7a3ee0e0693f37ec917a6c738 (diff)
downloadmailutils-edb05144ade1984e28d88cfaea7c2fb0ec675f5b.tar.gz
mailutils-edb05144ade1984e28d88cfaea7c2fb0ec675f5b.tar.bz2
Fix docs. Change argument of the field-map configuration statement
The field-map statement (.ldap.field-map & .sql.field-map) takes a list of mappings as argument. For compatibility and for internal purposes, a string is still allowed. * doc/texinfo/programs.texi: Update. * include/mailutils/cfg.h (mu_cfg_field_map): New proto. * include/mailutils/sql.h (mu_password_type): Rename. (mu_sql_module_config) <positional>: Remove. (mu_sql_decode_password_type): Remove prototype. * libmailutils/base/mutil.c (mu_sql_decode_password_type): Remove function. * libmailutils/cfg/driver.c (mu_cfg_field_map): New function. * libmu_auth/ldap.c (cb_field_map): Use mu_cfg_field_map. (module_init): Fix default filter. * libmu_auth/sql.c (cb_field_map): Use mu_cfg_field_map. (mu_sql_param): Rename "password-type" statement to "password-encryption". Remove the "positional" statement.
Diffstat (limited to 'include')
-rw-r--r--include/mailutils/cfg.h4
-rw-r--r--include/mailutils/sql.h13
2 files changed, 9 insertions, 8 deletions
diff --git a/include/mailutils/cfg.h b/include/mailutils/cfg.h
index 9b8e951f8..63b6d3b51 100644
--- a/include/mailutils/cfg.h
+++ b/include/mailutils/cfg.h
@@ -297,6 +297,10 @@ int mu_cfg_create_subtree (const char *path, mu_cfg_node_t **pnode);
int mu_cfg_parse_config (mu_cfg_tree_t **ptree,
struct mu_cfg_parse_hints *hints);
+int mu_cfg_field_map (struct mu_config_value const *val, mu_assoc_t *passoc,
+ char **err_term);
+
+
#ifdef __cplusplus
}
#endif
diff --git a/include/mailutils/sql.h b/include/mailutils/sql.h
index ff3a16ebc..5df8506d3 100644
--- a/include/mailutils/sql.h
+++ b/include/mailutils/sql.h
@@ -20,11 +20,11 @@
#define _MAILUTILS_SQL_H
/* Configuration */
-enum mu_password_type
+enum mu_sql_password_encryption
{
- password_plaintext, /* Plaintext passwords */
- password_scrambled, /* Scrambled MySQL (>=3.21) password */
- password_hash, /* MD5 (or DES or whatever) hash */
+ mu_sql_password_plaintext, /* Plaintext passwords */
+ mu_sql_password_scrambled, /* Scrambled MySQL (>=3.21) password */
+ mu_sql_password_hash, /* MD5 (or DES or whatever) hash */
};
struct mu_sql_module_config
@@ -38,8 +38,7 @@ struct mu_sql_module_config
char *passwd;
char *db;
int port;
- enum mu_password_type password_type;
- int positional;
+ enum mu_sql_password_encryption password_encryption;
mu_assoc_t field_map;
};
@@ -143,6 +142,4 @@ extern int mu_sql_getpass (const char *username, char **passwd);
extern int mu_check_mysql_scrambled_password (const char *scrambled,
const char *message);
-int mu_sql_decode_password_type (const char *arg, enum mu_password_type *t);
-
#endif

Return to:

Send suggestions and report system problems to the System administrator.