account.h 1.1 KB

12345678910111213141516171819202122232425262728
  1. #ifndef ACCOUNT_H
  2. #define ACCOUNT_H
  3. #include <ntsecapi.h>
  4. /* Not really an account. The canonical name is NT Authority\System. */
  5. #define NSSM_LOCALSYSTEM_ACCOUNT _T("LocalSystem")
  6. /* Other well-known accounts which can start a service without a password. */
  7. #define NSSM_LOCALSERVICE_ACCOUNT _T("NT Authority\\LocalService")
  8. #define NSSM_NETWORKSERVICE_ACCOUNT _T("NT Authority\\NetworkService")
  9. /* Virtual service accounts. */
  10. #define NSSM_VIRTUAL_SERVICE_ACCOUNT_DOMAIN _T("NT Service")
  11. /* This is explicitly a wide string. */
  12. #define NSSM_LOGON_AS_SERVICE_RIGHT L"SeServiceLogonRight"
  13. int open_lsa_policy(LSA_HANDLE *);
  14. int username_sid(const TCHAR *, SID **, LSA_HANDLE *);
  15. int username_sid(const TCHAR *, SID **);
  16. int username_equiv(const TCHAR *, const TCHAR *);
  17. int canonicalise_username(const TCHAR *, TCHAR **);
  18. int is_localsystem(const TCHAR *);
  19. TCHAR *virtual_account(const TCHAR *);
  20. int is_virtual_account(const TCHAR *, const TCHAR *);
  21. const TCHAR *well_known_sid(SID *);
  22. const TCHAR *well_known_username(const TCHAR *);
  23. int grant_logon_as_service(const TCHAR *);
  24. #endif