All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Lars Müller" <lmuelle-IBi9RG/b67k@public.gmane.org>
To: linux-cifs-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
Subject: build breaks with krb5 < 1.7 in the 5.4 release
Date: Thu, 19 Apr 2012 20:00:07 +0200	[thread overview]
Message-ID: <20120419180006.GS12994@hip.fritz.box> (raw)


[-- Attachment #1.1: Type: text/plain, Size: 439 bytes --]

Hi linux-cifs,

products coming with MIT krb5 < 1.7 (like SUSE Linux Enterprise 11 SP 1
or SP 2) suffer from the same issue as described by
https://bugzilla.samba.org/show_bug.cgi?id=6918

The declaration of krb5_auth_con_set_req_cksumtype is missing.

The attached patch fixes this issue.

Cheers,

Lars
-- 
Lars Müller [ˈlaː(r)z ˈmʏlɐ]
Samba Team + SUSE Labs
SUSE Linux, Maxfeldstraße 5, 90409 Nürnberg, Germany

[-- Attachment #1.2: krb5_auth_con_set_req_cksumtype-implicit-declaration.diff --]
[-- Type: text/x-patch, Size: 1526 bytes --]

Author: Lars Mueller <lmuelle-IBi9RG/b67k@public.gmane.org>
Subject: cifs-utils build breaks with krb5 < 1.7
Bugzilla: na
Inspiration: https://bugzilla.samba.org/show_bug.cgi?id=6918

Index: cifs-utils-5.4/configure.ac
===================================================================
--- cifs-utils-5.4.orig/configure.ac
+++ cifs-utils-5.4/configure.ac
@@ -178,6 +178,9 @@ if test $enable_cifsupcall != "no"; then
 	AC_CHECK_FUNCS([krb5_auth_con_setaddrs krb5_auth_con_set_req_cksumtype])
 fi
 
+# MIT krb5 < 1.7 does not have this declaration but does have the symbol
+AC_CHECK_DECLS(krb5_auth_con_set_req_cksumtype, [], [], [#include <krb5.h>])
+
 LIBS=$cu_saved_libs
 
 AM_CONDITIONAL(CONFIG_CIFSUPCALL, [test "$enable_cifsupcall" != "no"])
Index: cifs-utils-5.4/cifs.upcall.c
===================================================================
--- cifs-utils-5.4.orig/cifs.upcall.c
+++ cifs-utils-5.4/cifs.upcall.c
@@ -415,6 +415,14 @@ cifs_krb5_get_req(const char *host, cons
 	 */
 	in_data.data = discard_const_p(char, gss_cksum);
 	in_data.length = 24;
+
+	/* MIT krb5 < 1.7 is missing the prototype, but still has the symbol */
+#if !HAVE_DECL_KRB5_AUTH_CON_SET_REQ_CKSUMTYPE
+	krb5_error_code krb5_auth_con_set_req_cksumtype(
+		krb5_context      context,
+		krb5_auth_context auth_context,
+		krb5_cksumtype    cksumtype);
+#endif
 	ret = krb5_auth_con_set_req_cksumtype(context, auth_context, 0x8003);
 	if (ret) {
 		syslog(LOG_DEBUG, "%s: unable to set 0x8003 checksum",

[-- Attachment #2: Type: application/pgp-signature, Size: 190 bytes --]

             reply	other threads:[~2012-04-19 18:00 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-04-19 18:00 Lars Müller [this message]
     [not found] ` <20120419180006.GS12994-aSaWmTCphX8QgCKCZH8Z8g@public.gmane.org>
2012-04-19 18:03   ` build breaks with krb5 < 1.7 in the 5.4 release Jeff Layton

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20120419180006.GS12994@hip.fritz.box \
    --to=lmuelle-ibi9rg/b67k@public.gmane.org \
    --cc=linux-cifs-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.