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