(mu_sql_getpass)
(mu_sql_password_type,mu_sql_expand_query): (mu_check_mysql_scrambled_password): New function
Showing
1 changed file
with
21 additions
and
6 deletions
... | @@ -34,12 +34,13 @@ typedef void (*rdl_done_t) (void); | ... | @@ -34,12 +34,13 @@ typedef void (*rdl_done_t) (void); |
34 | mu_sql_dispatch_t __s_cat2__(mod,_dispatch_tab) | 34 | mu_sql_dispatch_t __s_cat2__(mod,_dispatch_tab) |
35 | #endif | 35 | #endif |
36 | 36 | ||
37 | enum mu_sql_connection_state { | 37 | enum mu_sql_connection_state |
38 | mu_sql_not_connected, | 38 | { |
39 | mu_sql_connected, | 39 | mu_sql_not_connected, |
40 | mu_sql_query_run, | 40 | mu_sql_connected, |
41 | mu_sql_result_available | 41 | mu_sql_query_run, |
42 | }; | 42 | mu_sql_result_available |
43 | }; | ||
43 | 44 | ||
44 | typedef struct mu_sql_connection *mu_sql_connection_t; | 45 | typedef struct mu_sql_connection *mu_sql_connection_t; |
45 | 46 | ||
... | @@ -105,4 +106,18 @@ int mu_sql_get_column (mu_sql_connection_t conn, size_t nrow, size_t ncol, | ... | @@ -105,4 +106,18 @@ int mu_sql_get_column (mu_sql_connection_t conn, size_t nrow, size_t ncol, |
105 | 106 | ||
106 | const char *mu_sql_strerror (mu_sql_connection_t conn); | 107 | const char *mu_sql_strerror (mu_sql_connection_t conn); |
107 | 108 | ||
109 | enum mu_password_type | ||
110 | { | ||
111 | password_plaintext, /* Plaintext passwords */ | ||
112 | password_scrambled, /* Scrambled MySQL (>=3.21) password */ | ||
113 | password_hash, /* MD5 (or DES or whatever) hash */ | ||
114 | }; | ||
115 | |||
116 | extern enum mu_password_type mu_sql_password_type; | ||
117 | |||
118 | extern char *mu_sql_expand_query (const char *query, const char *ustr); | ||
119 | extern int mu_sql_getpass (const char *username, char **passwd); | ||
120 | extern int mu_check_mysql_scrambled_password (const char *scrambled, | ||
121 | const char *message); | ||
122 | |||
108 | #endif | 123 | #endif | ... | ... |
-
Please register or sign in to post a comment