Skip to contentSkip to conversation

build breaks with krb5 < 1.7 in the 5.4 release

PATCH Lars Müller 2 participants 2 messages Apr 19, 2012 1 message not in the archive

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

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

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

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

configure.ac +3 -0
Index: 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"])
cifs.upcall.c +8 -0
Index: 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",

A message that is not in the archive (sent off-list or not yet received): [email protected]

#2 lore raw

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Quoted 6 lines · On Thu, 19 Apr 2012 20:00:07 +0200 Lars Müller <[email protected]> wrote:

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

Quoted 7 lines

The declaration of krb5_auth_con_set_req_cksumtype is missing.

The attached patch fixes this issue.

Cheers,

Lars

Looks good. I'll commit in the next few days if no one objects.

Thanks!
- --
Jeff Layton <[email protected]>
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.18 (GNU/Linux)

iQIcBAEBAgAGBQJPkFOFAAoJEAAOaEEZVoIV9UEP/R84hFUOAwNxB/UywJuliryv 6ZcSIyjdaqlewZ55x3DRjExdIVbnVoo/hsKcGg9ma78s4dg4fY1hniK9zG5iTACX w1zJQTk+uq5dlqj3H1kKNhV+FF7zCqfzTOHJdpgzcEzxzfIKTjomZIPvSN0jwqTL UY/tuy8EeQxTwqh0WKE14JmIOk48RSFc+Epvu3/CJ6l/pwQ7KvDHax74O0yweo5j dhWDI6/eC8DKVsgL6nzJk+xjzgvXYJx5/7TQ8z4x4hIgwb+Mn3k/hygr50nzSYDe nflhZDVXuo2NoXffI1wWp3Ov/92NZaYfHzmdgzx8q6s3mqRkoWJrV4rVX0SaUgbw qnpnKnSSv3MidD3upWq+frHMApXRt2BRSwaL9oZR/BZbQ1ZC0eTXlXVE2CsrzPFR 5Q1X4vuqrsEGrDWUsVw8xZUqRj/q0CRDGK8CrIx83ck+yRDhPsoyfUqVczQloolq fRnd2nY/+bm2qF4PscUQv4IdRCIdxGC/fsWTn6GDrhHwLabXKLAjrYwJnshr0eGB BHyhUAbgAKojnrO2F/LSzud+fqX8djnY3cSwRxfDIv0tQ6/3xSQTyAC65V7FlcTG KihNYevJMMrsBOr/UVCCmKLfn2f4TB9PYeDD6QMPcJsPu0NAnKL76t5D+6ZOYgYw P2ho2wPVcl0goWrqxt8M
=2Yd9
-----END PGP SIGNATURE-----