Skip to content

Commit 261fb55

Browse files
Merge pull request #971 from ericvaandering/reverse_dn
Just reverse DN parts
2 parents cda16ee + 5a8a809 commit 261fb55

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

docker/rucio_client/scripts/utils.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,8 +44,12 @@ def rfc2253dn(legacy_dn: str, verbose: bool = False) -> str:
4444
# skips any DNs that don't have a attribute in the RFC_ATTRIBUTE_ORDER
4545
pass
4646

47+
# EWV This code from Dennis seems technically correct but we or Apache don't seem to follow it. OU/O can be swapped, ST can appear in odd places
4748
# sort existing attributes based on expected attribute order
48-
result = [a[0] for a in sorted(zip(elements, attributes, indexes), key=lambda x: x[2])]
49+
# result = [a[0] for a in sorted(zip(elements, attributes, indexes), key=lambda x: x[2])]
50+
51+
# Just reverse what was in the slash version
52+
result = elements
4953

5054
if verbose:
5155
print(f"original: {legacy_dn}\nindexes: {indexes}\nconverted: {','.join(result)}")

0 commit comments

Comments
 (0)