@@ -29,9 +29,9 @@ To apply:
29
29
30
30
(patch created with `diff -Naur`)
31
31
32
- diff -Naur mysql-5.5.59-dist /include/mysql.h mysql-5.5.59/include/mysql.h
33
- --- mysql-5.5.59-dist /include/mysql.h 2017-11-27 13:03:17.000000000 +0100
34
- +++ mysql-5.5.59/include/mysql.h 2018-02-14 00:28:26 .000000000 +0100
32
+ diff -Naur mysql-5.5.59-p002 /include/mysql.h mysql-5.5.59-p003 /include/mysql.h
33
+ --- mysql-5.5.59-p002 /include/mysql.h 2017-11-27 13:03:17.000000000 +0100
34
+ +++ mysql-5.5.59-p003 /include/mysql.h 2018-02-16 00:23:19 .000000000 +0100
35
35
@@ -288,6 +288,18 @@
36
36
/* needed for embedded server - no net buffer to store the 'info' */
37
37
char *info_buffer;
@@ -51,9 +51,9 @@ diff -Naur mysql-5.5.59-dist/include/mysql.h mysql-5.5.59/include/mysql.h
51
51
} MYSQL;
52
52
53
53
54
- diff -Naur mysql-5.5.59-dist /sql-common/client.c mysql-5.5.59/sql-common/client.c
55
- --- mysql-5.5.59-dist /sql-common/client.c 2017-11-27 13:03:17.000000000 +0100
56
- +++ mysql-5.5.59/sql-common/client.c 2018-02-14 00:34:26 .000000000 +0100
54
+ diff -Naur mysql-5.5.59-p002 /sql-common/client.c mysql-5.5.59-p003 /sql-common/client.c
55
+ --- mysql-5.5.59-p002 /sql-common/client.c 2017-11-27 13:03:17.000000000 +0100
56
+ +++ mysql-5.5.59-p003 /sql-common/client.c 2018-02-16 00:27:37 .000000000 +0100
57
57
@@ -2952,7 +2952,7 @@
58
58
auth_plugin_t *auth_plugin;
59
59
MCPVIO_EXT mpvio;
@@ -94,3 +94,18 @@ diff -Naur mysql-5.5.59-dist/sql-common/client.c mysql-5.5.59/sql-common/client.
94
94
DBUG_PRINT ("info", ("authenticate_user returned %s",
95
95
res == CR_OK ? "CR_OK" :
96
96
res == CR_ERROR ? "CR_ERROR" :
97
+ @@ -3069,7 +3091,13 @@
98
+ DBUG_RETURN(1);
99
+
100
+ mpvio.plugin= auth_plugin;
101
+ - res= auth_plugin->authenticate_user((struct st_plugin_vio *)&mpvio, mysql);
102
+ + res = CR_ERROR; //fallback, if block is never invoked
103
+ + mysql->passwd_callback(mysql, auth_plugin_name, ^(const char *passwd) {
104
+ + char *saved_passwd = mysql->passwd;
105
+ + mysql->passwd = (char *)(passwd ? passwd : ""); // see mysql_change_user
106
+ + res= auth_plugin->authenticate_user((struct st_plugin_vio *)&mpvio, mysql);
107
+ + mysql->passwd = saved_passwd;
108
+ + });
109
+
110
+ DBUG_PRINT ("info", ("second authenticate_user returned %s",
111
+ res == CR_OK ? "CR_OK" :
0 commit comments