mirror of
https://github.com/samba-team/samba.git
synced 2024-12-24 21:34:56 +03:00
e9e6af5951
Fix escaping of DN components and filters around the code
Add some notes to commandline help messages about how to pass DNs
revert jra's "concistency" commit to nsswitch/winbindd_ads.c, as it was
incorrect.
The 2 functions use DNs in different ways.
- lookup_usergroups_member() uses the DN in a search filter,
and must use the filter escaping function to escape it
Escaping filters that include escaped DNs ("\," becomes "\5c,") is the
correct way to do it (tested against W2k3).
- lookup_usergroups_memberof() instead uses the DN ultimately as a base dn.
Both functions do NOT need any DN escaping function as DNs can't be reliably
escaped when in a string form, intead each single RDN value must be escaped
separately.
DNs coming from other ldap calls (like ads_get_dn()), do not need escaping as
they come already escaped on the wire and passed as is by the ldap libraries
DN filtering has been tested.
For example now it is possible to do something like:
'net ads add user joe#5' as now the '#' character is correctly escaped when
building the DN, previously such a call failed with Invalid DN Syntax.
Simo.
(This used to be commit
|
||
---|---|---|
.. | ||
load.c | ||
lpq_parse.c | ||
notify.c | ||
nt_printing.c | ||
pcap.c | ||
print_aix.c | ||
print_cups.c | ||
print_generic.c | ||
print_iprint.c | ||
print_svid.c | ||
print_test.c | ||
printfsp.c | ||
printing_db.c | ||
printing.c |