Bug 342933

Summary: yast2-ldap-client lowercases LDAP object and attribute names
Product: [openSUSE] openSUSE 11.0 Reporter: Pavel Nemec <pnemec>
Component: YaST2Assignee: Jiří Suchomel <jsuchome>
Status: RESOLVED FEATURE QA Contact: Tomas Cech <tcech>
Severity: Enhancement    
Priority: P5 - None CC: jsrain, postadal, ralf
Version: Alpha 2   
Target Milestone: ---   
Hardware: Other   
OS: Other   
Whiteboard:
Found By: --- Services Priority:
Business Priority: Blocker: ---
Marketing QA Status: --- IT Deployment: ---

Description Pavel Nemec 2007-11-20 10:20:56 UTC
Ldap Browser use lowercase which is just wrong.
See attached picture.
name of obect is scDhcpExtern, but Browser show scdhcpextern

Jiri, if you are not right person for this bug, please reassign.
Comment 1 Jiří Suchomel 2007-11-20 10:31:53 UTC
Yes, YaST does lowecase all these object names. I don't remember exactly why it was done, I assume for better comparing, e.g. if an object that should be created doesn't already exists.

Why is it "just wrong"? You can't have both scDhcpExtern and scdhcpextern anyway, so why does it mattern? Ralf?
Comment 2 Ralf Haferkamp 2007-11-20 10:45:48 UTC
(In reply to comment #1 from Jiří­ Suchomel)
> Yes, YaST does lowecase all these object names. I don't remember exactly why > it was done, I assume for better comparing, e.g. if an object that should be
> created doesn't already exists.
> 
> Why is it "just wrong"? You can't have both scDhcpExtern and scdhcpextern
> anyway, so why does it mattern?
That's true in most case, yes. But I think it would be better to display the values in the capitalization in which they were created. As that is how they are stored in the directory itself. Is that possible?

For comparing and matching you would of course still need to normalize the strings.
Comment 3 Pavel Nemec 2007-11-20 11:00:03 UTC
> Why is it "just wrong"? You can't have both scDhcpExtern and scdhcpextern
> anyway, so why does it mattern? Ralf?
No when you creating new LDAP object you had to write exact name including case. If you see lowercase strings you will get very confused very soon.

Comment 4 Jiří Suchomel 2007-11-20 11:23:00 UTC
(In reply to comment #2 from Ralf Haferkamp)

> For comparing and matching you would of course still need to normalize the
> strings.

If I already have 2 strings, it is easy to do, of course. But I think (not checking the code, just the memory) that the reason for that was mainly in the searching: does LDAPConnection's search method ignore the case? Does it return the same result for scDhcpExtern and scdhcpextern?

Maybe it does, and the reason why I implemented it that way was different...
Comment 5 Ralf Haferkamp 2007-11-20 11:44:42 UTC
(In reply to comment #4 from Jiří­ Suchomel)
> (In reply to comment #2 from Ralf Haferkamp)
> 
> > For comparing and matching you would of course still need to normalize the
> > strings.
> 
> If I already have 2 strings, it is easy to do, of course. But I think (not
> checking the code, just the memory) that the reason for that was mainly in the
> searching: does LDAPConnection's search method ignore the case? Does it return
> the same result for scDhcpExtern and scdhcpextern?
The search method will work for sure, regardless of which capitalization you use. Probably some methods in LDAPAttributeList or LDAPAttribute don't handle it correctly (don't know without checking the code). But I'd consider that a bug in the C++ API.

> Maybe it does, and the reason why I implemented it that way was different...


Comment 6 Jiří Suchomel 2007-11-20 11:51:37 UTC
So, I should try to change it and test hardly.

Nothing for code10, though.