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
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
mariadb
Commits
232b112e
Commit
232b112e
authored
Aug 12, 2011
by
Georgi Kodinov
Browse files
Options
Browse Files
Download
Plain Diff
merge
parents
0d6a4b08
4d0784ee
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
57 additions
and
6 deletions
+57
-6
mysql-test/r/plugin_auth.result
mysql-test/r/plugin_auth.result
+21
-1
mysql-test/t/plugin_auth.test
mysql-test/t/plugin_auth.test
+31
-0
sql/sql_acl.cc
sql/sql_acl.cc
+5
-5
No files found.
mysql-test/r/plugin_auth.result
View file @
232b112e
...
...
@@ -44,7 +44,7 @@ ERROR 28000: Access denied for user 'plug'@'localhost' (using password: YES)
## test correct default plugin
select USER(),CURRENT_USER();
USER() CURRENT_USER()
plug@localhost plug@%
plug@localhost plug
_dest
@%
## test no_auto_create_user sql mode with plugin users
SET @@sql_mode=no_auto_create_user;
GRANT INSERT ON TEST.* TO grant_user IDENTIFIED WITH 'test_plugin_server';
...
...
@@ -462,4 +462,24 @@ CREATE USER bug12610784@localhost;
SET PASSWORD FOR bug12610784@localhost = PASSWORD('secret');
ERROR 28000: Access denied for user 'bug12610784'@'localhost' (using password: NO)
DROP USER bug12610784@localhost;
#
# Bug #12818542: PAM: ADDING PASSWORD FOR AN ACCOUNT DISABLES PAM
# AUTHENTICATION SETTINGS
#
CREATE USER bug12818542@localhost
IDENTIFIED WITH 'test_plugin_server' AS 'bug12818542_dest';
CREATE USER bug12818542_dest@localhost
IDENTIFIED BY 'bug12818542_dest_passwd';
GRANT PROXY ON bug12818542_dest@localhost TO bug12818542@localhost;
SELECT USER(),CURRENT_USER();
USER() CURRENT_USER()
bug12818542@localhost bug12818542_dest@localhost
SET PASSWORD = PASSWORD('bruhaha');
Warnings:
Note 1699 SET PASSWORD has no significance for users authenticating via plugins
SELECT USER(),CURRENT_USER();
USER() CURRENT_USER()
bug12818542@localhost bug12818542_dest@localhost
DROP USER bug12818542@localhost;
DROP USER bug12818542_dest@localhost;
End of 5.5 tests
mysql-test/t/plugin_auth.test
View file @
232b112e
...
...
@@ -540,4 +540,35 @@ connection default;
disconnect
b12610784
;
DROP
USER
bug12610784
@
localhost
;
--
echo
#
--
echo
# Bug #12818542: PAM: ADDING PASSWORD FOR AN ACCOUNT DISABLES PAM
--
echo
# AUTHENTICATION SETTINGS
--
echo
#
CREATE
USER
bug12818542
@
localhost
IDENTIFIED
WITH
'test_plugin_server'
AS
'bug12818542_dest'
;
CREATE
USER
bug12818542_dest
@
localhost
IDENTIFIED
BY
'bug12818542_dest_passwd'
;
GRANT
PROXY
ON
bug12818542_dest
@
localhost
TO
bug12818542
@
localhost
;
connect
(
bug12818542_con
,
localhost
,
bug12818542
,
bug12818542_dest
);
connection
bug12818542_con
;
SELECT
USER
(),
CURRENT_USER
();
SET
PASSWORD
=
PASSWORD
(
'bruhaha'
);
connection
default
;
disconnect
bug12818542_con
;
connect
(
bug12818542_con2
,
localhost
,
bug12818542
,
bug12818542_dest
);
connection
bug12818542_con2
;
SELECT
USER
(),
CURRENT_USER
();
connection
default
;
disconnect
bug12818542_con2
;
DROP
USER
bug12818542
@
localhost
;
DROP
USER
bug12818542_dest
@
localhost
;
--
echo
End
of
5.5
tests
sql/sql_acl.cc
View file @
232b112e
...
...
@@ -1881,16 +1881,16 @@ bool change_password(THD *thd, const char *host, const char *user,
goto
end
;
}
/* update loaded acl entry: */
set_user_salt
(
acl_user
,
new_password
,
new_password_len
);
if
(
my_strcasecmp
(
system_charset_info
,
acl_user
->
plugin
.
str
,
native_password_plugin_name
.
str
)
&&
my_strcasecmp
(
system_charset_info
,
acl_user
->
plugin
.
str
,
old_password_plugin_name
.
str
))
{
push_warning
(
thd
,
MYSQL_ERROR
::
WARN_LEVEL_NOTE
,
ER_SET_PASSWORD_AUTH_PLUGIN
,
ER
(
ER_SET_PASSWORD_AUTH_PLUGIN
));
}
/* update loaded acl entry: */
set_user_salt
(
acl_user
,
new_password
,
new_password_len
);
else
set_user_plugin
(
acl_user
,
new_password_len
);
if
(
update_user_table
(
thd
,
table
,
...
...
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