Fixed alignment issue on alpha found by armin76 (fix from upstream).
authorSergei Trofimovich <slyfox@gentoo.org>
Wed, 12 Oct 2011 18:50:26 +0000 (18:50 +0000)
committerSergei Trofimovich <slyfox@gentoo.org>
Wed, 12 Oct 2011 18:50:26 +0000 (18:50 +0000)
Package-Manager: portage-2.1.10.11/cvs/Linux x86_64

app-admin/sudo/ChangeLog
app-admin/sudo/Manifest
app-admin/sudo/files/sudo-1.8.2-fix-pwutil-alignment.patch [new file with mode: 0644]
app-admin/sudo/sudo-1.8.2-r1.ebuild [moved from app-admin/sudo/sudo-1.8.2.ebuild with 96% similarity]

index 5c6df64662159fd07405fbabfaceecbec6630421..2c4d418b38a6cebcf4e7245211b12d8275d3cf3b 100644 (file)
@@ -1,6 +1,12 @@
 # ChangeLog for app-admin/sudo
 # Copyright 1999-2011 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/app-admin/sudo/ChangeLog,v 1.281 2011/10/07 16:27:53 vapier Exp $
+# $Header: /var/cvsroot/gentoo-x86/app-admin/sudo/ChangeLog,v 1.282 2011/10/12 18:50:26 slyfox Exp $
+
+*sudo-1.8.2-r1 (12 Oct 2011)
+
+  12 Oct 2011; Sergei Trofimovich <slyfox@gentoo.org> -sudo-1.8.2.ebuild,
+  +sudo-1.8.2-r1.ebuild, +files/sudo-1.8.2-fix-pwutil-alignment.patch:
+  Fixed alignment issue on alpha found by armin76 (fix from upstream).
 
   07 Oct 2011; Mike Frysinger <vapier@gentoo.org> sudo-1.8.2.ebuild,
   +files/sudo-1.8.2-parallel-build.patch:
index 5fc20f6aaea6e66064ef933fcb47990c7d01252c..4f5c3cc728d2d497138e1b89df4dc92616460fc5 100644 (file)
@@ -1,6 +1,7 @@
 -----BEGIN PGP SIGNED MESSAGE-----
-Hash: SHA256
+Hash: SHA1
 
+AUX sudo-1.8.2-fix-pwutil-alignment.patch 1641 RMD160 d136752a7180bf46dfa24c522ad6ade3979e689c SHA1 36c518048ffc601d04b3edc4007528fd425328e7 SHA256 7922f150462214312ca00048b93aa99aac454e5a61cc92fbe6d57354694ca2ef
 AUX sudo-1.8.2-parallel-build.patch 517 RMD160 1fa308ce579f9c3e8d32b6155ee6e89044c2997e SHA1 8237b096164527704e865f95cd563b5d5aa01d22 SHA256 f21f4c60c8d9bbbf8ff372393e5d753a123021573dc4ace9665ff451dda9326c
 AUX sudo-skeychallengeargs.diff 567 RMD160 906ee43a7c2f21d1cf5130eac5c98ef0833154fd SHA1 b0efbedc72a1ed85c74ba10e343a68368e76c3e9 SHA256 dd2f4fdba26be6c3b4af15f3b6e18efa19375e1f9c579cdc2c76ee1adcce5e1d
 DIST sudo-1.7.4p5.tar.gz 966176 RMD160 24fcaa065f9efc229abcf2b70ec4faca03efa32d SHA1 bb9c9ff6ce6d4c70bdc546316442e7021ca754c2 SHA256 72e8e3545f314d342f178b0fee4b483e26d70ef132b081699be035da0f0acbba
@@ -8,13 +9,13 @@ DIST sudo-1.8.1p2.tar.gz 1238804 RMD160 165029d462e737c885b1d32accb9b2b19411a0fb
 DIST sudo-1.8.2.tar.gz 1465051 RMD160 daebd7f67fff6429c3cb85260e9b11f0c3e28e3c SHA1 6a9400ba3e40394fd9c913219e3b6bb102bb3906 SHA256 37fe6ee670329bc45937fbe402e847f80b3a0a1c8fc9a66487e92b4b810152b0
 EBUILD sudo-1.7.4_p5.ebuild 7202 RMD160 6a25c3582d4a4765b58851e769ea13b06a90fd30 SHA1 6c0d870bc05e758f40f1028192a77836ff5a50ba SHA256 e5142ec5ea32a80daca760bf8413828bfba8aa3c54e9f58eed326da4661ebcb2
 EBUILD sudo-1.8.1_p2.ebuild 5052 RMD160 830050dd4b7d2aea5b12fcfa4c659400e00b95ab SHA1 18ce6dfc5d645f0a5a5968ae344e9b6ec33efac8 SHA256 6485402e94a6229f4f89980b10b927150372040dc24e295cbafb8cca969aa305
