]> git.ipfire.org Git - thirdparty/samba.git/commitdiff
netcmd: domain: fix claims constant name was wrong should be claim type CN
authorRob van der Linde <rob@catalyst.net.nz>
Thu, 25 May 2023 02:43:19 +0000 (14:43 +1200)
committerAndrew Bartlett <abartlet@samba.org>
Sun, 25 Jun 2023 23:29:32 +0000 (23:29 +0000)
Signed-off-by: Rob van der Linde <rob@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Joseph Sutton <josephsutton@catalyst.net.nz>
python/samba/netcmd/domain/claim/claim_type.py

index aa3896f6111fb303472a5c12648d3901ef64611c..8144e4275cf78de7eeda7a34ec8517c114d36079 100644 (file)
@@ -33,9 +33,9 @@ from samba.sd_utils import SDUtils
 
 from .base import ClaimCommand
 
-# LDAP Syntax to Claim Type DN lookup table.
+# LDAP Syntax to Claim Type CN lookup table.
 # These are the ones actively used by AD claim type attributes.
-SYNTAX_TO_CLAIM_TYPE_DN = {
+SYNTAX_TO_CLAIM_TYPE_CN = {
     "2.5.5.1": "MS-DS-Text",     # Object(DS-DN)
     "2.5.5.2": "MS-DS-Text",     # String(Object-Identifier)
     "2.5.5.8": "MS-DS-YesNo",    # Boolean
@@ -99,7 +99,7 @@ class cmd_domain_claim_claim_type_create(ClaimCommand):
         Uses the LDAP attribute syntax to find the matching claim value type.
         """
         attribute_syntax = str(attribute["attributeSyntax"])
-        claim_type_dn = SYNTAX_TO_CLAIM_TYPE_DN[attribute_syntax]
+        claim_type_dn = SYNTAX_TO_CLAIM_TYPE_CN[attribute_syntax]
         return self.claim_value_types[claim_type_dn]["msDS-ClaimValueType"]
 
     def run(self, ldap_url=None, sambaopts=None, credopts=None,