Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
M
MariaDB
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
nexedi
MariaDB
Commits
d4635150
Commit
d4635150
authored
Nov 22, 2011
by
Sergei Golubchik
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix dialog plugin to work on windows
parent
ef45b799
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
26 additions
and
10 deletions
+26
-10
include/mysql/client_plugin.h
include/mysql/client_plugin.h
+11
-0
include/mysql/plugin_auth_common.h
include/mysql/plugin_auth_common.h
+4
-0
plugin/auth/CMakeLists.txt
plugin/auth/CMakeLists.txt
+3
-0
plugin/auth/dialog.c
plugin/auth/dialog.c
+8
-10
No files found.
include/mysql/client_plugin.h
View file @
d4635150
...
...
@@ -28,6 +28,16 @@
#include <stdlib.h>
#endif
#if defined(_MSC_VER)
#ifdef __cplusplus
#define MYSQL_PLUGIN_EXPORT extern "C" __declspec(dllexport)
#else
#define MYSQL_PLUGIN_EXPORT __declspec(dllexport)
#endif
#else
/*_MSC_VER */
#define MYSQL_PLUGIN_EXPORT
#endif
/* known plugin types */
#define MYSQL_CLIENT_reserved1 0
#define MYSQL_CLIENT_reserved2 1
...
...
@@ -38,6 +48,7 @@
#define MYSQL_CLIENT_MAX_PLUGINS 3
#define mysql_declare_client_plugin(X) \
MYSQL_PLUGIN_EXPORT \
struct st_mysql_client_plugin_ ## X \
_mysql_client_plugin_declaration_ = { \
MYSQL_CLIENT_ ## X ## _PLUGIN, \
...
...
include/mysql/plugin_auth_common.h
View file @
d4635150
...
...
@@ -14,6 +14,10 @@
along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */
#ifdef _WIN32
#include <windows.h>
#endif
/**
@file
...
...
plugin/auth/CMakeLists.txt
0 → 100644
View file @
d4635150
INCLUDE
(
"
${
PROJECT_SOURCE_DIR
}
/storage/mysql_storage_engine.cmake"
)
SET
(
AUTH_SOURCES dialog.c
)
MYSQL_PLUGIN
(
AUTH
)
plugin/auth/dialog.c
View file @
d4635150
...
...
@@ -33,13 +33,16 @@
a correct password. It shows the situation when a number of questions
is not known in advance.
*/
#define _GNU_SOURCE
/* for RTLD_DEFAULT */
#include <mysql/plugin_auth.h>
#include <my_global.h>
#include <mysql/client_plugin.h>
#include <mysql.h>
#include <string.h>
#include <stdio.h>
#include <stdlib.h>
#if defined (_WIN32)
# define RTLD_DEFAULT GetModuleHandle(NULL)
#endif
#include <mysql/plugin_auth.h>
/**
first byte of the question string is the question "type".
...
...
@@ -51,8 +54,6 @@
#define PASSWORD_QUESTION "\4"
#define LAST_PASSWORD "\5"
typedef
unsigned
char
uchar
;
/********************* SERVER SIDE ****************************************/
/**
...
...
@@ -216,9 +217,6 @@ maria_declare_plugin_end;
dialog plugin will use it for communication with the user. Otherwise
a default gets() based implementation will be used.
*/
#include <mysql.h>
#include <dlfcn.h>
static
mysql_authentication_dialog_ask_t
ask
;
static
char
*
builtin_ask
(
MYSQL
*
mysql
__attribute__
((
unused
)),
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment