Merge pull request #464 from NextTurn/domain

Fix default domain name
pull/468/head
Oleg Nenashev 2020-03-31 11:19:47 +02:00 committed by GitHub
commit 109e754813
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 6 additions and 8 deletions

View File

@ -24,7 +24,7 @@ namespace winsw.Configuration
// Installation
public bool AllowServiceAcountLogonRight => false;
public string? ServiceAccountPassword => null;
public string ServiceAccountUser => "NULL\\NULL";
public string? ServiceAccountUser => null;
public List<Native.SC_ACTION> FailureActions => new List<Native.SC_ACTION>(0);
public TimeSpan ResetFailureAfter => TimeSpan.FromDays(1);

View File

@ -20,7 +20,7 @@ namespace winsw.Configuration
// Installation
bool AllowServiceAcountLogonRight { get; }
string? ServiceAccountPassword { get; }
string ServiceAccountUser { get; }
string? ServiceAccountUser { get; }
List<Native.SC_ACTION> FailureActions { get; }
TimeSpan ResetFailureAfter { get; }

View File

@ -634,19 +634,17 @@ namespace winsw
protected string? AllowServiceLogon => GetServiceAccountPart("allowservicelogon");
// ReSharper disable once InconsistentNaming
protected string? serviceAccountDomain => GetServiceAccountPart("domain");
protected string? ServiceAccountDomain => GetServiceAccountPart("domain");
// ReSharper disable once InconsistentNaming
protected string? serviceAccountName => GetServiceAccountPart("user");
protected string? ServiceAccountName => GetServiceAccountPart("user");
public string? ServiceAccountPassword => GetServiceAccountPart("password");
public string ServiceAccountUser => (serviceAccountDomain ?? "NULL") + @"\" + (serviceAccountName ?? "NULL");
public string? ServiceAccountUser => ServiceAccountName is null ? null : (ServiceAccountDomain ?? ".") + "\\" + ServiceAccountName;
public bool HasServiceAccount()
{
return !string.IsNullOrEmpty(serviceAccountDomain) && !string.IsNullOrEmpty(serviceAccountName);
return !string.IsNullOrEmpty(ServiceAccountName);
}
public bool AllowServiceAcountLogonRight