1 #ifndef NT_SECURITY_CLASS
2 #define NT_SECURITY_CLASS
39 virtual ~nt_security();
41 static bool iequalsUsername(astring name1, astring name2);
46 static const astring &normalizeUsername(astring &username);
51 bool GetUserAndDomainName(astring &UserName, astring &DomainName);
56 astring DomainBinding(
const astring &domain);
58 astring DomainUserBinding(
const astring &domain,
const astring &user_name);
62 DWORD SetPrivilegeOnUser(
const astring &domain,
const astring &user,
63 const astring &privilege,
bool bEnable);
79 DWORD AddUserToGroup(
const astring &user_name,
const astring &group_name);
85 PSID GetUserSID(
const astring &user_name);
89 DWORD OpenPolicy(
const astring &serverName,
DWORD DesiredAccess,
90 PLSA_HANDLE pPolicyHandle);
94 void ClosePolicy(PLSA_HANDLE policyHandle);
97 DWORD SetPrivilegeOnAccount(LSA_HANDLE PolicyHandle,
99 const astring &PrivilegeName,
111 astring *m_sDirServiceProvider;
Support for unicode builds.