~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to drizzled/sql_base.cc

  • Committer: Brian Aker
  • Date: 2010-03-04 20:00:00 UTC
  • mfrom: (1320.1.15 build)
  • Revision ID: brian@gaz-20100304200000-vk1jaxgf665smmv8
Merge Monty/Brian

Show diffs side-by-side

added added

removed removed

Lines of Context:
51
51
#include "drizzled/global_charset_info.h"
52
52
#include "drizzled/pthread_globals.h"
53
53
#include "drizzled/internal/iocache.h"
 
54
#include "drizzled/plugin/authorization.h"
54
55
 
55
56
using namespace std;
56
57
 
2030
2031
    (*counter)++;
2031
2032
 
2032
2033
    /*
 
2034
     * Is the user authorized to see this table? Do this before we check
 
2035
     * to see if it exists so that an unauthorized user cannot phish for
 
2036
     * table/schema information via error messages
 
2037
     */
 
2038
    if (not plugin::Authorization::isAuthorized(getSecurityContext(),
 
2039
                                                string(tables->db),
 
2040
                                                string(tables->table_name)))
 
2041
    {
 
2042
      result= -1;                               // Fatal error
 
2043
      break;
 
2044
    }
 
2045
 
 
2046
 
 
2047
    /*
2033
2048
      Not a placeholder: must be a base table or a view, and the table is
2034
2049
      not opened yet. Try to open the table.
2035
2050
    */