[arch-commits] Commit in sudo/trunk (2 files)
Evangelos Foutras
foutrelis at nymeria.archlinux.org
Wed Jan 15 01:52:57 UTC 2014
Date: Wednesday, January 15, 2014 @ 02:52:57
Author: foutrelis
Revision: 204056
upgpkg: sudo 1.8.9.p3-2
Fix FS#38511: [sudo] consumes entire CPU core while waiting on child process
Added:
sudo/trunk/sudo-1.8.9p3-remove-backchannel-event-if-we-get-eof.patch
Modified:
sudo/trunk/PKGBUILD
-----------------------------------------------------------+
PKGBUILD | 10 +++
sudo-1.8.9p3-remove-backchannel-event-if-we-get-eof.patch | 35 ++++++++++++
2 files changed, 44 insertions(+), 1 deletion(-)
Modified: PKGBUILD
===================================================================
--- PKGBUILD 2014-01-15 00:06:33 UTC (rev 204055)
+++ PKGBUILD 2014-01-15 01:52:57 UTC (rev 204056)
@@ -6,7 +6,7 @@
pkgname=sudo
_sudover=1.8.9p3
pkgver=${_sudover/p/.p}
-pkgrel=1
+pkgrel=2
pkgdesc="Give certain users the ability to run some commands as root"
arch=('i686' 'x86_64')
url="http://www.sudo.ws/sudo/"
@@ -15,11 +15,19 @@
depends=('glibc' 'pam')
backup=('etc/sudoers' 'etc/pam.d/sudo')
source=(http://www.sudo.ws/sudo/dist/$pkgname-$_sudover.tar.gz{,.sig}
+ sudo-1.8.9p3-remove-backchannel-event-if-we-get-eof.patch
sudo.pam)
sha256sums=('a2b1f0ec8aeb929c8430b1514cb53e2c2f882ea26cbb43426883d1cb6d22c5b7'
'SKIP'
+ '79d86c92723519fed1fa3db60ebc66b400435237d82e9bfdc899db4550c259b5'
'e7de79d2c73f2b32b20a8e797e54777a2bf19788ec03e48decd6c15cd93718ae')
+prepare() {
+ cd "$srcdir/$pkgname-$_sudover"
+
+ patch -Np1 -i "$srcdir/sudo-1.8.9p3-remove-backchannel-event-if-we-get-eof.patch"
+}
+
build() {
cd "$srcdir/$pkgname-$_sudover"
Added: sudo-1.8.9p3-remove-backchannel-event-if-we-get-eof.patch
===================================================================
--- sudo-1.8.9p3-remove-backchannel-event-if-we-get-eof.patch (rev 0)
+++ sudo-1.8.9p3-remove-backchannel-event-if-we-get-eof.patch 2014-01-15 01:52:57 UTC (rev 204056)
@@ -0,0 +1,35 @@
+
+# HG changeset patch
+# User Todd C. Miller <Todd.Miller at courtesan.com>
+# Date 1389722096 25200
+# Node ID a204b69d91f786444899ce3fc95ed535b6e32d33
+# Parent 987087ce465828da121b9d67412f42feaea06d56
+If not logging I/O we may get EOF when the command is executed and
+the other end of the backchannel is closed. Just remove the
+backchannel event in this case or we will continue to receive
+the event. Bug #631
+
+diff -r 987087ce4658 -r a204b69d91f7 src/exec.c
+--- a/src/exec.c Tue Jan 14 09:26:14 2014 -0700
++++ b/src/exec.c Tue Jan 14 10:54:56 2014 -0700
+@@ -230,11 +230,14 @@
+ /* Short read or EOF. */
+ sudo_debug_printf(SUDO_DEBUG_ERROR,
+ "failed to read child status: %s", n ? "short read" : "EOF");
+- /*
+- * If not logging I/O we may get EOF when the command is
+- * executed and sv is closed. It is safe to ignore this.
+- */
+- if (ec->log_io || n != 0) {
++ if (!ec->log_io && n == 0) {
++ /*
++ * If not logging I/O we may get EOF when the command is
++ * executed and the other end of the backchannel is closed.
++ * Just remove the event in this case.
++ */
++ (void)sudo_ev_del(ec->evbase, backchannel_event);
++ } else {
+ /* XXX - need new CMD_ type for monitor errors. */
+ errno = n ? EIO : ECONNRESET;
+ ec->cstat->type = CMD_ERRNO;
+
More information about the arch-commits
mailing list