diff options
author | unknown <bell@sanja.is.com.ua> | 2005-09-20 21:20:38 +0300 |
---|---|---|
committer | unknown <bell@sanja.is.com.ua> | 2005-09-20 21:20:38 +0300 |
commit | 3fe752f527895bcd6b32f9cf7f1dcd983d4b4313 (patch) | |
tree | 566c629b6b083a25010a5ecb53445bfe05c48fc6 /sql/sp_head.cc | |
parent | 84f029a448fc822f2fa150ab13e61b233b1e4027 (diff) | |
download | mariadb-git-3fe752f527895bcd6b32f9cf7f1dcd983d4b4313.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/sp_head.cc')
-rw-r--r-- | sql/sp_head.cc | 16 |
1 files changed, 7 insertions, 9 deletions
diff --git a/sql/sp_head.cc b/sql/sp_head.cc index 0d481047849..157672f2a86 100644 --- a/sql/sp_head.cc +++ b/sql/sp_head.cc @@ -2648,16 +2648,14 @@ sp_instr_error::print(String *str) #ifndef NO_EMBEDDED_ACCESS_CHECKS bool -sp_change_security_context(THD *thd, sp_head *sp, st_security_context **backup) +sp_change_security_context(THD *thd, sp_head *sp, Security_context **backup) { - bool changed= (sp->m_chistics->suid != SP_IS_NOT_SUID && - (strcmp(sp->m_definer_user.str, - thd->security_ctx->priv_user) || - my_strcasecmp(system_charset_info, sp->m_definer_host.str, - thd->security_ctx->priv_host))); - *backup= 0; - if (changed) + if (sp->m_chistics->suid != SP_IS_NOT_SUID && + (strcmp(sp->m_definer_user.str, + thd->security_ctx->priv_user) || + my_strcasecmp(system_charset_info, sp->m_definer_host.str, + thd->security_ctx->priv_host))) { if (acl_getroot_no_password(&sp->m_security_ctx, sp->m_definer_user.str, sp->m_definer_host.str, @@ -2675,7 +2673,7 @@ sp_change_security_context(THD *thd, sp_head *sp, st_security_context **backup) } void -sp_restore_security_context(THD *thd, st_security_context *backup) +sp_restore_security_context(THD *thd, Security_context *backup) { if (backup) thd->security_ctx= backup; |