Leaked source code of windows server 2003
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

48 lines
1.6 KiB

  1. #ifndef __POP3_AUTH_LOCAL_ACCOUNT_H__
  2. #define __POP3_AUTH_LOCAL_ACCOUNT_H__
  3. #include "resource.h"
  4. #include <ntsecapi.h>
  5. #define LOCAL_DOMAIN _T(".")
  6. #define WSZ_POP3_USERS_GROUP L"POP3 Users"
  7. #define LSA_WIN_STANDARD_BUFFER_SIZE 0x000000200L
  8. class ATL_NO_VTABLE CAuthLocalAccount :
  9. public CComObjectRootEx<CComSingleThreadModel>,
  10. public CComCoClass<CAuthLocalAccount, &CLSID_AuthLocalAccount>,
  11. public IDispatchImpl<IAuthMethod, &IID_IAuthMethod, &LIBID_Pop3Auth>
  12. {
  13. public:
  14. CAuthLocalAccount();
  15. virtual ~CAuthLocalAccount();
  16. DECLARE_REGISTRY_RESOURCEID(IDR_AUTHLOCALACCOUNT)
  17. DECLARE_PROTECT_FINAL_CONSTRUCT()
  18. BEGIN_COM_MAP(CAuthLocalAccount)
  19. COM_INTERFACE_ENTRY(IAuthMethod)
  20. COM_INTERFACE_ENTRY(IDispatch)
  21. END_COM_MAP()
  22. public:
  23. STDMETHOD(Authenticate)(/*[in]*/BSTR bstrUserName,/*[in]*/VARIANT vPassword);
  24. STDMETHOD(get_Name)(/*[out]*/BSTR *pVal);
  25. STDMETHOD(get_ID)(/*[out]*/BSTR *pVal);
  26. STDMETHOD(Get)(/*[in]*/BSTR bstrName, /*[out]*/VARIANT *pVal);
  27. STDMETHOD(Put)(/*[in]*/BSTR bstrName, /*[in]*/VARIANT vVal);
  28. STDMETHOD(CreateUser)(/*[in]*/BSTR bstrUserName,/*[in]*/VARIANT vPassword);
  29. STDMETHOD(DeleteUser)(/*[in]*/BSTR bstrUserName);
  30. STDMETHOD(ChangePassword)(/*[in]*/BSTR bstrUserName,/*[in]*/VARIANT vNewPassword,/*[in]*/VARIANT vOldPassword);
  31. STDMETHOD(AssociateEmailWithUser)(/*[in]*/BSTR bstrEmailAddr);
  32. STDMETHOD(UnassociateEmailWithUser)(/*[in]*/BSTR bstrEmailAddr);
  33. private:
  34. BSTR m_bstrServerName;
  35. DWORD CheckPop3UserGroup();
  36. DWORD SetLogonPolicy();
  37. };
  38. #endif //__POP3_AUTH_LOCAL_ACCOUNT_H__