r11242: use LDAP bitwise machting rule when searching for groups in ADS.
authorGünther Deschner <gd@samba.org>
Fri, 21 Oct 2005 12:50:39 +0000 (12:50 +0000)
committerGerald (Jerry) Carter <jerry@samba.org>
Wed, 10 Oct 2007 16:05:09 +0000 (11:05 -0500)
commit0698148b44aeb471137b2f516f09fb9653085511
tree883b9c1c4ee307010d90ebb6a1b185bb84eed843
parentcd310c19cefddc799ec5f8b374bc9c5ea9dec5f1
r11242: use LDAP bitwise machting rule when searching for groups in ADS.

This avoids that each time a full-group-dump is requested from ADS; the
bitwise match allows to only query those groups we are interested in.

The ADS LDAP server changed to RFC compliant behaviour when decoding the ldap
filter with extensible match in the latest SPs (fixes). From the patch:

/* Workaround ADS LDAP bug present in MS W2K3 SP0 and W2K SP4 w/o
  * rollup-fixes:
  *
  * According to Section 5.1(4) of RFC 2251 if a value of a type is it's
  * default value, it MUST be absent. In case of extensible matching the
  * "dnattr" boolean defaults to FALSE and so it must be only be present
  * when set to TRUE.
  *
  * When it is set to FALSE and the OpenLDAP lib (correctly) encodes a
  * filter using bitwise matching rule then a buggy AD fails to decode
  * the extensible match. As a workaround set it to TRUE and thereby add
  * the dnAttributes "dn" field to cope with those older AD versions.
  * It should not harm and won't put any additional load on the AD since
  * none of the dn components have a bitmask-attribute.
  *
  * Thanks to Ralf Haferkamp for input and testing */

Guenther
(This used to be commit db38ed6be607d08515920d46fb8a12f8cb4ddd6e)
source3/include/ads.h
source3/nsswitch/winbindd_ads.c