~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to plugin/auth_pam/auth_pam.cc

  • Committer: Brian Aker
  • Date: 2010-12-18 10:14:05 UTC
  • mfrom: (2008.1.3 clean)
  • Revision ID: brian@tangent.org-20101218101405-qjbse29shi9coklg
Merge of user identifier work

Show diffs side-by-side

added added

removed removed

Lines of Context:
29
29
#include <security/pam_misc.h>
30
30
#endif
31
31
 
32
 
#include "drizzled/security_context.h"
 
32
#include "drizzled/identifier.h"
33
33
#include "drizzled/plugin/authentication.h"
34
34
 
35
35
using namespace drizzled;
106
106
public:
107
107
  Auth_pam(std::string name_arg)
108
108
    : drizzled::plugin::Authentication(name_arg) {}
109
 
  virtual bool authenticate(const SecurityContext &sctx,
 
109
  virtual bool authenticate(const identifier::User &sctx,
110
110
                            const std::string &password)
111
111
  {
112
112
    int retval;
114
114
    struct pam_conv conv_info= { &auth_pam_talker, (void*)&userinfo };
115
115
    pam_handle_t *pamh= NULL;
116
116
 
117
 
    userinfo.name= sctx.getUser().c_str();
 
117
    userinfo.name= sctx.username().c_str();
118
118
    userinfo.password= password.c_str();
119
119
 
120
120
    retval= pam_start("drizzle", userinfo.name, &conv_info, &pamh);