X-Git-Url: http://git.iain.cx/?a=blobdiff_plain;f=account.h;h=04cb10e216ed9a78fd7cf55216b0da5138cba60b;hb=aecb56aeefcedd850ed274f09b85f62a6f623b5e;hp=e6b40f08a81bbfc3c0bacf56c657a04ac878cf7e;hpb=f5e50181eb7b62f62c4a9a6164d78df1460798d8;p=nssm.git diff --git a/account.h b/account.h index e6b40f0..04cb10e 100644 --- a/account.h +++ b/account.h @@ -1,24 +1,28 @@ -#ifndef ACCOUNT_H -#define ACCOUNT_H - -#include - -/* Not really an account. The canonical name is NT Authority\System. */ -#define NSSM_LOCALSYSTEM_ACCOUNT _T("LocalSystem") -/* Other well-known accounts which can start a service without a password. */ -#define NSSM_LOCALSERVICE_ACCOUNT _T("NT Authority\\LocalService") -#define NSSM_NETWORKSERVICE_ACCOUNT _T("NT Authority\\NetworkService") -/* This is explicitly a wide string. */ -#define NSSM_LOGON_AS_SERVICE_RIGHT L"SeServiceLogonRight" - -int open_lsa_policy(LSA_HANDLE *); -int username_sid(const TCHAR *, SID **, LSA_HANDLE *); -int username_sid(const TCHAR *, SID **); -int username_equiv(const TCHAR *, const TCHAR *); -int canonicalise_username(const TCHAR *, TCHAR **); -int is_localsystem(const TCHAR *); -const TCHAR *well_known_sid(SID *); -const TCHAR *well_known_username(const TCHAR *); -int grant_logon_as_service(const TCHAR *); - -#endif +#ifndef ACCOUNT_H +#define ACCOUNT_H + +#include + +/* Not really an account. The canonical name is NT Authority\System. */ +#define NSSM_LOCALSYSTEM_ACCOUNT _T("LocalSystem") +/* Other well-known accounts which can start a service without a password. */ +#define NSSM_LOCALSERVICE_ACCOUNT _T("NT Authority\\LocalService") +#define NSSM_NETWORKSERVICE_ACCOUNT _T("NT Authority\\NetworkService") +/* Virtual service accounts. */ +#define NSSM_VIRTUAL_SERVICE_ACCOUNT_DOMAIN _T("NT Service") +/* This is explicitly a wide string. */ +#define NSSM_LOGON_AS_SERVICE_RIGHT L"SeServiceLogonRight" + +int open_lsa_policy(LSA_HANDLE *); +int username_sid(const TCHAR *, SID **, LSA_HANDLE *); +int username_sid(const TCHAR *, SID **); +int username_equiv(const TCHAR *, const TCHAR *); +int canonicalise_username(const TCHAR *, TCHAR **); +int is_localsystem(const TCHAR *); +TCHAR *virtual_account(const TCHAR *); +int is_virtual_account(const TCHAR *, const TCHAR *); +const TCHAR *well_known_sid(SID *); +const TCHAR *well_known_username(const TCHAR *); +int grant_logon_as_service(const TCHAR *); + +#endif