1 /* Copyright (c) 2019 Percona LLC and/or its affiliates. All rights reserved.
2 
3    This program is free software; you can redistribute it and/or
4    modify it under the terms of the GNU General Public License
5    as published by the Free Software Foundation; version 2 of
6    the License.
7 
8    This program is distributed in the hope that it will be useful,
9    but WITHOUT ANY WARRANTY; without even the implied warranty of
10    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11    GNU General Public License for more details.
12 
13    You should have received a copy of the GNU General Public License
14    along with this program; if not, write to the Free Software
15    Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA */
16 
17 #include "security_context_wrapper.h"
18 
19 #define MYSQL_SERVER  "We need security context"
20 
21 #include <sql_class.h>
22 
23 
get_priv_host(MYSQL_THD thd)24 const char* get_priv_host(MYSQL_THD thd)
25 {
26   return thd->security_ctx->priv_host_name();
27 }
28