[Bug 828850] Re: software-properties-gtk crashed with DBusException in call_blocking(): com.ubuntu.SoftwareProperties.PermissionDeniedByPolicy: com.ubuntu.softwareproperties.applychanges
Edward Donovan
828850 at bugs.launchpad.net
Tue May 8 22:00:10 UTC 2012
Here is a rough-and-ready patch, to SoftwarePropertiesGtk.py, that
catches the PermissionDeniedByPolicy exceptions.
It wraps every call to the dbus backend, the operations that require a
password, in a try-except block. When it catches the exception, it pops
a dialog saying "Software sources can't be changed without permission."
This patch stops the exception problems, for every action in the GUI,
that I could think to try. Please test it if you can.
Notes:
- I could not find one place to put the try-except, that would include
all the operations. I tried putting it in the files that call this one,
and several places here.
- As of this first version, if you cancel the password dialog, the
'Revert' button is activated, even though you were unable to change
anything. I'll try to look into that, but want to send this now.
- The module already has a method "on_auth_failed", apparently for use
when the dbus backend signals unsuccessful authorization. I haven't
been able to integrate this patch with that function. Ideally, this
exception catching might be a part of that, and perhaps that function is
not quite doing its job, yet, if it isn't handling these exceptions, or
managing the state of 'Revert'.
Thanks.
** Patch added: "Patch that wraps an exception handler around each backend call. First try."
https://bugs.launchpad.net/ubuntu/+source/software-properties/+bug/828850/+attachment/3137636/+files/bug-828850-patch-1.diff
** Tags added: patch
** Tags added: precise quantal
--
You received this bug notification because you are a member of Ubuntu
Foundations Bugs, which is subscribed to software-properties in Ubuntu.
https://bugs.launchpad.net/bugs/828850
Title:
software-properties-gtk crashed with DBusException in call_blocking():
com.ubuntu.SoftwareProperties.PermissionDeniedByPolicy:
com.ubuntu.softwareproperties.applychanges
Status in “software-properties” package in Ubuntu:
Triaged
Bug description:
This is reproducible by launching software-properties-gtk as any user
that is not an admin, or from any session where the user can't be
verified to be an admin via policykit - including when the user hits
'cancel' in the authentication dialog. We should suppress these
exceptions so they don't show up as crashes on the desktop.
ProblemType: Crash
DistroRelease: Ubuntu 11.10
Package: software-properties-gtk 0.81.8
ProcVersionSignature: Ubuntu 3.0.0-8.11-generic 3.0.1
Uname: Linux 3.0.0-8-generic x86_64
Architecture: amd64
Date: Thu Aug 11 14:27:10 2011
ExecutablePath: /usr/bin/software-properties-gtk
InstallationMedia: Ubuntu 11.10 "Oneiric Ocelot" - Alpha amd64 (20110705)
InterpreterPath: /usr/bin/python2.7
PackageArchitecture: all
ProcCmdline: /usr/bin/python /usr/bin/software-properties-gtk -n -t 132120584
ProcCwd: /home/yehuda/Documents
ProcEnviron:
LANGUAGE=en_CA:en
PATH=(custom, no user)
LANG=en_CA.UTF-8
SHELL=/bin/bash
PythonArgs: ['/usr/bin/software-properties-gtk', '-n', '-t', '132120584']
SourcePackage: software-properties
Title: software-properties-gtk crashed with DBusException in call_blocking(): com.ubuntu.SoftwareProperties.PermissionDeniedByPolicy: com.ubuntu.softwareproperties.applychanges
UpgradeStatus: Upgraded to oneiric on 2011-07-27 (21 days ago)
UserGroups: adm admin cdrom dialout lpadmin plugdev sambashare
To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/software-properties/+bug/828850/+subscriptions
More information about the foundations-bugs
mailing list