[Date Prev][Date Next] [Chronological] [Thread] [Top]

LDAP_ROOT_DSE with OpenLdap 2.2



Hello,

I'm using openldap for authentification, until now in version 2.1.30,
to get this working I had to apply this patch:

*** servers/slapd/result.c.orig	Mon Dec 11 16:56:48 2000
--- servers/slapd/result.c	Mon Dec 11 16:58:24 2000
***************
*** 628,634 ****
  			/* all addrs request, skip operational attributes */
  			if( is_at_operational( desc->ad_type ) )
  			{
! 				continue;
  			}
  
  		} else {
--- 628,636 ----
  			/* all addrs request, skip operational attributes */
  			if( is_at_operational( desc->ad_type ) )
  			{
! 				if (strcasecmp( e->e_dn, LDAP_ROOT_DSE )) {
! 					continue;
! 				}
  			}
  
  		} else {
***************
*** 700,706 ****
  		if ( attrs == NULL ) {
  			/* all addrs request, skip operational attributes */
  			if( is_at_operational( desc->ad_type ) ) {
! 				continue;
  			}
  
  		} else {
--- 702,711 ----
  		if ( attrs == NULL ) {
  			/* all addrs request, skip operational attributes */
  			if( is_at_operational( desc->ad_type ) ) {
! 				/* Hack for solaris */
! 				if (strcasecmp( e->e_dn, LDAP_ROOT_DSE )) {
! 					continue;
! 				}
  			}
  
  		} else {


with this I was able to use the openldap server for the user
authentification on solaris9 boxes, but with openldap 2.2 it doesn't
work anymore, I changed the patch so that i thought it should work:

--- orig/openldap-2.2.23/servers/slapd/result.c 2005-01-20 18:01:09.000000000 +0100
+++ openldap-2.2.23/servers/slapd/result.c      2005-03-04 01:14:30.000000000 +0100
@@ -909,7 +909,9 @@
                if ( rs->sr_attrs == NULL ) {
                        /* all attrs request, skip operational attributes */
                        if( is_at_operational( desc->ad_type ) ) {
+                               if (strcasecmp( rs->sr_entry->e_dn, LDAP_ROOT_DSE )) {
                                continue;
+                               }
                        }

                } else {
@@ -1109,7 +1111,9 @@
                if ( rs->sr_attrs == NULL ) {
                        /* all attrs request, skip operational attributes */
                        if( is_at_operational( desc->ad_type ) ) {
+                               if (strcasecmp( rs->sr_entry->e_dn, LDAP_ROOT_DSE )) {
                                continue;
+                               }
                        }

                } else {


What's my error or is there another possibility to get it working like
2.1 with the patch from above?
(the configuration and the database stayed of course the same with my
2.2 experiments)


Regards
Christian Leber

-- 
http://www.nosoftwarepatents.com