コード例 #1
0
        private void RunBitlockerMaintenance(IMonitoringADConfig adConfig)
        {
            if (!adConfig.Dag.AutoDagBitlockerEnabled)
            {
                DiskReclaimerManager.Tracer.TraceDebug <string>((long)this.GetHashCode(), "DiskReclaimer: Skipping running RunBitlockerMaintenance because the local DAG '{0}' has AutoDagBitlockerEnabled set to disabled.", adConfig.Dag.Name);
                return;
            }
            Exception ex;
            bool      flag = BitlockerUtil.IsVolumeMountedOnVirtualDisk(string.Empty, out ex);

            if (ex != null)
            {
                DiskReclaimerManager.Tracer.TraceDebug <Exception>((long)this.GetHashCode(), "RunBitlockerMaintenance(): Exception finding whether Volumes are mounted on virtual disks or not. Reason {0}", ex);
                return;
            }
            if (flag)
            {
                DiskReclaimerManager.Tracer.TraceDebug((long)this.GetHashCode(), "RunBitlockerMaintenance(): Volumes are mounted on virtual disks. Virtul Disk Volumes cannot be encrypted.");
                return;
            }
            if (!BitlockerConfigHelper.IsBitlockerManagerEnabled())
            {
                DiskReclaimerManager.Tracer.TraceDebug <AmServerName>((long)this.GetHashCode(), "DiskReclaimer: Skipping running RunBitlockerMaintenance because the local Machine '{0}' has BitlockerManagerEnabled set to disabled.", adConfig.TargetServerName);
                ReplayCrimsonEvents.BitlockerFeatureDisabled.Log();
                return;
            }
            if (Util.IsOperatingSystemWin8OrHigher())
            {
                this.RunBitlockerMaintenanceforWin8EmptyVolumes(adConfig.Dag.AutoDagFIPSCompliant);
                return;
            }
            this.RunBitlockerMaintenanceforWin7EmptyVolumes(adConfig.Dag.AutoDagFIPSCompliant);
        }
コード例 #2
0
 private void RunBitlockerMaintenanceforWin8EmptyVolumes(bool fipsCompliant)
 {
     if (BitlockerConfigHelper.IsBitlockerEmptyWin8VolumesUsedOnlyEncryptionFeatureEnabled())
     {
         BitlockerHelper.EncryptEmptyWin8Volumes(this.m_volumeManager, fipsCompliant);
         return;
     }
     DiskReclaimerManager.Tracer.TraceError((long)this.GetHashCode(), "DiskReclaimer: Skip encrypting Win8 empty volumes as the disabled config is set to true.}");
     ReplayCrimsonEvents.BitlockerEmptyWin8VolumesUsedOnlyEncryptionFeatureDisabled.Log();
 }