Commit 3cf67a78 3cf67a789fc4118deba3c097cec5c69d6a2809e1 by Sergey Poznyakoff

(mu_sql_authenticate): Bugfix.

1 parent 42d1024f
...@@ -325,6 +325,7 @@ mu_sql_authenticate (void *ignored_return_data, void *key, ...@@ -325,6 +325,7 @@ mu_sql_authenticate (void *ignored_return_data, void *key,
325 void *ignored_func_data, void *call_data) 325 void *ignored_func_data, void *call_data)
326 { 326 {
327 struct mu_auth_data *auth_data = key; 327 struct mu_auth_data *auth_data = key;
328 char *pass = call_data;
328 char *query_str = NULL; 329 char *query_str = NULL;
329 MYSQL *m; 330 MYSQL *m;
330 MYSQL_RES *res; 331 MYSQL_RES *res;
...@@ -379,7 +380,7 @@ mu_sql_authenticate (void *ignored_return_data, void *key, ...@@ -379,7 +380,7 @@ mu_sql_authenticate (void *ignored_return_data, void *key,
379 return 1; 380 return 1;
380 } 381 }
381 382
382 rc = strcmp (row[0], crypt (auth_data->passwd, row[0])); 383 rc = strcmp (row[0], crypt (pass, row[0]));
383 mysql_free_result (res); 384 mysql_free_result (res);
384 mysql_close (m); 385 mysql_close (m);
385 return rc; 386 return rc;
......