From owner-freebsd-ports-bugs@FreeBSD.ORG Thu Dec 3 22:10:02 2009 Return-Path: Delivered-To: freebsd-ports-bugs@hub.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 0AC9B106566B for ; Thu, 3 Dec 2009 22:10:02 +0000 (UTC) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:4f8:fff6::28]) by mx1.freebsd.org (Postfix) with ESMTP id DA5DF8FC14 for ; Thu, 3 Dec 2009 22:10:01 +0000 (UTC) Received: from freefall.freebsd.org (localhost [127.0.0.1]) by freefall.freebsd.org (8.14.3/8.14.3) with ESMTP id nB3MA1tX030129 for ; Thu, 3 Dec 2009 22:10:01 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.14.3/8.14.3/Submit) id nB3MA1su030128; Thu, 3 Dec 2009 22:10:01 GMT (envelope-from gnats) Resent-Date: Thu, 3 Dec 2009 22:10:01 GMT Resent-Message-Id: <200912032210.nB3MA1su030128@freefall.freebsd.org> Resent-From: FreeBSD-gnats-submit@FreeBSD.org (GNATS Filer) Resent-To: freebsd-ports-bugs@FreeBSD.org Resent-Reply-To: FreeBSD-gnats-submit@FreeBSD.org, john hood , sandstorm-ni@sandstorm.net Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 3F950106568D for ; Thu, 3 Dec 2009 22:00:19 +0000 (UTC) (envelope-from nobody@FreeBSD.org) Received: from www.freebsd.org (www.freebsd.org [IPv6:2001:4f8:fff6::21]) by mx1.freebsd.org (Postfix) with ESMTP id 13EB28FC17 for ; Thu, 3 Dec 2009 22:00:19 +0000 (UTC) Received: from www.freebsd.org (localhost [127.0.0.1]) by www.freebsd.org (8.14.3/8.14.3) with ESMTP id nB3M0IGJ074012 for ; Thu, 3 Dec 2009 22:00:18 GMT (envelope-from nobody@www.freebsd.org) Received: (from nobody@localhost) by www.freebsd.org (8.14.3/8.14.3/Submit) id nB3M0IKF074011; Thu, 3 Dec 2009 22:00:18 GMT (envelope-from nobody) Message-Id: <200912032200.nB3M0IKF074011@www.freebsd.org> Date: Thu, 3 Dec 2009 22:00:18 GMT From: john hood , sandstorm-ni@sandstorm.net To: freebsd-gnats-submit@FreeBSD.org X-Send-Pr-Version: www-3.1 Cc: Subject: ports/141149: gksu port hangs, never displays stdout or exits [libgksu bug + patch] X-BeenThere: freebsd-ports-bugs@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Ports bug reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 03 Dec 2009 22:10:02 -0000 >Number: 141149 >Category: ports >Synopsis: gksu port hangs, never displays stdout or exits [libgksu bug + patch] >Confidential: no >Severity: non-critical >Priority: low >Responsible: freebsd-ports-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: sw-bug >Submitter-Id: current-users >Arrival-Date: Thu Dec 03 22:10:01 UTC 2009 >Closed-Date: >Last-Modified: >Originator: john hood >Release: 8.0-RELEASE >Organization: Sandstorm Enterprises >Environment: FreeBSD lister.sandstorm.net 8.0-RELEASE FreeBSD 8.0-RELEASE #0: Tue Dec 1 20:49:34 EST 2009 jh@lister.sandstorm.net:/usr/src/sys/amd64/compile/NOCD amd64 >Description: our ancient 'gksu' port is broken-- it hangs after running the su/sudo command, and so output from the command never appears and gksu never exits. the problem is twofold-- a bug in libgksu, which calls tcdrain() on the master side of a pty; and a bug in kernel, which hangs rather than returning an error on the tty ioctl. patch against libgksu-1.3.8_3 attached. (and yes, i know, this version of gksu is not worth spending much time on.) kernel bug report coming soon. >How-To-Repeat: sudo pkg_add -r gksu gdb gksu id ^C >Fix: patch attached, tested against libgksu-1.3.8_3 on 7.1 and 8.0-RELEASE Patch attached with submission follows: --- files/patch-libgksu_gksu-context.c.orig 2006-05-22 17:24:14.000000000 -0400 +++ files/patch-libgksu_gksu-context.c 2009-12-02 18:09:02.000000000 -0500 @@ -1,5 +1,5 @@ ---- libgksu/gksu-context.c.orig Mon May 1 01:08:30 2006 -+++ libgksu/gksu-context.c Mon May 22 14:06:23 2006 +--- libgksu/gksu-context.c.orig 2006-04-30 17:08:30.000000000 -0400 ++++ libgksu/gksu-context.c 2009-12-02 16:59:43.000000000 -0500 @@ -23,9 +23,14 @@ #include #include @@ -80,7 +80,16 @@ strerror(errno)); } -@@ -1097,7 +1104,7 @@ +@@ -942,8 +949,6 @@ + write (fdpty, line, strlen(line)); + g_free (line); + +- tcdrain (fdpty); +- + bzero (buf, 256); + read (fdpty, buf, 256); + } +@@ -1097,7 +1102,7 @@ argcount = 0; /* sudo binary */ @@ -89,7 +98,7 @@ argcount++; /* Make sudo read from STDIN */ -@@ -1276,7 +1283,7 @@ +@@ -1276,7 +1281,7 @@ argcount = 0; /* sudo binary */ >Release-Note: >Audit-Trail: >Unformatted: