diff options
author | Sergey Poznyakoff <gray@gnu.org.ua> | 2007-11-17 17:04:06 +0000 |
---|---|---|
committer | Sergey Poznyakoff <gray@gnu.org.ua> | 2007-11-17 17:04:06 +0000 |
commit | 42a7cc48c7398707710bed6f6dd8bebe755690b2 (patch) | |
tree | 097c73e6d2ff3488d8337ef6e8691c08c125af79 | |
parent | 6d63a068d842efc8327284d51f42c1920da47f4b (diff) | |
download | mailutils-42a7cc48c7398707710bed6f6dd8bebe755690b2.tar.gz mailutils-42a7cc48c7398707710bed6f6dd8bebe755690b2.tar.bz2 |
Update
-rw-r--r-- | ChangeLog | 4 | ||||
-rw-r--r-- | auth/sql.h | 16 | ||||
-rw-r--r-- | imap4d/auth_gsasl.c | 7 | ||||
-rw-r--r-- | include/mailutils/sql.h | 19 |
4 files changed, 27 insertions, 19 deletions
@@ -1,5 +1,9 @@ 2007-11-17 Sergey Poznyakoff <gray@gnu.org.ua> + * auth/sql.h (mu_internal_sql_config): Move to ... + * include/mailutils/sql.h: ... here + * imap4d/auth_gsasl.c: Bugfix. + Move rc file and argp parsing into separate abstract layers. * include/mailutils/gocs.h, include/mailutils/pam.h, diff --git a/auth/sql.h b/auth/sql.h index 931e79376..e6e8bfe18 100644 --- a/auth/sql.h +++ b/auth/sql.h @@ -40,20 +40,4 @@ #include <mailutils/nls.h> #include <mailutils/mailbox.h> -struct mu_internal_sql_config -{ - int interface; - char *getpwnam_query; - char *getpass_query; - char *getpwuid_query; - char *host; - char *user; - char *passwd; - char *db; - int port; - enum mu_password_type password_type; - mu_assoc_t field_map; -}; - -extern struct mu_internal_sql_config mu_sql_module_config; diff --git a/imap4d/auth_gsasl.c b/imap4d/auth_gsasl.c index 5bda9af38..354ebf6f5 100644 --- a/imap4d/auth_gsasl.c +++ b/imap4d/auth_gsasl.c @@ -269,9 +269,10 @@ cb_retrieve (Gsasl_session_ctx *ctx, if (username && *username == 0 && authentication_id) *username = strdup (authentication_id); - if (mu_gsasl_cram_md5_pwd && access (mu_gsasl_cram_md5_pwd, R_OK) == 0) + if (mu_gsasl_module_data.cram_md5_pwd + && access (mu_gsasl_module_data.cram_md5_pwd, R_OK) == 0) { - int rc = gsasl_md5pwd_get_password (mu_gsasl_cram_md5_pwd, + int rc = gsasl_md5pwd_get_password (mu_gsasl_module_data.cram_md5_pwd, authentication_id, key, keylen); if (rc == GSASL_OK) @@ -279,7 +280,7 @@ cb_retrieve (Gsasl_session_ctx *ctx, } #ifdef USE_SQL - if (mu_sql_password_type == password_plaintext) + if (mu_sql_module_config.password_type == password_plaintext) { char *passwd; int status = mu_sql_getpass (username, &passwd); diff --git a/include/mailutils/sql.h b/include/mailutils/sql.h index d320f87d3..ee200910c 100644 --- a/include/mailutils/sql.h +++ b/include/mailutils/sql.h @@ -42,6 +42,25 @@ struct mu_sql_module_config mu_assoc_t field_map; }; +/* FIXME: Should not be here, but needed for several other sources + (imap4d/auth_gsasl.c, for instance) */ +struct mu_internal_sql_config +{ + int interface; + char *getpwnam_query; + char *getpass_query; + char *getpwuid_query; + char *host; + char *user; + char *passwd; + char *db; + int port; + enum mu_password_type password_type; + mu_assoc_t field_map; +}; + +extern struct mu_internal_sql_config mu_sql_module_config; + /* Loadable Modules Support */ #define __s_cat2__(a,b) a ## b #define __s_cat3__(a,b,c) a ## b ## c |