Adding logon as a service right to user account specified in configuration

This commit is contained in:
Nicholas Carpenter
2015-01-28 23:57:46 -05:00
parent 92459d72dd
commit 4ce20f5533
6 changed files with 312 additions and 2 deletions

View File

@@ -540,6 +540,14 @@ namespace winsw
}
protected string AllowServiceLogon
{
get
{
return GetServiceAccountPart("allowservicelogon");
}
}
protected string serviceAccountDomain
{
get{
@@ -573,6 +581,22 @@ namespace winsw
return !string.IsNullOrEmpty(serviceAccountDomain) && !string.IsNullOrEmpty(serviceAccountName);
}
public bool AllowServiceAcountLogonRight
{
get
{
if (AllowServiceLogon != null)
{
bool parsedvalue = false;
if (Boolean.TryParse(AllowServiceLogon, out parsedvalue))
{
return parsedvalue;
}
}
return false;
}
}
/// <summary>
/// Time to wait for the service to gracefully shutdown before we forcibly kill it
/// </summary>