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
99039957
Commit
99039957
authored
Sep 20, 2010
by
Georgi Kodinov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
WL#1054: code style remarks fixed.
parent
dc0b8f7a
Changes
5
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
324 additions
and
309 deletions
+324
-309
include/mysql/plugin_auth.h
include/mysql/plugin_auth.h
+7
-0
plugin/auth/auth_socket.c
plugin/auth/auth_socket.c
+1
-1
plugin/auth/dialog.c
plugin/auth/dialog.c
+5
-5
plugin/auth/test_plugin.c
plugin/auth/test_plugin.c
+3
-2
sql/sql_acl.cc
sql/sql_acl.cc
+308
-301
No files found.
include/mysql/plugin_auth.h
View file @
99039957
...
...
@@ -30,6 +30,13 @@
#include <mysql/plugin_auth_common.h>
/* defines for MYSQL_SERVER_AUTH_INFO.password_used */
#define PASSWORD_USED_NO 0
#define PASSWORD_USED_YES 1
#define PASSWORD_USED_NO_MENTION 2
/**
Provides server plugin access to authentication information
*/
...
...
plugin/auth/auth_socket.c
View file @
99039957
...
...
@@ -46,7 +46,7 @@ static int socket_auth(MYSQL_PLUGIN_VIO *vio, MYSQL_SERVER_AUTH_INFO *info)
return
CR_ERROR
;
}
info
->
password_used
=
2
;
info
->
password_used
=
PASSWORD_USED_NO_MENTION
;
vio
->
info
(
vio
,
&
vio_info
);
if
(
vio_info
.
protocol
!=
MYSQL_VIO_SOCKET
)
...
...
plugin/auth/dialog.c
View file @
99039957
...
...
@@ -78,10 +78,10 @@ static int two_questions(MYSQL_PLUGIN_VIO *vio, MYSQL_SERVER_AUTH_INFO *info)
if
((
pkt_len
=
vio
->
read_packet
(
vio
,
&
pkt
))
<
0
)
return
CR_ERROR
;
info
->
password_used
=
1
;
info
->
password_used
=
PASSWORD_USED_YES
;
/* fail if the password is wrong */
if
(
strcmp
((
const
char
*
)
pkt
,
info
->
auth_string
))
if
(
strcmp
((
const
char
*
)
pkt
,
info
->
auth_string
))
return
CR_ERROR
;
/* send the last, ordinary, question */
...
...
@@ -93,7 +93,7 @@ static int two_questions(MYSQL_PLUGIN_VIO *vio, MYSQL_SERVER_AUTH_INFO *info)
return
CR_ERROR
;
/* check the reply */
return
strcmp
((
const
char
*
)
pkt
,
"yes, of course"
)
?
CR_ERROR
:
CR_OK
;
return
strcmp
((
const
char
*
)
pkt
,
"yes, of course"
)
?
CR_ERROR
:
CR_OK
;
}
static
struct
st_mysql_auth
two_handler
=
...
...
@@ -120,7 +120,7 @@ static int three_attempts(MYSQL_PLUGIN_VIO *vio, MYSQL_SERVER_AUTH_INFO *info)
if
((
pkt_len
=
vio
->
read_packet
(
vio
,
&
pkt
))
<
0
)
return
CR_ERROR
;
info
->
password_used
=
1
;
info
->
password_used
=
PASSWORD_USED_YES
;
/*
finish, if the password is correct.
...
...
@@ -310,7 +310,7 @@ static int init_dialog(char *unused1 __attribute__((unused)),
va_list
unused4
__attribute__
((
unused
)))
{
void
*
sym
=
dlsym
(
RTLD_DEFAULT
,
"mysql_authentication_dialog_ask"
);
ask
=
sym
?
(
mysql_authentication_dialog_ask_t
)
sym
:
builtin_ask
;
ask
=
sym
?
(
mysql_authentication_dialog_ask_t
)
sym
:
builtin_ask
;
return
0
;
}
...
...
plugin/auth/test_plugin.c
View file @
99039957
...
...
@@ -70,7 +70,7 @@ static int auth_test_plugin(MYSQL_PLUGIN_VIO *vio, MYSQL_SERVER_AUTH_INFO *info)
if
((
pkt_len
=
vio
->
read_packet
(
vio
,
&
pkt
))
<
0
)
return
CR_ERROR
;
info
->
password_used
=
1
;
info
->
password_used
=
PASSWORD_USED_YES
;
/* fail if the password is wrong */
if
(
strcmp
((
const
char
*
)
pkt
,
info
->
auth_string
))
...
...
@@ -177,7 +177,8 @@ static int test_plugin_client(MYSQL_PLUGIN_VIO *vio, MYSQL *mysql)
if
(
!
reply
)
return
CR_ERROR
;
/* send the reply to the server */
res
=
vio
->
write_packet
(
vio
,
(
const
unsigned
char
*
)
reply
,
strlen
(
reply
)
+
1
);
res
=
vio
->
write_packet
(
vio
,
(
const
unsigned
char
*
)
reply
,
strlen
(
reply
)
+
1
);
if
(
res
)
return
CR_ERROR
;
...
...
sql/sql_acl.cc
View file @
99039957
This diff is collapsed.
Click to expand it.
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