From 933316dab78685caaf4e2cee3dd541511035e73a Mon Sep 17 00:00:00 2001 From: Vincent LE TOUX Date: Tue, 13 Feb 2024 22:25:42 +0100 Subject: [PATCH] PingCastle 3.2.0.1 --- ...eatlcheckRuleStaleADRegistrationEnabled.cs | 23 +++++++++------ Properties/AssemblyInfo.cs | 4 +-- RPC/rpcfirewallchecker.cs | 28 ++++++++----------- 3 files changed, 28 insertions(+), 27 deletions(-) diff --git a/Healthcheck/Rules/HeatlcheckRuleStaleADRegistrationEnabled.cs b/Healthcheck/Rules/HeatlcheckRuleStaleADRegistrationEnabled.cs index 0a94ccc..ec1c2d7 100644 --- a/Healthcheck/Rules/HeatlcheckRuleStaleADRegistrationEnabled.cs +++ b/Healthcheck/Rules/HeatlcheckRuleStaleADRegistrationEnabled.cs @@ -23,12 +23,14 @@ public class HeatlcheckRuleStaleADRegistrationEnabled : RuleBase(); + var gpo = new Dictionary>(); foreach (GPPRightAssignment right in healthcheckData.GPPRightAssignment) { if (right.Privilege == "SeMachineAccountPrivilege") { - gpo.Add(right, right.User); + if (!gpo.ContainsKey(right)) + gpo[right] = new List(); + gpo[right].Add(right.User); } } var o = ApplyGPOPrority2(healthcheckData, gpo); @@ -37,14 +39,17 @@ public class HeatlcheckRuleStaleADRegistrationEnabled : RuleBase