mirror of
https://github.com/MariaDB/server.git
synced 2025-07-30 16:24:05 +03:00
Merge branch 'mysql-5.1' into mysql-5.5
This commit is contained in:
@ -1,4 +1,4 @@
|
||||
/* Copyright (c) 2000, 2013, Oracle and/or its affiliates. All rights reserved.
|
||||
/* Copyright (c) 2000, 2015, Oracle and/or its affiliates. All rights reserved.
|
||||
|
||||
This program is free software; you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
@ -5323,14 +5323,21 @@ bool mysql_show_grants(THD *thd,LEX_USER *lex_user)
|
||||
global.append ('\'');
|
||||
if (acl_user->salt_len)
|
||||
{
|
||||
char passwd_buff[SCRAMBLED_PASSWORD_CHAR_LENGTH+1];
|
||||
if (acl_user->salt_len == SCRAMBLE_LENGTH)
|
||||
make_password_from_salt(passwd_buff, acl_user->salt);
|
||||
global.append(STRING_WITH_LEN(" IDENTIFIED BY PASSWORD"));
|
||||
if ((thd->security_ctx->master_access & SUPER_ACL) == SUPER_ACL)
|
||||
{
|
||||
char passwd_buff[SCRAMBLED_PASSWORD_CHAR_LENGTH+1];
|
||||
if (acl_user->salt_len == SCRAMBLE_LENGTH)
|
||||
make_password_from_salt(passwd_buff, acl_user->salt);
|
||||
else
|
||||
make_password_from_salt_323(passwd_buff, (ulong *) acl_user->salt);
|
||||
|
||||
global.append(" \'");
|
||||
global.append(passwd_buff);
|
||||
global.append('\'');
|
||||
}
|
||||
else
|
||||
make_password_from_salt_323(passwd_buff, (ulong *) acl_user->salt);
|
||||
global.append(STRING_WITH_LEN(" IDENTIFIED BY PASSWORD '"));
|
||||
global.append(passwd_buff);
|
||||
global.append('\'');
|
||||
global.append(" <secret>");
|
||||
}
|
||||
/* "show grants" SSL related stuff */
|
||||
if (acl_user->ssl_type == SSL_TYPE_ANY)
|
||||
|
Reference in New Issue
Block a user