[104] in Kerberos-V5-bugs

home help back first fref pref prev next nref lref last post

walk_rtree.c

daemon@ATHENA.MIT.EDU (daemon@ATHENA.MIT.EDU)
Fri Feb 1 17:14:01 1991

Date: Fri, 1 Feb 91 17:03:22 EST
From: PAU@IBM.COM
To: krb5-testers@ATHENA.MIT.EDU

I think the function krb5_walk_realm_tree cannot function correctly
when the clent and server realms have no common components. A simple
test is use "ABC" and "DEF" as the client's and server's realms. Then
the function cannot generate krbtgt/DEF@ABC. The suggested changes are:



*** walk_rtree.c	Fri Feb 01 16:17:04 1991
--- new_walk_rtree.c	Fri Feb 01 16:32:34 1991
***************
*** 103,112 ****
  		com_sdot = prevscp = scp;
  	}
      }
!     if (nocommon && links == 3) {
! 	/* no components, and not the same */
! 	com_cdot = krb5_princ_realm(client)->data;
! 	com_sdot = krb5_princ_realm(server)->data;
      }

      if (!(rettree = (krb5_principal *)calloc(links+2,
--- 103,113 ----
  		com_sdot = prevscp = scp;
  	}
      }
!     if (nocommon) {
! 	if(com_cdot == krb5_princ_realm(client)->data + krb5_princ_realm(client)->length -1)
! 	   com_cdot = krb5_princ_realm(client)->data - 1 ;
! 	if(com_sdot == krb5_princ_realm(server)->data + krb5_princ_realm(server)->length -1)
! 	   com_sdot = krb5_princ_realm(server)->data - 1 ;
      }

      if (!(rettree = (krb5_principal *)calloc(links+2,

home help back first fref pref prev next nref lref last post