Bug 15248 - libldb doesn't work with dotted/lotless i languages (example: tr_TR.UTF-8)
Summary: libldb doesn't work with dotted/lotless i languages (example: tr_TR.UTF-8)
Status: CLOSED FIXED
Alias: None
Product: Samba 4.1 and newer
Classification: Unclassified
Component: AD: LDB/DSDB/SAMDB (show other bugs)
Version: 4.16.0
Hardware: All All
: P5 normal (vote)
Target Milestone: ---
Assignee: Andreas Schneider
QA Contact: Samba QA Contact
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2022-11-18 07:56 UTC by Andreas Schneider
Modified: 2024-04-16 23:51 UTC (History)
2 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Andreas Schneider 2022-11-18 07:56:19 UTC
This can be easily reproduced with:

  LC_ALL=tr_TR.UTF-8 make test


If we are searching for DNs, we should enforce the use of the POSIX locale. Only for values we should use the locale set for the system.


Patch will follow.
Comment 1 Björn Jacke 2022-11-19 19:29:25 UTC
have in mind that switching locales (to POSIX or whatever) is _not_ the right approach. You should use ASCII aware functions instead of locale aware string functions. toupper() for example is not usable as it make , Samba has strupper_m() instead, which is ASCII proof.
Comment 2 Andreas Schneider 2022-11-22 09:27:30 UTC
Björn, please be more precise what you want. See my comments in the merge request or create one with code you prefer ...
Comment 3 Samba QA Contact 2022-12-23 14:18:04 UTC
This bug was referenced in samba master:

14751e91a5218c168f50e0bd998593f425f7f4c0
c8e3873e7e6677720c74882bcc63e72fb03e98cc
78ca66a1a54ede649ca9726e81b420993234b1cf
a8f6fa03ef68f086e46539af4d4594b35e638e37
24275cd800b05538ae32e29cbe74529076184954
0c931fb301c5137668db671a6d861c5b5769aa18