summaryrefslogtreecommitdiff
path: root/sql/sql_class.h
diff options
context:
space:
mode:
authorbell@sanja.is.com.ua <>2005-09-20 21:20:38 +0300
committerbell@sanja.is.com.ua <>2005-09-20 21:20:38 +0300
commitc1b185f5ff1f1f2141604269a7fe908ca91a8b0c (patch)
tree566c629b6b083a25010a5ecb53445bfe05c48fc6 /sql/sql_class.h
parentaec371f910c56f03ca108439a1b5d449b1bd9dc3 (diff)
downloadmariadb-git-c1b185f5ff1f1f2141604269a7fe908ca91a8b0c.tar.gz
WL#2787 (Add view definer/owner to the view definition (.frm) to check privileges on used tables and stored routines when using a VIEW.)
Part 2 postreview fixes.
Diffstat (limited to 'sql/sql_class.h')
-rw-r--r--sql/sql_class.h12
1 files changed, 7 insertions, 5 deletions
diff --git a/sql/sql_class.h b/sql/sql_class.h
index ddc8b092311..08194d6bd52 100644
--- a/sql/sql_class.h
+++ b/sql/sql_class.h
@@ -942,15 +942,17 @@ bool xid_cache_insert(XID_STATE *xid_state);
void xid_cache_delete(XID_STATE *xid_state);
-struct st_security_context {
+class Security_context {
+public:
/*
host - host of the client
user - user of the client, set to NULL until the user has been read from
the connection
- priv_user - The user privilege we are using. May be '' for anonymous user.
+ priv_user - The user privilege we are using. May be "" for anonymous user.
ip - client IP
*/
char *host, *user, *priv_user, *ip;
+ /* The host privilege we are using */
char priv_host[MAX_HOSTNAME];
/* points to host if host is available, otherwise points to ip */
const char *host_or_ip;
@@ -960,7 +962,7 @@ struct st_security_context {
void init();
void destroy();
void skip_grants();
- inline char *get_priv_host()
+ inline char *priv_host_name()
{
return (*priv_host ? priv_host : (char *)"%");
}
@@ -1150,8 +1152,8 @@ public:
the slave SQL thread, in sql/slave.cc.
*/
char *db, *catalog;
- st_security_context main_security_ctx;
- st_security_context *security_ctx;
+ Security_context main_security_ctx;
+ Security_context *security_ctx;
/* remote (peer) port */
uint16 peer_port;