Bug 592 - winbind_ads.c does not escape special chars in dns
Summary: winbind_ads.c does not escape special chars in dns
Alias: None
Product: Samba 3.0
Classification: Unclassified
Component: winbind (show other bugs)
Version: 3.0.0
Hardware: All Linux
: P3 normal
Target Milestone: none
Assignee: Samba Bugzilla Account
QA Contact:
: 598 (view as bug list)
Depends on:
Reported: 2003-10-09 15:59 UTC by Guenther Deschner
Modified: 2005-11-14 09:31 UTC (History)
1 user (show)

See Also:

proposed one-liner (619 bytes, patch)
2003-10-09 16:00 UTC, Guenther Deschner
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Guenther Deschner 2003-10-09 15:59:42 UTC
when winbind in ads-mode queries for a distinguished name containing e.g. the
characters "\,", winbind does not use the (existing) character-escaping to send
a valid search-query to ads.

from the level 10 logs:
[2003/10/09 09:25:23, 3] libads/ldap.c:ads_do_paged_search(451)
Foo,CN=Users,DC=my,DC=ads-domain,DC=de)) -> Bad 
search filter
[2003/10/09 09:25:23, 3] libads/ldap_utils.c:ads_do_search_retry(60)
  Reopening ads connection to realm 'MY.ADS-DOMAIN.DE' after error Bad search filter

in that particular case "\," just should have been escaped to "\\," 

since the escaping is already in place in the same function, why not use it?
Comment 1 Guenther Deschner 2003-10-09 16:00:52 UTC
Created attachment 192 [details]
proposed one-liner
Comment 2 Gerald (Jerry) Carter 2003-10-13 06:59:38 UTC
*** Bug 598 has been marked as a duplicate of this bug. ***
Comment 3 Gerald (Jerry) Carter 2003-10-13 07:04:25 UTC
Patch aopplied.  Thanks Guenther.
Comment 4 Gerald (Jerry) Carter 2005-08-24 10:27:43 UTC
sorry for the same, cleaning up the database to prevent unecessary reopens of bugs.
Comment 5 Gerald (Jerry) Carter 2005-11-14 09:31:04 UTC
database cleanup