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

Re: LDAP_ROOT_DSE with OpenLdap 2.2



this looks right to me, attached is the patch that I use but at first
glance they appear the same. Note the line numbers are a bit off but
otherwise it applies cleanly.

GREG

On Fri, 2005-03-04 at 01:19 +0100, Christian Leber wrote:
> 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
> 
-- 
Greg Matthews
iTSS Wallingford        01491 692445
*** servers/slapd/result.c.orig	Thu Feb 27 12:52:50 2003
--- servers/slapd/result.c	Thu Feb 27 12:55:07 2003
***************
*** 879,885 ****
  		if ( attrs == NULL ) {
  			/* all attrs request, skip operational attributes */
  			if( is_at_operational( desc->ad_type ) ) {
! 				continue;
  			}
  
  		} else {
--- 879,888 ----
  		if ( 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 {
***************
*** 1074,1080 ****
  		if ( attrs == NULL ) {
  			/* all attrs request, skip operational attributes */
  			if( is_at_operational( desc->ad_type ) ) {
! 				continue;
  			}
  
  		} else {
--- 1077,1087 ----
  		if ( attrs == NULL ) {
  			/* all attrs request, skip operational attributes */
  			if( is_at_operational( desc->ad_type ) ) {
! 
! 				/* Hack for Solaris */
! 				if (strcasecmp( rs->sr_entry->e_dn, LDAP_ROOT_DSE )) {
! 					continue;
! 				}
  			}
  
  		} else {