GNOME Bugzilla – Bug 727799
Fix su/sudo execution detection
Last modified: 2014-04-08 17:19:52 UTC
Commit 1244dbb6f0381ced states that gnome-terminal doesn't work under sudo. To detect this that checks whether the uid or gid have changed or that the e[uid|gid] are 0. If the user already belongs to the group wheel or was root without doing any su or sudo, gnome-terminal will exit. This, according to the commit 1244dbb6 is not the intended behavior. What we need to check is whether e[uid|gid] have changed (because the user was root already or because the user belongs to the wheel/root group) and check if the e[uid|gid] are 0. In that case the gnome-terminal is run under su/sudo and gnome-terminal should bail out.
Created attachment 273766 [details] [review] git formated patch that tries to fix the su/sudo detection
Comment on attachment 273766 [details] [review] git formated patch that tries to fix the su/sudo detection (In reply to comment #0) > If the user [...] was root without doing any su > or sudo, gnome-terminal will exit. This, according to the commit 1244dbb6 is > not the intended behavior. I was under the impression that gdm refused to log in as root? Anyway, please commit to master and gnome-3-12.
I don't have commit access there. Could anyone with permission commit this?
Gustau asked me privately if I could commit it, so here: ef5b45c Christian I only committed to head, feel free to cherry-pick it into the stable branches, I prefer to leave that decision to a gnome-terminal developer.
Mark the report as fixed.