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
a94b20a8
Commit
a94b20a8
authored
Feb 19, 2019
by
Sergei Golubchik
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
don't consider the password "expired" if authentication is passwordless
parent
1e621016
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
35 additions
and
2 deletions
+35
-2
mysql-test/main/password_expiration_unix_socket.result
mysql-test/main/password_expiration_unix_socket.result
+8
-0
mysql-test/main/password_expiration_unix_socket.test
mysql-test/main/password_expiration_unix_socket.test
+24
-0
sql/sql_acl.cc
sql/sql_acl.cc
+3
-2
No files found.
mysql-test/main/password_expiration_unix_socket.result
0 → 100644
View file @
a94b20a8
#
# A password cannot expire, if there is no password
#
create user USER identified via unix_socket;
alter user USER password expire;
1
1
drop user USER;
mysql-test/main/password_expiration_unix_socket.test
0 → 100644
View file @
a94b20a8
#
# Test password expiration
#
--
source
include
/
not_embedded
.
inc
--
source
include
/
have_unix_socket
.
inc
--
echo
#
--
echo
# A password cannot expire, if there is no password
--
echo
#
--
let
$replace
=
create
user
$USER
--
replace_result
$replace
"create user USER"
--
eval
create
user
$USER
identified
via
unix_socket
--
let
$replace
=
alter
user
$USER
--
replace_result
$replace
"alter user USER"
--
eval
alter
user
$USER
password
expire
--
exec
$MYSQL
-
u
$USER
-
e
'select 1'
--
let
$replace
=
drop
user
$USER
--
replace_result
$replace
"drop user USER"
--
eval
drop
user
$USER
sql/sql_acl.cc
View file @
a94b20a8
...
...
@@ -13843,8 +13843,9 @@ bool acl_authenticate(THD *thd, uint com_change_user_pkt_len)
bool
client_can_handle_exp_pass
=
thd
->
client_capabilities
&
CLIENT_CAN_HANDLE_EXPIRED_PASSWORDS
;
bool
password_expired
=
acl_user
->
password_expired
||
check_password_lifetime
(
thd
,
*
acl_user
);
bool
password_expired
=
thd
->
password
!=
PASSWORD_USED_NO_MENTION
&&
(
acl_user
->
password_expired
||
check_password_lifetime
(
thd
,
*
acl_user
));
if
(
!
client_can_handle_exp_pass
&&
disconnect_on_expired_password
&&
password_expired
)
...
...
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