X-Git-Url: http://git.iain.cx/?a=blobdiff_plain;f=account.h;h=232e1f9162d9336dfad31aead602c25aa2d527b3;hb=caaaa1208f29647987173f7d9bc1aa75b58757b7;hp=f16a899220ffaa48a181be5fe96a1209fec3e0e2;hpb=cca8d28295ce27b7c996b47badc6a1e3a6a34e65;p=nssm.git diff --git a/account.h b/account.h index f16a899..232e1f9 100644 --- a/account.h +++ b/account.h @@ -1,22 +1,24 @@ -#ifndef ACCOUNT_H -#define ACCOUNT_H - -#include - -/* Not really an account. The canonical name is NT Authority\System. */ -#define NSSM_LOCALSYSTEM_ACCOUNT _T("LocalSystem") -/* 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 is_localsystem(const TCHAR *); -TCHAR *canonical_username(const TCHAR *); -int requires_password(SID *); -int requires_password(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") +/* 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