gksudo eats standard input when there's a sudo timestamp

Bug #345619 reported by Andrew Pollock
4
Affects Status Importance Assigned to Milestone
gksu (Ubuntu)
New
Undecided
Unassigned
Nominated for Hardy by Andrew Pollock
Nominated for Intrepid by Andrew Pollock

Bug Description

Binary package hint: gksu

I was trying to use gksudo in a script, where the script could well run without a controlling terminal, so using sudo directly was not an option.

The exact use case was

echo "firefox-3.0 hold" | gksudo dpkg --set-selections

but I also have a simple contrived example that demonstrates the problem just as well without being as specific or complicated:

sudo -K # ensure there's no existing timestamp and that gksudo will prompt for a password
echo foo | gksudo cat # incidentally, where'd the output go?
echo foo | gksudo cat # this time it hangs
sudo -K # kill the timestamp again
echo foo | gksudo cat # this time it works again

I'm seeing this with Hardy, but I reproduced it with Intrepid as well

Revision history for this message
Gustavo Noronha Silva (kov) wrote :

Hey, piping stuff through gksu is not really supported. This is a severe limitation I am trying to get fixed in gksu's new major version (gksu PolicyKit): http://live.gnome.org/gksu.

[lunchpad doesn't seem to like webkitgtk+... it thinks I'm uploading a 0-sized file =), when I'm uploading nothing]

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Bug attachments