~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to drizzled/security_context.h

Added code necessary for building plugins dynamically.
Merged in changes from lifeless to allow autoreconf to work.
Touching plugin.ini files now triggers a rebuid - so config/autorun.sh is no
longer required to be run after touching those.
Removed the duplicate plugin names - also removed the issue that getting them
different would silently fail weirdly later.

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
 
namespace drizzled
27
 
{
28
24
 
29
25
/**
30
 
  @class SecurityContext
 
26
  @class Security_context
31
27
  @brief A set of Session members describing the current authenticated user.
32
28
*/
33
29
 
34
 
class SecurityContext {
 
30
class Security_context {
35
31
public:
36
 
  SecurityContext() {}
37
 
 
38
 
  const std::string& getIp() const
39
 
  {
40
 
    return ip;
41
 
  }
42
 
 
43
 
  void setIp(const char *newip)
44
 
  {
45
 
    ip.assign(newip);
46
 
  }
47
 
 
48
 
  const std::string& getUser() const
49
 
  {
50
 
    return user;
51
 
  }
52
 
 
53
 
  void setUser(const char *newuser)
54
 
  {
55
 
    user.assign(newuser);
56
 
  }
57
 
 
58
 
private:
 
32
  Security_context() {}
 
33
  /*
 
34
    host - host of the client
 
35
    user - user of the client, set to NULL until the user has been read from
 
36
    the connection
 
37
    priv_user - The user privilege we are using. May be "" for anonymous user.
 
38
    ip - client IP
 
39
  */
59
40
  std::string user;
60
41
  std::string ip;
 
42
 
 
43
  void skip_grants();
 
44
  inline const char *priv_host_name()
 
45
  {
 
46
    return (ip.c_str() ? ip.c_str() : (char *)"%");
 
47
  }
61
48
};
62
49
 
63
 
} /* namespace drizzled */
64
 
 
65
50
#endif /* DRIZZLED_SECURITY_CONTEXT_H */