1
0
mirror of https://github.com/MariaDB/server.git synced 2025-07-30 16:24:05 +03:00

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
This commit is contained in:
unknown
2005-09-20 21:20:38 +03:00
parent 84f029a448
commit 3fe752f527
16 changed files with 151 additions and 120 deletions

View File

@ -415,7 +415,7 @@ mysqld_show_create(THD *thd, TABLE_LIST *table_list)
bool mysqld_show_create_db(THD *thd, char *dbname,
HA_CREATE_INFO *create_info)
{
st_security_context *sctx= thd->security_ctx;
Security_context *sctx= thd->security_ctx;
int length;
char path[FN_REFLEN];
char buff[2048];
@ -436,7 +436,7 @@ bool mysqld_show_create_db(THD *thd, char *dbname,
}
#ifndef NO_EMBEDDED_ACCESS_CHECKS
if (test_all_bits(sctx->master_access,DB_ACLS))
if (test_all_bits(sctx->master_access, DB_ACLS))
db_access=DB_ACLS;
else
db_access= (acl_get(sctx->host, sctx->ip, sctx->priv_user, dbname, 0) |
@ -1186,7 +1186,7 @@ void mysqld_list_processes(THD *thd,const char *user, bool verbose)
THD *tmp;
while ((tmp=it++))
{
st_security_context *tmp_sctx= tmp->security_ctx;
Security_context *tmp_sctx= tmp->security_ctx;
struct st_my_thread_var *mysys_var;
if ((tmp->vio_ok() || tmp->system_thread) &&
(!user || (tmp_sctx->user && !strcmp(tmp_sctx->user, user))))
@ -1205,7 +1205,7 @@ void mysqld_list_processes(THD *thd,const char *user, bool verbose)
"%s:%u", tmp_sctx->host_or_ip, tmp->peer_port);
}
else
thd_info->host= thd->strdup(tmp_sctx->host_or_ip);
thd_info->host= thd->strdup(tmp_sctx->host);
if ((thd_info->db=tmp->db)) // Safe test
thd_info->db=thd->strdup(thd_info->db);
thd_info->command=(int) tmp->command;
@ -1257,7 +1257,7 @@ void mysqld_list_processes(THD *thd,const char *user, bool verbose)
thread_info *thd_info;
#ifndef NO_EMBEDDED_ACCESS_CHECKS
st_security_context *sctx;
Security_context *sctx;
#endif
time_t now= time(0);
while ((thd_info=thread_infos.get()))
@ -1996,7 +1996,7 @@ int get_all_tables(THD *thd, TABLE_LIST *tables, COND *cond)
List<char> bases;
List_iterator_fast<char> it(bases);
COND *partial_cond;
st_security_context *sctx= thd->security_ctx;
Security_context *sctx= thd->security_ctx;
uint derived_tables= lex->derived_tables;
int error= 1;
Open_tables_state open_tables_state_backup;
@ -2201,7 +2201,7 @@ int fill_schema_shemata(THD *thd, TABLE_LIST *tables, COND *cond)
bool with_i_schema;
HA_CREATE_INFO create;
TABLE *table= tables->table;
st_security_context *sctx= thd->security_ctx;
Security_context *sctx= thd->security_ctx;
DBUG_ENTER("fill_schema_shemata");
if (make_db_list(thd, &files, &idx_field_vals,