Package: libgksu Version: 2.0.13~pre1-1 Severity: normal Tags: patch User: ubuntu-de...@lists.ubuntu.com Usertags: origin-ubuntu lucid ubuntu-patch
*** /tmp/tmpnsZr70 In Ubuntu, we've applied the attached patch to achieve the following: * 26_restore_stderr_output.patch: - output stderr from the sudo child (as pre-lucid versions did) LP: #501559 There is a bug in the current version that prevents stderr fromthe child to be shown. Reference is: https://bugs.launchpad.net/ubuntu/+source/libgksu/+bug/501559 To test run something like: #!/bin/sh for i in $(seq 10); do echo "stdout $i"; echo "stderr $i" 1>&2 ; sleep 0.5; done from within gksu. The patch restores the old behavior. Cheers, Michael -- System Information: Debian Release: squeeze/sid APT prefers karmic-updates APT policy: (500, 'karmic-updates'), (500, 'karmic-security'), (500, 'karmic-proposed'), (500, 'karmic-backports'), (500, 'karmic') Architecture: i386 (i686) Kernel: Linux 2.6.31-15-generic (SMP w/2 CPU cores) Locale: LANG=en_DK.UTF-8, LC_CTYPE=en_DK.UTF-8 (charmap=UTF-8) Shell: /bin/sh linked to /bin/dash
--- libgksu-2.0.13~pre1.orig/debian/patches/26_restore_stderr_output.patch +++ libgksu-2.0.13~pre1/debian/patches/26_restore_stderr_output.patch @@ -0,0 +1,27 @@ +Index: libgksu.c +=================================================================== +--- libgksu/libgksu.c (revision 876) ++++ libgksu/libgksu.c (working copy) +@@ -2898,9 +2898,6 @@ + #ifdef SUDO_FORKPTY + if (error) + close(fdpty); +-#else +- if (error) +- fclose(infile); + #endif + + cmdline = g_strdup("sudo"); +@@ -2919,6 +2916,12 @@ + if (context->sn_context) + gksu_context_launch_complete (context); + ++ while (read (parent_pipe[0], buffer, 255) > 0) ++ { ++ fprintf (stderr, "%s", buffer); ++ bzero(buffer, 256); ++ } ++ + /* if the process is still active waitpid() on it */ + if (pid_exited != pid) + waitpid(pid, &status, 0);