-EBUILD sudo-1.8.2.ebuild 5151 RMD160 236cdf8401b3a57a0f7d5f3e7132c6884e2f79a7 SHA1 7ee08c6314eef505c50551f4eaf4b54fc71a3aa0 SHA256 5298c11583f35b5e12d6be6fdcf8efc5dad477ba6641eec7e4b18994216346f6
-MISC ChangeLog 41218 RMD160 e4d2aa090634f7950c9c7fcbd68db2f07f0e606c SHA1 c6452667cc329a66040721ad6a4d9cc7ab470cb6 SHA256 b16d76c163f0348ee0771382806e48dc46d56b6182de03d0b0794d28158747ad
+EBUILD sudo-1.8.2-r1.ebuild 5208 RMD160 b6dee6dac8d10b6afd9d4419fedf5693b2592335 SHA1 45826e9a6478ff9c0a2c9c0a6f4bc8c31258eed4 SHA256 2f3fc06da841356c8524c48c388d0b181ae3edaeb6c8448cca2cd790df7ff544
+MISC ChangeLog 41465 RMD160 161d21e47ec82ed9b875770f949cabacfa8d4854 SHA1 deca00f0c10e11c2570e5d996de3f23f0bf17e7a SHA256 6efcbb5583601d9740a43a899cd9555726b1e61d38d2759150596e0e9f9a42d9
 MISC metadata.xml 560 RMD160 4e8bb9df73a4095b15b23d4ca31dea29b3f376d2 SHA1 a29e70672a1c039c4a97ee65e3e077ba0a01f26b SHA256 465d0ea14b7db3ecd0bad7c175f9e17003794145f5f59c4941f848960c91048a
 -----BEGIN PGP SIGNATURE-----
-Version: GnuPG v2.0.18 (GNU/Linux)
+Version: GnuPG v2.0.17 (GNU/Linux)
 
-iF4EAREIAAYFAk6PKJcACgkQaC/OocHi7JYvdQD/Q9sy/bb2vXajyy1ZoaBji4PZ
-CUu8MdbLaZrve0wAMA0BAILH+Jm/52ig+SOEzuL2CUAq2yJCKkQhZgZz/2pAKO1g
-=m7on
+iEYEARECAAYFAk6V4YAACgkQcaHudmEf86o55gCeKsdwqrkUp5JC7jxtu+HpDBuj
++RQAn0EVHIIgyvrXk54UWvJsJIkz0Ojm
+=7D+E
 -----END PGP SIGNATURE-----
diff --git a/app-admin/sudo/files/sudo-1.8.2-fix-pwutil-alignment.patch b/app-admin/sudo/files/sudo-1.8.2-fix-pwutil-alignment.patch
new file mode 100644 (file)
index 0000000..a25871c
--- /dev/null
@@ -0,0 +1,45 @@
+status: upstream
+
+> Program received signal SIGBUS, Bus error.
+> 0x0000020005ff64e0 in make_grlist_item (user=0x120037090 "root", gids=0x120037140, ngids=11) at ./pwutil.c:552
+> 552                 grlist->groups[ngroups++] = cp;
+
+Found by armin76.
+
+On alpha gid_t (grlist->gids) is 4-bytes long (and 4-bytes algned)
+while char** (grlist->groups) is 8-bytes aligned.
+Reorder to satisfy both alignmens.
+
+# HG changeset patch
+# User Todd C. Miller <Todd.Miller@courtesan.com>
+# Date 1316193166 14400
+# Branch 1.8
+# Node ID e877c89ae32fc1fa7c3933f9599761d43f79dc96
+# Parent  f31543c80b9857cf4d14048be0c3ff34a47201c4
+# Parent  c89508c73c46bca11b6b9d3980cd4a511efcde6f
+Fix a crash in make_grlist_item() on 64-bit machines with strict
+alignment.
+
+diff -r f31543c80b98 -r e877c89ae32f plugins/sudoers/pwutil.c
+--- a/plugins/sudoers/pwutil.c Fri Sep 16 13:12:34 2011 -0400
++++ b/plugins/sudoers/pwutil.c Fri Sep 16 13:12:46 2011 -0400
+@@ -508,16 +508,16 @@
+     /*
+      * Copy in group list and make pointers relative to space
+-     * at the end of the buffer.  Note that the gids array must come
++     * at the end of the buffer.  Note that the groups array must come
+      * immediately after struct group to guarantee proper alignment.
+      */
+     grlist = (struct group_list *)cp;
+     zero_bytes(grlist, sizeof(struct group_list));
+     cp += sizeof(struct group_list);
++    grlist->groups = (char **)cp;
++    cp += sizeof(char *) * ngids;
+     grlist->gids = (gid_t *)cp;
+     cp += sizeof(gid_t) * ngids;
+-    grlist->groups = (char **)cp;
+-    cp += sizeof(char *) * ngids;
+     /* Set key and datum. */
+     memcpy(cp, user, nsize);
similarity index 96%
rename from app-admin/sudo/sudo-1.8.2.ebuild
rename to app-admin/sudo/sudo-1.8.2-r1.ebuild
index 7d7407f470caa6a1f09b9e87d72e16f461a9c93e..d117f0d8331a42cbba61552e5617a76ac8900262 100644 (file)
@@ -1,6 +1,6 @@
 # Copyright 1999-2011 Gentoo Foundation
 # Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/app-admin/sudo/sudo-1.8.2.ebuild,v 1.4 2011/10/07 16:27:53 vapier Exp $
+# $Header: /var/cvsroot/gentoo-x86/app-admin/sudo/sudo-1.8.2-r1.ebuild,v 1.1 2011/10/12 18:50:26 slyfox Exp $
 
 EAPI=4
 
@@ -56,6 +56,7 @@ MAKEOPTS="${MAKEOPTS} SAMPLES="
 
 src_prepare() {
        epatch "${FILESDIR}"/${P}-parallel-build.patch
+       epatch "${FILESDIR}"/${P}-fix-pwutil-alignment.patch
        elibtoolize
 }