summaryrefslogtreecommitdiff
path: root/sql/sql_class.h
diff options
context:
space:
mode:
authorunknown <bell@sanja.is.com.ua>2005-09-20 21:20:38 +0300
committerunknown <bell@sanja.is.com.ua>2005-09-20 21:20:38 +0300
commita95d74bbb2d8a0d77ae337389cab2827235ff368 (patch)
tree566c629b6b083a25010a5ecb53445bfe05c48fc6 /sql/sql_class.h
parente80e4b10b8ffa8f50e71f07e2ff3e654d94a475a (diff)
downloadmariadb-git-a95d74bbb2d8a0d77ae337389cab2827235ff368.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. sql/ha_innodb.cc: Renamed structure st_security_context to class Security_context sql/item_func.cc: Renamed structure st_security_context to class Security_context sql/item_strfunc.cc: fixed USER() function sql/log.cc: variable used to optimize access to security context sql/mysql_priv.h: Renamed structure st_security_context to class Security_context sql/mysqld.cc: main security context used direcly sql/sp_head.cc: Renamed structure st_security_context to class Security_context removed unneed variable sql/sp_head.h: Comment inmroved Renamed structure st_security_context to class Security_context sql/sql_acl.cc: Renamed structure st_security_context to class Security_context fixed function comment and return value variable used to optimize access to security context Renamed method of Security_ontext sql/sql_acl.h: fixed return value type sql/sql_class.cc: Renamed structure st_security_context to class Security_context sql/sql_class.h: Renamed structure st_security_context to class Security_context Method renamed sql/sql_db.cc: Renamed structure st_security_context to class Security_context fixed layout sql/sql_parse.cc: registration of wanted access for underlying tables sql/sql_show.cc: Renamed structure st_security_context to class Security_context fixed layout sql/sql_yacc.yy: Renamed structure st_security_context to class Security_context
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;