GNOME Bugzilla – Bug 346191
gnome-system-tools hangs while polling /bin/su
Last modified: 2006-07-05 19:30:11 UTC
All gnome-system-tools components fails on both of my systems, the windows open with all widgets inactive, and then just hang forever. After investigating further, I have found that it is hanging in poll() while waiting for su to print the "Password:" prompt. My su definitely works from the console as normal. My su writes the "Password:" prompt to /dev/tty (rather than the more usual /dev/stdout). It appears that things written to /dev/tty do not appear on the read end of the pipe used in gst-auth.c The fix is quite simple: just access the pty fd directly, rather than using a pipe. The pty fd will see all output, including both stdout and /dev/tty.
Created attachment 68158 [details] [review] Fix I can commit this if it is acceptable.
I'm very sorry, this solution is very similar to the previous code, and backends communication has proven to be a really delicate piece of code. I don't feel like committing this to the stable branch (and potentially breaking what now works for the vast majority). Regarding the unstable branch, it now uses DBus as the communication layer, so it doesn't require forkpty() hacks. Closing it as WONTFIX. I'm sorry
I think you might have misunderstood the patch. It doesn't change the communication between backends, it just changes how data is passed to and from the pseudo-term where /bin/su is run for authentication. I don't see how calling /bin/su could be reimplemented with dbus?
That's exactly what I'm afraid of, despending on the OS/distribution, there are different forkpty() implementations, different default terminal attributes and different su implementations out there, the piece of code you've modified has given me *lots* of headaches (some of them related to data loss, and hence configuration being modified/deleted without control, many others with similar symptoms to yours) I may understand that you don't like this decision, but I don't want to put at those risks again the current stable branch, the current implementation works for most people, I'm sorry if it doesn't for you. As for DBus, the backends are a system service, and privileges checking is done by PolicyKit. This brings heaps of immediate and non-immediate benefits (better error checking, bidirectional communication and many more)
Ok, I'll upgrade to the CVS version and see if things work any better with the new stuff. Thanks for the explanation.