Partial and release upgrade buttons don't work
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
unity-lens-applications |
Won't Fix
|
Undecided
|
Bilal Akhtar | ||
update-manager (Ubuntu) |
Fix Released
|
High
|
Michael Terry |
Bug Description
Commands spawned from unity (from the Dash, from Alt+F2, from indicators) can't use pkexec.
To reproduce:
1) Download attached test-getppid.py and put it in /usr/bin and chmod +x it
2) Press Alt+F2
3) Type in test-getppid.py and press Enter
4) Click the button
5) A pkexec dialog should pop up, trying to run gcalctool
When you try this script from a Terminal, it works fine.
Impact:
The Desktop team is porting uses of gksu over to pkexec. For example, in Software Updater, the partial upgrade and release upgrade buttons now use pkexec. They will be broken in quantal unless this bug is fixed (or they are reverted to gksu to work around this).
Analysis:
The problem appears to be that getppid() returns 1. And pkexec has the following code:
/* Figure out the parent process */
pid_of_caller = getppid ();
if (pid_of_caller == 1)
{
/* getppid() can return 1 if the parent died (meaning that we are reaped
* by /sbin/init); In that case we simpy bail.
*/
g_printerr ("Refusing to render service to dead parents.\n");
goto out;
}
I'm assuming that getppid() returning 1 is at fault here, not the pkexec code, so I filed this against unity.
ProblemType: Bug
DistroRelease: Ubuntu 12.10
Package: unity 5.12-0ubuntu3
ProcVersionSign
Uname: Linux 3.5.0-2-generic i686
ApportVersion: 2.2.5-0ubuntu1
Architecture: i386
CheckboxSubmission: 9a284f3f6b4f782
CheckboxSystem: 3935143777c965d
Date: Mon Jul 2 09:58:25 2012
EcryptfsInUse: Yes
InstallationMedia: Ubuntu 11.04 "Natty Narwhal" - Release i386 (20110422)
SourcePackage: unity
UpgradeStatus: No upgrade log present (probably fresh install)
Related branches
- Mikkel Kamstrup Erlandsen (community): Disapprove
-
Diff: 12 lines (+1/-1)1 file modifiedsrc/daemon.vala (+1/-1)
Changed in unity: | |
milestone: | none → 6.0 |
Changed in unity: | |
importance: | High → Medium |
Changed in unity (Ubuntu): | |
importance: | High → Medium |
affects: | unity (Ubuntu) → update-manager (Ubuntu) |
Changed in update-manager (Ubuntu): | |
importance: | Medium → High |
affects: | unity → update-manager |
Changed in update-manager: | |
milestone: | 6.0 → none |
summary: |
- Spawned commands can't use pkexec + Partial and release upgrade buttons don't work |
Changed in update-manager (Ubuntu): | |
assignee: | nobody → Michael Terry (mterry) |
Changed in unity-lens-applications: | |
status: | In Progress → Won't Fix |
(I suppose a workaround would be to not execl into pkexec, but rather spawn it as a sub-child. But execl should be a viable tactic, I believe?)