Skip to content

Commit

Permalink
Creating Unknown trust attribute, but not recording it
Browse files Browse the repository at this point in the history
  • Loading branch information
definitelynotagoblin committed Mar 18, 2024
1 parent 612ebe7 commit f7538d6
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 7 deletions.
3 changes: 1 addition & 2 deletions src/CommonLib/Enums/TrustAttributes.cs
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@ public enum TrustAttributes
TrustUsesAes = 0x100,
CrossOrganizationNoTGTDelegation = 0x200,
PIMTrust = 0x400,
// We believe this deprecated flag represents a parent/child relationship
DeprecatedParentChild = 0x400000,
Unknown = 0x400000,
}
}
2 changes: 1 addition & 1 deletion src/CommonLib/Processors/DomainTrustProcessor.cs
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ public static TrustType TrustAttributesToType(TrustAttributes attributes)
{
TrustType trustType;

if (attributes.HasFlag(TrustAttributes.WithinForest) || attributes.HasFlag(TrustAttributes.DeprecatedParentChild))
if (attributes.HasFlag(TrustAttributes.WithinForest))
trustType = TrustType.ParentChild;
else if (attributes.HasFlag(TrustAttributes.ForestTransitive))
trustType = TrustType.Forest;
Expand Down
4 changes: 0 additions & 4 deletions test/unit/DomainTrustProcessorTest.cs
Original file line number Diff line number Diff line change
Expand Up @@ -109,10 +109,6 @@ public void DomainTrustProcessor_TrustAttributesToType()
var test = DomainTrustProcessor.TrustAttributesToType(attrib);
Assert.Equal(TrustType.ParentChild, test);

attrib = TrustAttributes.DeprecatedParentChild;
test = DomainTrustProcessor.TrustAttributesToType(attrib);
Assert.Equal(TrustType.ParentChild, test);

attrib = TrustAttributes.ForestTransitive;
test = DomainTrustProcessor.TrustAttributesToType(attrib);
Assert.Equal(TrustType.Forest, test);
Expand Down

0 comments on commit f7538d6

Please sign in to comment.