summaryrefslogtreecommitdiff
path: root/sql/sp_head.h
diff options
context:
space:
mode:
authorbell@sanja.is.com.ua <>2005-09-15 22:29:07 +0300
committerbell@sanja.is.com.ua <>2005-09-15 22:29:07 +0300
commitaec371f910c56f03ca108439a1b5d449b1bd9dc3 (patch)
treefc6da649fdbafccdf434cac04cebe418f638185d /sql/sp_head.h
parenta9b3767874eea19ab146404a199ba2927e013b1e (diff)
downloadmariadb-git-aec371f910c56f03ca108439a1b5d449b1bd9dc3.tar.gz
WL#2787 (part 2, ver 3 (merged)) changed securety context switching
Diffstat (limited to 'sql/sp_head.h')
-rw-r--r--sql/sp_head.h22
1 files changed, 7 insertions, 15 deletions
diff --git a/sql/sp_head.h b/sql/sp_head.h
index 9888fe74149..ccf8c48a5eb 100644
--- a/sql/sp_head.h
+++ b/sql/sp_head.h
@@ -151,6 +151,9 @@ public:
// Pointers set during parsing
uchar *m_param_begin, *m_param_end, *m_body_begin;
+ /* security context for SP procedure/function in case we switch it*/
+ st_security_context m_security_ctx;
+
static void *
operator new(size_t size);
@@ -1017,23 +1020,12 @@ private:
}; // class sp_instr_error : public sp_instr
-struct st_sp_security_context
-{
- bool changed;
- uint master_access;
- uint db_access;
- char *priv_user;
- char priv_host[MAX_HOSTNAME];
- char *user;
- char *host;
- char *ip;
-};
-
#ifndef NO_EMBEDDED_ACCESS_CHECKS
+bool
+sp_change_security_context(THD *thd, sp_head *sp,
+ st_security_context **backup);
void
-sp_change_security_context(THD *thd, sp_head *sp, st_sp_security_context *ctxp);
-void
-sp_restore_security_context(THD *thd, sp_head *sp,st_sp_security_context *ctxp);
+sp_restore_security_context(THD *thd, st_security_context *backup);
#endif /* NO_EMBEDDED_ACCESS_CHECKS */
TABLE_LIST *