account.h 928 B

123456789101112131415161718192021222324
  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. /* This is explicitly a wide string. */
  10. #define NSSM_LOGON_AS_SERVICE_RIGHT L"SeServiceLogonRight"
  11. int open_lsa_policy(LSA_HANDLE *);
  12. int username_sid(const TCHAR *, SID **, LSA_HANDLE *);
  13. int username_sid(const TCHAR *, SID **);
  14. int username_equiv(const TCHAR *, const TCHAR *);
  15. int canonicalise_username(const TCHAR *, TCHAR **);
  16. int is_localsystem(const TCHAR *);
  17. const TCHAR *well_known_sid(SID *);
  18. const TCHAR *well_known_username(const TCHAR *);
  19. int grant_logon_as_service(const TCHAR *);
  20. #endif