~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to drizzled/session.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:
673
673
 
674
674
bool Session::checkUser(const char *passwd, uint32_t passwd_len, const char *in_db)
675
675
{
676
 
  bool is_authenticated;
677
 
 
678
676
  if (passwd_len != 0 && passwd_len != SCRAMBLE_LENGTH)
679
677
  {
680
678
    my_error(ER_HANDSHAKE_ERROR, MYF(0), getSecurityContext().getIp().c_str());
681
679
    return false;
682
680
  }
683
681
 
684
 
  is_authenticated= plugin::Authentication::isAuthenticated(this, passwd);
 
682
  const string passwd_str(passwd, passwd_len);
 
683
  bool is_authenticated=
 
684
    plugin::Authentication::isAuthenticated(getSecurityContext(),
 
685
                                            passwd_str);
685
686
 
686
687
  if (is_authenticated != true)
687
688
  {
688
 
    my_error(ER_ACCESS_DENIED_ERROR, MYF(0),
689
 
             getSecurityContext().getUser().c_str(),
690
 
             getSecurityContext().getIp().c_str(),
691
 
             passwd_len ? ER(ER_YES) : ER(ER_NO));
692
 
 
 
689
    /* isAuthenticated has pushed the error message */
693
690
    return false;
694
691
  }
695
692