components/samba/samba36/patches/MITkrb5-Solaris.patch
changeset 4463 0f8d88e8430f
parent 4433 d35242d8330c
equal deleted inserted replaced
4462:f6427a1e4367 4463:0f8d88e8430f
       
     1 Source: Home brewed
       
     2 Fixes issues with differences of Solaris krb5 and MIT krb5
       
     3 
       
     4 --- a/source3/configure.in	Mon Jan 18 12:38:09 2010
       
     5 +++ b/source3/configure.in	Sat Mar 13 19:19:27 2010
       
     6 @@ -3282,6 +3360,22 @@
       
     7      fi
       
     8    fi
       
     9  
       
    10 +  if test x$FOUND_KRB5 = x"no"; then
       
    11 +    #################################################
       
    12 +    # see if this box has Solaris MIT kerberos implementation
       
    13 +    AC_MSG_CHECKING(for Solaris MIT kerberos)
       
    14 +    if test -x "$KRB5CONFIG" && $KRB5CONFIG --version | grep -s Solaris | grep -s MIT > /dev/null ; then
       
    15 +	FOUND_KRB5=yes
       
    16 +	KRB5_LIBS="`$KRB5CONFIG --libs | sed s/-lkrb5//`"
       
    17 +	KRB5_LDFLAGS="-lkrb5 -lgss"
       
    18 +	KRB5_CFLAGS="`$KRB5CONFIG --cflags`"
       
    19 +	KRB5_CPPFLAGS="`$KRB5CONFIG --cflags`"
       
    20 +	AC_MSG_RESULT(yes)
       
    21 +    else
       
    22 +      AC_MSG_RESULT(${KRB5CONFIG_VER_S})
       
    23 +    fi
       
    24 +  fi
       
    25 +
       
    26    ac_save_CFLAGS=$CFLAGS
       
    27    ac_save_CPPFLAGS=$CPPFLAGS
       
    28    ac_save_LDFLAGS=$LDFLAGS
       
    29 #
       
    30 --- a/source3/libsmb/clikrb5.c	2010-11-16 06:25:10.974288877 -0800
       
    31 +++ b/source3/libsmb/clikrb5.c	2010-11-16 06:44:09.764248834 -0800
       
    32 @@ -912,8 +912,17 @@
       
    33  	}
       
    34  #endif
       
    35  
       
    36 -	retval = krb5_mk_req_extended(context, auth_context, ap_req_options, 
       
    37 -				      &in_data, credsp, outbuf);
       
    38 +	retval = krb5_mk_req_extended(context, auth_context, ap_req_options,
       
    39 +#if defined(HAVE_SHORT_KRB5_MK_ERROR_INTERFACE)
       
    40 +				      /* MIT implementation does not use the
       
    41 +				       * 4-th. parameter (krb5_data *) by the
       
    42 +				       * same way as Heimdal. Set to NULL .
       
    43 +				       */
       
    44 +				      NULL
       
    45 +#else
       
    46 +				      &in_data
       
    47 +#endif
       
    48 +				      , credsp, outbuf);
       
    49  	if (retval) {
       
    50  		DEBUG(1,("ads_krb5_mk_req: krb5_mk_req_extended failed (%s)\n", 
       
    51  			 error_message(retval)));