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