Bug 766097

Summary: ldap container dn's and base dn's should be initialized and used as DN objects instead of strings
Product: Red Hat Enterprise Linux 7 Reporter: Dmitri Pal <dpal>
Component: ipaAssignee: Rob Crittenden <rcritten>
Status: CLOSED NOTABUG QA Contact: IDM QE LIST <seceng-idm-qe-list>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 7.0CC: jgalipea, mkosek
Target Milestone: rc   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2012-06-26 15:54:16 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 736854    

Description Dmitri Pal 2011-12-10 04:13:35 UTC
ipalib/dn.py was recently introduced to improve handing of LDAP DN's by introducing the DN, RDN & AVA object classes. The majority of the code still utilizes simple string handling to define and manipulate dn's. There are known problems with using simple string handling with dn's the new classes are meant to correct. We need to go through the code and start to use the new classes.

An excellent starting point would be to redefine the LDAP containers defined in constants.py and basedn to be DN objects instead of strings.

Then the entire tree should be searched for each reference to the modified constant and verify the dn's are being used properly. This will likely mean assuring DN object operators are being utilized instead of raw string handling.


Upstream ticket:
https://fedorahosted.org/freeipa/ticket/1392

Comment 1 Jenny Severance 2011-12-12 16:00:53 UTC
Please add steps to reproduce this issue .. thanks

Comment 2 Rob Crittenden 2011-12-13 14:52:27 UTC
Much of this DN work is behind the scenes optimization but currently handling could be problematic if non-ascii characters are used in a role, permission or privilege name, for example.

Comment 3 Rob Crittenden 2011-12-14 19:11:02 UTC
Some entries use a uuid in the DN instead of the name so will not be affected. This includes HBAC rules, Sudo rules, netgroups and hostgroups.

Comment 4 Dmitri Pal 2012-06-26 15:54:16 UTC
This is an upstream improvement.