summaryrefslogtreecommitdiff
path: root/sql/sql_base.cc
diff options
context:
space:
mode:
authorunknown <monty@mashka.mysql.fi>2003-05-07 23:59:24 +0300
committerunknown <monty@mashka.mysql.fi>2003-05-07 23:59:24 +0300
commita57e7732897ee7973d82dccea0425c436845066a (patch)
treedaddc57eeedc8a9ecec290538f8ecd00e81c06bb /sql/sql_base.cc
parentd4b465e2f3e871af1f5e7260055b4055bbe2a3f7 (diff)
downloadmariadb-git-a57e7732897ee7973d82dccea0425c436845066a.tar.gz
Security patch to remove wrong error when one had a global update/delete privilige and a database specific SELECT privilege.
sql/sql_acl.cc: Security patch sql/sql_base.cc: Security patch sql/sql_parse.cc: Security patch tests/grant.pl: Test of security patch tests/grant.res: Test of security patch
Diffstat (limited to 'sql/sql_base.cc')
-rw-r--r--sql/sql_base.cc9
1 files changed, 4 insertions, 5 deletions
diff --git a/sql/sql_base.cc b/sql/sql_base.cc
index 46370949650..d28fedba25b 100644
--- a/sql/sql_base.cc
+++ b/sql/sql_base.cc
@@ -1616,7 +1616,7 @@ Field *find_field_in_table(THD *thd,TABLE *table,const char *name,uint length,
else
thd->dupp_field=field;
}
- if (check_grants && check_grant_column(thd,table,name,length))
+ if (check_grants && check_grant_column(thd,table,name,length))
return WRONG_GRANT;
return field;
}
@@ -1643,8 +1643,8 @@ find_field_in_tables(THD *thd,Item_field *item,TABLE_LIST *tables)
{
found_table=1;
Field *find=find_field_in_table(thd,tables->table,name,length,
- grant_option &&
- tables->table->grant.want_privilege,
+ test(tables->table->grant.
+ want_privilege),
1);
if (find)
{
@@ -1684,8 +1684,7 @@ find_field_in_tables(THD *thd,Item_field *item,TABLE_LIST *tables)
for (; tables ; tables=tables->next)
{
Field *field=find_field_in_table(thd,tables->table,name,length,
- grant_option &&
- tables->table->grant.want_privilege,
+ test(tables->table->grant.want_privilege),
allow_rowid);
if (field)
{