Skip to content

Commit cda16ee

Browse files
Merge pull request #970 from ericvaandering/master
Just reverse the DN parts
2 parents f653ace + 8eb7149 commit cda16ee

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

docker/rucio_client/scripts/legacydn_converter.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,9 +61,12 @@ def rfc2253dn(legacy_dn: str, verbose: bool = False) -> str:
6161
# skips any DNs that don't have a attribute in the RFC_ATTRIBUTE_ORDER
6262
pass
6363

64+
# EWV This code from Dennis seems techincally correct but we or Apache don't seem to follow it. OU/O can be swapped, ST can appear in odd places
6465
# sort existing attributes based on expected attribute order
65-
result = [a[0] for a in sorted(zip(elements, attributes, indexes), key=lambda x: x[2])]
66+
# result = [a[0] for a in sorted(zip(elements, attributes, indexes), key=lambda x: x[2])]
6667

68+
# Just reverse what was in the slash version
69+
result = elements
6770
if verbose:
6871
print(f"original: {legacy_dn}\nindexes: {indexes}\nconverted: {','.join(result)}")
6972

0 commit comments

Comments
 (0)