Package: heimdal
Version: 1.7~git20160703+dfsg-1
Followup-For: Bug #822749
User: ubuntu-de...@lists.ubuntu.com
Usertags: origin-ubuntu zesty ubuntu-patch
Dear Maintainer,
In Ubuntu, the attached patch was applied to achieve the following:
* debian/patches/use_off_t_for_constants.patch: Use off_t in for
constants used in iprop log seeks. Thanks to Nicolas Williams
. Closes: #822749, LP: #1629055.
Thanks for considering the patch.
diff -Nru heimdal-1.7~git20160703+dfsg/debian/patches/series
heimdal-1.7~git20160703+dfsg/debian/patches/series
--- heimdal-1.7~git20160703+dfsg/debian/patches/series 2016-07-03
07:28:39.0 -0700
+++ heimdal-1.7~git20160703+dfsg/debian/patches/series 2016-11-09
17:02:46.0 -0800
@@ -16,3 +16,4 @@
061_disable_test_plugin
062_disable_test_iprop
parallel-build
+use_off_t_for_constants.patch
diff -Nru
heimdal-1.7~git20160703+dfsg/debian/patches/use_off_t_for_constants.patch
heimdal-1.7~git20160703+dfsg/debian/patches/use_off_t_for_constants.patch
--- heimdal-1.7~git20160703+dfsg/debian/patches/use_off_t_for_constants.patch
1969-12-31 16:00:00.0 -0800
+++ heimdal-1.7~git20160703+dfsg/debian/patches/use_off_t_for_constants.patch
2016-11-09 17:05:47.0 -0800
@@ -0,0 +1,35 @@
+Description: Use off_t in for constants used in iprop log seeks
+ On 32-bit architectures with _FILE_OFFSET_BITS=64,
+ sizeof(off_t) > sizeof(size_t) .
+ .
+ LOG_HEADER_SZ was #define'd as an expression of type size_t, so in
+ order to get the sign extension right we need -(off_t)LOG_HEADER_SZ
+ instead of (off_t)(-LOG_HEADER_SZ). However, we can just define the
+ *_SZ macros to cast to off_t, then we don't need to worry about
+ negation.
+Author: Nicolas Williams
+Origin: upstream,
https://github.com/heimdal/heimdal/commit/7c8b66d76b562912c09c0955a53da2f26afbc8f7
+Bug: https://github.com/heimdal/heimdal/issues/175
+Bug-Debian: https://bugs.debian.org/822749
+Bug-Ubuntu: https://launchpad.net/bugs/1629055
+Last-Update: 2016-11-10
+
+--- heimdal-1.7~git20160703+dfsg.orig/lib/kadm5/log.c
heimdal-1.7~git20160703+dfsg/lib/kadm5/log.c
+@@ -174,11 +174,11 @@ RCSID("$Id$");
+ * will deadlock with ipropd-slave -- don't do that.
+ */
+
+-#define LOG_HEADER_SZ (sizeof(uint32_t) * 4)
+-#define LOG_TRAILER_SZ (sizeof(uint32_t) * 2)
+-#define LOG_WRAPPER_SZ (LOG_HEADER_SZ + LOG_TRAILER_SZ)
+-#define LOG_UBER_LEN(sizeof(uint64_t) + sizeof(uint32_t) * 2)
+-#define LOG_UBER_SZ (LOG_WRAPPER_SZ + LOG_UBER_LEN)
++#define LOG_HEADER_SZ ((off_t)(sizeof(uint32_t) * 4))
++#define LOG_TRAILER_SZ ((off_t)(sizeof(uint32_t) * 2))
++#define LOG_WRAPPER_SZ ((off_t)(LOG_HEADER_SZ + LOG_TRAILER_SZ))
++#define LOG_UBER_LEN((off_t)(sizeof(uint64_t) + sizeof(uint32_t) * 2))
++#define LOG_UBER_SZ ((off_t)(LOG_WRAPPER_SZ + LOG_UBER_LEN))
+
+ #define LOG_NOPEEK 0
+ #define LOG_DOPEEK 1
-- System Information:
Debian Release: stretch/sid
APT prefers yakkety-updates
APT policy: (500, 'yakkety-updates'), (500, 'yakkety-security'), (500,
'yakkety'), (400, 'yakkety-proposed')
Architecture: amd64 (x86_64)
Foreign Architectures: i386
Kernel: Linux 4.8.0-26-generic (SMP w/4 CPU cores)
Locale: LANG=en_CA.UTF-8, LC_CTYPE=en_CA.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash
Init: systemd (via /run/systemd/system)
--
Nishanth Aravamudan
Ubuntu Server
Canonical Ltd