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
0e388d43
Commit
0e388d43
authored
Oct 27, 2018
by
Sergei Golubchik
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
cleanup: add 'const' to password validation API
parent
1cc03e1f
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
8 additions
and
7 deletions
+8
-7
include/mysql/plugin_password_validation.h
include/mysql/plugin_password_validation.h
+2
-2
include/mysql/plugin_password_validation.h.pp
include/mysql/plugin_password_validation.h.pp
+2
-2
plugin/cracklib_password_check/cracklib_password_check.c
plugin/cracklib_password_check/cracklib_password_check.c
+2
-1
plugin/simple_password_check/simple_password_check.c
plugin/simple_password_check/simple_password_check.c
+2
-2
No files found.
include/mysql/plugin_password_validation.h
View file @
0e388d43
...
...
@@ -42,8 +42,8 @@ struct st_mariadb_password_validation
Function provided by the plugin which should perform password validation
and return 0 if the password has passed the validation.
*/
int
(
*
validate_password
)(
MYSQL_CONST_LEX_STRING
*
username
,
MYSQL_CONST_LEX_STRING
*
password
);
int
(
*
validate_password
)(
const
MYSQL_CONST_LEX_STRING
*
username
,
const
MYSQL_CONST_LEX_STRING
*
password
);
};
#ifdef __cplusplus
...
...
include/mysql/plugin_password_validation.h.pp
View file @
0e388d43
...
...
@@ -531,6 +531,6 @@ void thd_wakeup_subsequent_commits(void* thd, int wakeup_error);
struct
st_mariadb_password_validation
{
int
interface_version
;
int
(
*
validate_password
)(
MYSQL_CONST_LEX_STRING
*
username
,
MYSQL_CONST_LEX_STRING
*
password
);
int
(
*
validate_password
)(
const
MYSQL_CONST_LEX_STRING
*
username
,
const
MYSQL_CONST_LEX_STRING
*
password
);
};
plugin/cracklib_password_check/cracklib_password_check.c
View file @
0e388d43
...
...
@@ -21,7 +21,8 @@
static
char
*
dictionary
;
static
int
crackme
(
MYSQL_CONST_LEX_STRING
*
username
,
MYSQL_CONST_LEX_STRING
*
password
)
static
int
crackme
(
const
MYSQL_CONST_LEX_STRING
*
username
,
const
MYSQL_CONST_LEX_STRING
*
password
)
{
char
*
user
=
alloca
(
username
->
length
+
1
);
char
*
host
;
...
...
plugin/simple_password_check/simple_password_check.c
View file @
0e388d43
...
...
@@ -22,8 +22,8 @@
static
unsigned
min_length
,
min_digits
,
min_letters
,
min_others
;
static
int
validate
(
MYSQL_CONST_LEX_STRING
*
username
,
MYSQL_CONST_LEX_STRING
*
password
)
static
int
validate
(
const
MYSQL_CONST_LEX_STRING
*
username
,
const
MYSQL_CONST_LEX_STRING
*
password
)
{
unsigned
digits
=
0
,
uppers
=
0
,
lowers
=
0
,
others
=
0
,
length
=
(
unsigned
)
password
->
length
;
const
char
*
ptr
=
password
->
str
,
*
end
=
ptr
+
length
;
...
...
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