fold in a fix from upstream
authorBdale Garbee <bdale@gag.com>
Fri, 16 Sep 2011 15:40:30 +0000 (09:40 -0600)
committerBdale Garbee <bdale@gag.com>
Fri, 16 Sep 2011 15:40:30 +0000 (09:40 -0600)
debian/changelog
debian/patches/series
debian/patches/upstream-sigbus-fix [new file with mode: 0644]

index f6333bcf97a8c3746d72fec8a95fa002d91a8713..5032595997b4904e3233806aa3d48d25aceb7d97 100644 (file)
@@ -1,3 +1,9 @@
+sudo (1.8.2-2) UNRELEASED; urgency=low
+
+  * patch from upstream for SIGBUS on sparc64, closes: #640304
+
+ -- Bdale Garbee <bdale@gag.com>  Fri, 16 Sep 2011 09:40:03 -0600
+
 sudo (1.8.2-1) unstable; urgency=low
 
   * new upstream version, closes: #637449, #621830
index 5e1f561771fda7cd2b9842f5e461c94ed29d302d..4e3aa5b4cc9e9cec21c18d7c309865b328c69b81 100644 (file)
@@ -1,2 +1,3 @@
 typo-in-classic-insults.diff
 paths-in-samples.diff
+upstream-sigbus-fix
diff --git a/debian/patches/upstream-sigbus-fix b/debian/patches/upstream-sigbus-fix
new file mode 100644 (file)
index 0000000..7e4d0b4
--- /dev/null
@@ -0,0 +1,37 @@
+From: Todd C. Miller <Todd.Miller@courtesan.com>
+Subject: Bug#640304: sudo received signal SIGBUS, Bus error
+Date: Fri, 16 Sep 2011 08:48:33 -0400
+
+ A bus error is usually an alignment problem.  I can see how this
+ could happen on 64-bit machines with strict alignment requirements
+ (such as sparc64).
+
+ The following patch fixes the problem for me.  It will be part of
+ a sudo 1.8.2p1 release.
+
+  - todd
+
+diff -r d161b82321da plugins/sudoers/pwutil.c
+--- a/plugins/sudoers/pwutil.c Thu Sep 15 19:56:34 2011 -0400
++++ b/plugins/sudoers/pwutil.c Fri Sep 16 08:19:18 2011 -0400
+@@ -508,16 +533,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);
+