gksudo eats standard input when there's a sudo timestamp
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
gksu (Ubuntu) |
New
|
Undecided
|
Unassigned | ||
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
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]