components/samba/samba36/patches/MITkrb5-Solaris.patch
author Mike Sullivan <Mike.Sullivan@Oracle.COM>
Wed, 10 Jun 2015 16:30:48 -0700
changeset 4463 0f8d88e8430f
parent 4433 components/samba/samba/samba36/patches/MITkrb5-Solaris.patch@d35242d8330c
permissions -rw-r--r--
18462092 Update to Samba 4. (fix samba36 build)

Source: Home brewed
Fixes issues with differences of Solaris krb5 and MIT krb5

--- a/source3/configure.in	Mon Jan 18 12:38:09 2010
+++ b/source3/configure.in	Sat Mar 13 19:19:27 2010
@@ -3282,6 +3360,22 @@
     fi
   fi
 
+  if test x$FOUND_KRB5 = x"no"; then
+    #################################################
+    # see if this box has Solaris MIT kerberos implementation
+    AC_MSG_CHECKING(for Solaris MIT kerberos)
+    if test -x "$KRB5CONFIG" && $KRB5CONFIG --version | grep -s Solaris | grep -s MIT > /dev/null ; then
+	FOUND_KRB5=yes
+	KRB5_LIBS="`$KRB5CONFIG --libs | sed s/-lkrb5//`"
+	KRB5_LDFLAGS="-lkrb5 -lgss"
+	KRB5_CFLAGS="`$KRB5CONFIG --cflags`"
+	KRB5_CPPFLAGS="`$KRB5CONFIG --cflags`"
+	AC_MSG_RESULT(yes)
+    else
+      AC_MSG_RESULT(${KRB5CONFIG_VER_S})
+    fi
+  fi
+
   ac_save_CFLAGS=$CFLAGS
   ac_save_CPPFLAGS=$CPPFLAGS
   ac_save_LDFLAGS=$LDFLAGS
#
--- a/source3/libsmb/clikrb5.c	2010-11-16 06:25:10.974288877 -0800
+++ b/source3/libsmb/clikrb5.c	2010-11-16 06:44:09.764248834 -0800
@@ -912,8 +912,17 @@
 	}
 #endif
 
-	retval = krb5_mk_req_extended(context, auth_context, ap_req_options, 
-				      &in_data, credsp, outbuf);
+	retval = krb5_mk_req_extended(context, auth_context, ap_req_options,
+#if defined(HAVE_SHORT_KRB5_MK_ERROR_INTERFACE)
+				      /* MIT implementation does not use the
+				       * 4-th. parameter (krb5_data *) by the
+				       * same way as Heimdal. Set to NULL .
+				       */
+				      NULL
+#else
+				      &in_data
+#endif
+				      , credsp, outbuf);
 	if (retval) {
 		DEBUG(1,("ads_krb5_mk_req: krb5_mk_req_extended failed (%s)\n", 
 			 error_message(retval)));