~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to drizzled/plugin/authentication.cc

  • Committer: Siddharth Prakash Singh
  • Date: 2010-03-26 19:25:23 UTC
  • mfrom: (1410 drizzle)
  • mto: This revision was merged to the branch mainline in revision 1425.
  • Revision ID: spsneo@spsneo-laptop-20100326192523-ibjlbt1p692vobtj
merging with trunk

Show diffs side-by-side

added added

removed removed

Lines of Context:
77
77
    find_if(all_authentication.begin(), all_authentication.end(),
78
78
            AuthenticateBy(sctx, password));
79
79
 
80
 
  /* If iter is == end() here, that means that all of the plugins returned
81
 
   * false, which in this case means they all succeeded. Since we want to 
82
 
   * return false on success, we return the value of the two being != 
 
80
  /* We only require one plugin to return success in order to authenticate.
 
81
   * If iter is == end() here, that means that all of the plugins returned
 
82
   * false, which means they all failed.
83
83
   */
84
 
  if (iter != all_authentication.end())
 
84
  if (iter == all_authentication.end())
85
85
  {
86
86
    my_error(ER_ACCESS_DENIED_ERROR, MYF(0),
87
87
             sctx.getUser().c_str(),
88
88
             sctx.getIp().c_str(),
89
89
             password.empty() ? ER(ER_NO) : ER(ER_YES));
90
 
    return true;
 
90
    return false;
91
91
  }
92
 
  return false;
 
92
  return true;
93
93
}
94
94
 
95
95
} /* namespace drizzled */