[Bug 1020115] Re: Spawned commands can't use pkexec
Michael Terry
michael.terry at canonical.com
Mon Jul 2 21:39:32 UTC 2012
** Package changed: unity (Ubuntu) => update-manager (Ubuntu)
** Changed in: update-manager (Ubuntu)
Importance: Medium => High
** Project changed: unity => update-manager
** Changed in: update-manager
Milestone: 6.0 => None
** Summary changed:
- Spawned commands can't use pkexec
+ Partial and release upgrade buttons don't work
** Changed in: update-manager (Ubuntu)
Assignee: (unassigned) => Michael Terry (mterry)
--
You received this bug notification because you are a member of Ubuntu
Foundations Bugs, which is subscribed to update-manager in Ubuntu.
https://bugs.launchpad.net/bugs/1020115
Title:
Partial and release upgrade buttons don't work
Status in Software Updater:
Triaged
Status in “update-manager” package in Ubuntu:
Triaged
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
ProcVersionSignature: Ubuntu 3.5.0-2.2-generic 3.5.0-rc4
Uname: Linux 3.5.0-2-generic i686
ApportVersion: 2.2.5-0ubuntu1
Architecture: i386
CheckboxSubmission: 9a284f3f6b4f7829abbe27ad9573a709
CheckboxSystem: 3935143777c965daaa64b51f0134f712
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)
To manage notifications about this bug go to:
https://bugs.launchpad.net/update-manager/+bug/1020115/+subscriptions
More information about the foundations-bugs
mailing list