~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to drizzled/security_context.h

  • Committer: Brian Aker
  • Date: 2010-02-14 01:56:51 UTC
  • mto: (1273.16.5 fix_is)
  • mto: This revision was merged to the branch mainline in revision 1300.
  • Revision ID: brian@gaz-20100214015651-ror9j0xu7dccz0ct
Two fixes for "make dist"

Show diffs side-by-side

added added

removed removed

Lines of Context:
21
21
#ifndef DRIZZLED_SECURITY_CONTEXT_H
22
22
#define DRIZZLED_SECURITY_CONTEXT_H
23
23
 
24
 
#include <string>
25
 
 
26
24
namespace drizzled
27
25
{
28
26
 
33
31
 
34
32
class SecurityContext {
35
33
public:
36
 
  enum PasswordType
37
 
  {
38
 
    PLAIN_TEXT,
39
 
    MYSQL_HASH
40
 
  };
41
 
 
42
 
  SecurityContext():
43
 
    password_type(PLAIN_TEXT)
44
 
  { }
 
34
  SecurityContext() {}
45
35
 
46
36
  const std::string& getIp() const
47
37
  {
58
48
    return user;
59
49
  }
60
50
 
61
 
  void setUser(const std::string &newuser)
 
51
  void setUser(const char *newuser)
62
52
  {
63
53
    user.assign(newuser);
64
54
  }
65
55
 
66
 
  PasswordType getPasswordType(void) const
67
 
  {
68
 
    return password_type;
69
 
  }
70
 
 
71
 
  void setPasswordType(PasswordType newpassword_type)
72
 
  {
73
 
    password_type= newpassword_type;
74
 
  }
75
 
 
76
 
  const std::string& getPasswordContext() const
77
 
  {
78
 
    return password_context;
79
 
  }
80
 
 
81
 
  void setPasswordContext(const char *newpassword_context, size_t size)
82
 
  {
83
 
    password_context.assign(newpassword_context, size);
84
 
  }
85
 
 
86
56
private:
87
 
  PasswordType password_type;
88
57
  std::string user;
89
58
  std::string ip;
90
 
  std::string password_context;
91
59
};
92
60
 
93
61
} /* namespace drizzled */