2019-06-21 15:05:31 +02:00
/ *
2024-03-05 18:37:42 +01:00
* Copyright ( c ) 2024 ETH Zürich , IT Services
2019-06-21 15:05:31 +02:00
*
* This Source Code Form is subject to the terms of the Mozilla Public
* License , v . 2.0 . If a copy of the MPL was not distributed with this
* file , You can obtain one at http : //mozilla.org/MPL/2.0/.
* /
2019-06-26 10:13:11 +02:00
using System ;
2019-07-03 08:59:27 +02:00
using System.Collections.Generic ;
2019-08-30 09:55:26 +02:00
using SafeExamBrowser.Logging.Contracts ;
2019-06-21 15:05:31 +02:00
2019-07-03 08:59:27 +02:00
namespace SafeExamBrowser.Lockdown.FeatureConfigurations.RegistryConfigurations.MachineHive
2019-06-21 15:05:31 +02:00
{
2019-07-19 10:07:45 +02:00
/// <summary>
/// Specifies whether Remote Desktop connections are enabled.
///
/// See https://docs.microsoft.com/en-us/windows-hardware/customize/desktop/unattend/microsoft-windows-terminalservices-localsessionmanager-fdenytsconnections:
2023-02-08 19:40:32 +01:00
/// 0 = Specifies that remote desktop connections are enabled.
/// 1 = Specifies that remote desktop connections are denied. This is the default value.
2019-07-19 10:07:45 +02:00
/// </summary>
2019-06-26 10:13:11 +02:00
[Serializable]
2019-07-03 08:59:27 +02:00
internal class RemoteConnectionConfiguration : MachineHiveConfiguration
2019-06-21 15:05:31 +02:00
{
2023-02-08 19:40:32 +01:00
protected override IEnumerable < RegistryConfigurationItem > Items = > new [ ]
2019-06-26 10:13:11 +02:00
{
2019-07-03 08:59:27 +02:00
new RegistryConfigurationItem ( @"HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Terminal Server" , "fDenyTSConnections" , 1 , 0 )
} ;
2019-06-21 15:05:31 +02:00
2019-07-03 08:59:27 +02:00
public RemoteConnectionConfiguration ( Guid groupId , ILogger logger ) : base ( groupId , logger )
2019-06-21 15:05:31 +02:00
{
}
2019-07-19 10:07:45 +02:00
public override bool Reset ( )
{
return DisableFeature ( ) ;
}
2019-06-21 15:05:31 +02:00
}
}