diff options
author | unknown <monty@mysql.com> | 2005-03-15 16:07:28 +0200 |
---|---|---|
committer | unknown <monty@mysql.com> | 2005-03-15 16:07:28 +0200 |
commit | ef7ebed4135a7ddc85c194d632ac7d6308995769 (patch) | |
tree | aed7f185cf908cbc9dc83d45ef1c53191c23011d /sql/sql_acl.cc | |
parent | 722ffa879f27e9914ce557f7dc1f80a5acdf6134 (diff) | |
download | mariadb-git-ef7ebed4135a7ddc85c194d632ac7d6308995769.tar.gz |
Code cleanups during review of pushed code
sql/mysql_priv.h:
Added 'const' to some arguments
sql/sp_head.cc:
Added comments
code cleanup
acceess -> access
sql/sql_acl.cc:
Simply code by making check_routine_level_acl() available also in embedded server
sql/sql_acl.h:
Added 'const' to some arguments
sql/sql_parse.cc:
Added 'const' to some arguments
Fixed the check_rounte_level_acl() is always called
(old code didn't properly check access privilges if grant_option was not set)
sql/sql_show.cc:
Simplify usage of get_field()
Now we can always call check_some_routine_access()
sql/sql_udf.cc:
Don't give warnings for suspicios UDF's if --log-warnings isn't given
sql/table.cc:
Simplify usage of get_field()
Diffstat (limited to 'sql/sql_acl.cc')
-rw-r--r-- | sql/sql_acl.cc | 18 |
1 files changed, 15 insertions, 3 deletions
diff --git a/sql/sql_acl.cc b/sql/sql_acl.cc index 3db219b5fdc..3759840d3bb 100644 --- a/sql/sql_acl.cc +++ b/sql/sql_acl.cc @@ -2125,7 +2125,7 @@ static GRANT_NAME *name_hash_search(HASH *name_hash, inline GRANT_NAME * proc_hash_search(const char *host, const char *ip, const char *db, - const char *user, const char *tname, bool exact) + const char *user, const char *tname, bool exact) { return (GRANT_TABLE*) name_hash_search(&proc_priv_hash, host, ip, db, user, tname, exact); @@ -3594,11 +3594,11 @@ err: name Routine name RETURN - 1 error 0 Ok + 1 error */ -bool check_routine_level_acl(THD *thd, char *db, char *name) +bool check_routine_level_acl(THD *thd, const char *db, const char *name) { bool no_routine_acl= 1; if (grant_option) @@ -5570,4 +5570,16 @@ void fill_effective_table_privileges(THD *thd, GRANT_INFO *grant, grant->privilege|= grant->grant_table->privs; } } + +#else /* NO_EMBEDDED_ACCESS_CHECKS */ + +/**************************************************************************** + Dummy wrappers when we don't have any access checks +****************************************************************************/ + +bool check_routine_level_acl(THD *thd, const char *db, const char *name) +{ + return FALSE; +} + #endif |