Skip to content

Commit

Permalink
misc: fix AD trust attributes in adssearch
Browse files Browse the repository at this point in the history
Guenther

Signed-off-by: Guenther Deschner <[email protected]>
Reviewed-by: Stefan Metzmacher <[email protected]>
  • Loading branch information
gd committed Sep 20, 2019
1 parent 7ba90c1 commit a7e4989
Showing 1 changed file with 12 additions and 5 deletions.
17 changes: 12 additions & 5 deletions examples/misc/adssearch.pl
Original file line number Diff line number Diff line change
Expand Up @@ -285,10 +285,17 @@ BEGIN
);

my %ads_trustattrs = (
"TRUST_ATTRIBUTE_NON_TRANSITIVE" => 1,
"TRUST_ATTRIBUTE_TREE_PARENT" => 2,
"TRUST_ATTRIBUTE_TREE_ROOT" => 3,
"TRUST_ATTRIBUTE_UPLEVEL_ONLY" => 4,
"TRUST_ATTRIBUTE_NON_TRANSITIVE" => 0x00000001,
"TRUST_ATTRIBUTE_UPLEVEL_ONLY" => 0x00000002,
"TRUST_ATTRIBUTE_QUARANTINED_DOMAIN" => 0x00000004,
"TRUST_ATTRIBUTE_FOREST_TRANSITIVE" => 0x00000008,
"TRUST_ATTRIBUTE_CROSS_ORGANIZATION" => 0x00000010,
"TRUST_ATTRIBUTE_WITHIN_FOREST" => 0x00000020,
"TRUST_ATTRIBUTE_TREAT_AS_EXTERNAL" => 0x00000040,
"TRUST_ATTRIBUTE_USES_RC4_ENCRYPTION" => 0x00000080,
"TRUST_ATTRIBUTE_CROSS_ORGANIZATION_NO_TGT_DELEGATION" => 0x00000200,
"TRUST_ATTRIBUTE_PIM_TRUST" => 0x00000400,
"TRUST_ATTRIBUTE_CROSS_ORGANIZATION_ENABLE_TGT_DELEGATION" => 0x00000800,
);

my %ads_trustdirection = (
Expand Down Expand Up @@ -1283,7 +1290,7 @@ sub dump_sdeffective {
}

sub dump_trustattr {
return dump_bitmask_equal(@_,%ads_trustattrs);
return dump_bitmask_and(@_,%ads_trustattrs);
}

sub dump_trusttype {
Expand Down

0 comments on commit a7e4989

Please sign in to comment.