@@ -925,7 +925,7 @@ private void GenerateComputerData(ADDomainInfo domainInfo, ADWebService adws)
925
925
}
926
926
}
927
927
}
928
- if ( x . ReplPropertyMetaData != null && LAPSAnalyzer . LegacyLAPSIntId > 0 && x . ReplPropertyMetaData . ContainsKey ( LAPSAnalyzer . LegacyLAPSIntId ) )
928
+ if ( x . ReplPropertyMetaData != null && LAPSAnalyzer . LegacyLAPSIntId != 0 && x . ReplPropertyMetaData . ContainsKey ( LAPSAnalyzer . LegacyLAPSIntId ) )
929
929
{
930
930
proxy . AddWithoutDetail ( "LAPS" ) ;
931
931
var d = x . ReplPropertyMetaData [ LAPSAnalyzer . LegacyLAPSIntId ] ;
@@ -938,7 +938,7 @@ private void GenerateComputerData(ADDomainInfo domainInfo, ADWebService adws)
938
938
lapsDistribution [ i ] = 1 ;
939
939
}
940
940
}
941
- if ( x . ReplPropertyMetaData != null && LAPSAnalyzer . MsLAPSIntId > 0 && x . ReplPropertyMetaData . ContainsKey ( LAPSAnalyzer . MsLAPSIntId ) )
941
+ if ( x . ReplPropertyMetaData != null && LAPSAnalyzer . MsLAPSIntId != 0 && x . ReplPropertyMetaData . ContainsKey ( LAPSAnalyzer . MsLAPSIntId ) )
942
942
{
943
943
proxy . AddWithoutDetail ( "LAPSNew" ) ;
944
944
var d = x . ReplPropertyMetaData [ LAPSAnalyzer . MsLAPSIntId ] ;
@@ -2607,7 +2607,7 @@ void ThreadGPOAnalysis(int ThreadId, ADWebService adws, string directoryFullName
2607
2607
if ( adws . FileConnection . FileExists ( path ) )
2608
2608
{
2609
2609
step = "extract GPP local group assignment" ;
2610
- ExtractLocalGroupAssignment ( adws , path , GPO , "Unknown [" + shortName + "]" ) ;
2610
+ ExtractLocalGroupAssignment ( adws , path , GPO ) ;
2611
2611
}
2612
2612
path = directoryFullName + @"\Machine\Microsoft\Windows nt\SecEdit\GptTmpl.inf" ;
2613
2613
if ( adws . FileConnection . FileExists ( path ) )
@@ -2680,14 +2680,14 @@ void ThreadGPOAnalysis(int ThreadId, ADWebService adws, string directoryFullName
2680
2680
}
2681
2681
}
2682
2682
2683
- private void ExtractLocalGroupAssignment ( ADWebService adws , string path , GPO GPO , string p )
2683
+ private void ExtractLocalGroupAssignment ( ADWebService adws , string path , GPO GPO )
2684
2684
{
2685
2685
XmlDocument doc = new XmlDocument ( ) ;
2686
2686
doc . Load ( path ) ;
2687
2687
XmlNodeList nodeList = doc . SelectNodes ( @"//Group" ) ;
2688
2688
foreach ( XmlNode node in nodeList )
2689
2689
{
2690
- XmlNode actionNode = node . SelectSingleNode ( @"// Properties/@action" ) ;
2690
+ XmlNode actionNode = node . SelectSingleNode ( @"Properties/@action" ) ;
2691
2691
if ( actionNode != null )
2692
2692
{
2693
2693
switch ( actionNode . Value . ToUpperInvariant ( ) )
@@ -2703,7 +2703,7 @@ private void ExtractLocalGroupAssignment(ADWebService adws, string path, GPO GPO
2703
2703
var groupNameNode = node . SelectSingleNode ( "@name" ) ;
2704
2704
if ( groupNameNode == null )
2705
2705
continue ;
2706
- foreach ( XmlNode userNameNode in node . SelectNodes ( @"/ /Member[@action=""ADD""]" ) )
2706
+ foreach ( XmlNode userNameNode in node . SelectNodes ( @"Properties/Members /Member[@action=""ADD""]" ) )
2707
2707
{
2708
2708
var sidnode = userNameNode . SelectSingleNode ( "@sid" ) ;
2709
2709
if ( sidnode == null )
@@ -4552,9 +4552,9 @@ private LAPSAnalyzer CheckLAPSInstalled(ADDomainInfo domainInfo, ADWebService ad
4552
4552
var f = false ;
4553
4553
// check if there is a LAPS attribute (looked into metadata because hidden if the current user has not right to read it)
4554
4554
if (
4555
- ( lapsAnalyzer . LegacyLAPSIntId > 0 && x . ReplPropertyMetaData . ContainsKey ( lapsAnalyzer . LegacyLAPSIntId ) )
4555
+ ( lapsAnalyzer . LegacyLAPSIntId != 0 && x . ReplPropertyMetaData . ContainsKey ( lapsAnalyzer . LegacyLAPSIntId ) )
4556
4556
||
4557
- ( lapsAnalyzer . MsLAPSIntId > 0 && x . ReplPropertyMetaData . ContainsKey ( lapsAnalyzer . MsLAPSIntId ) )
4557
+ ( lapsAnalyzer . MsLAPSIntId != 0 && x . ReplPropertyMetaData . ContainsKey ( lapsAnalyzer . MsLAPSIntId ) )
4558
4558
)
4559
4559
{
4560
4560
if ( x . NTSecurityDescriptor != null )
0 commit comments