~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to drizzled/authentication.cc

  • Committer: Brian Aker
  • Date: 2008-10-20 04:28:21 UTC
  • mto: (492.3.21 drizzle-clean-code)
  • mto: This revision was merged to the branch mainline in revision 530.
  • Revision ID: brian@tangent.org-20081020042821-rqqdrccuu8195k3y
Second pass of thd cleanup

Show diffs side-by-side

added added

removed removed

Lines of Context:
24
24
 
25
25
static bool are_plugins_loaded= false;
26
26
 
27
 
static bool authenticate_by(Session *thd, plugin_ref plugin, void* p_data)
 
27
static bool authenticate_by(Session *session, plugin_ref plugin, void* p_data)
28
28
{
29
29
  const char *password= (const char *)p_data;
30
30
  authentication_st *auth= plugin_data(plugin, authentication_st *);
33
33
 
34
34
  if (auth && auth->authenticate)
35
35
  {
36
 
    if (auth->authenticate(thd, password))
 
36
    if (auth->authenticate(session, password))
37
37
      return true;
38
38
  }
39
39
 
40
40
  return false;
41
41
}
42
42
 
43
 
bool authenticate_user(Session *thd, const char *password)
 
43
bool authenticate_user(Session *session, const char *password)
44
44
{
45
45
  /* If we never loaded any auth plugins, just return true */
46
46
  if (are_plugins_loaded != true)
47
47
    return true;
48
48
 
49
 
  return plugin_foreach(thd, authenticate_by, DRIZZLE_AUTH_PLUGIN, (void *)password);
 
49
  return plugin_foreach(session, authenticate_by, DRIZZLE_AUTH_PLUGIN, (void *)password);
50
50
}
51
51
 
52
52