mirror of
https://github.com/winsw/winsw.git
synced 2025-12-10 18:37:28 +08:00
Adding logon as a service right to user account specified in configuration
This commit is contained in:
@@ -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>
|
||||
|
||||
Reference in New Issue
Block a user