File fix-CVE-2013-4325.diff of Package hplip.openSUSE_12.3_Update

--- hplip-3.12.11/base/pkit.py	2012-11-20 10:55:15.000000000 +0100
+++ hplip-3.13.10/base/pkit.py	2013-10-11 11:40:14.000000000 +0200
@@ -171,36 +172,32 @@ class PolicyKitService(dbus.service.Obje
             raise AccessDeniedException('Session not authorized by PolicyKit')
 
         system_bus = dbus.SystemBus()
         obj = system_bus.get_object("org.freedesktop.PolicyKit1",
                                     "/org/freedesktop/PolicyKit1/Authority",
                                     "org.freedesktop.PolicyKit1.Authority")
         policy_kit = dbus.Interface(obj, "org.freedesktop.PolicyKit1.Authority")
-        info = dbus.Interface(connection.get_object("org.freedesktop.DBus",
-                                                    "/org/freedesktop/DBus/Bus",
-                                                    False),
-                              "org.freedesktop.DBus")
-        pid = info.GetConnectionUnixProcessID(sender)
-        
+
         subject = (
-            'unix-process',
-            { 'pid' : dbus.UInt32(pid, variant_level = 1) }
+           'system-bus-name',
+            { 'name' : dbus.String(sender, variant_level = 1) }
         )
         details = { '' : '' }
         flags = dbus.UInt32(1)         # AllowUserInteraction = 0x00000001
         cancel_id = ''
 
         (ok, notused, details) = \
             policy_kit.CheckAuthorization(subject,
                                           action,
                                           details,
                                           flags,
                                           cancel_id)
         if not ok:
             log.error("Session not authorized by PolicyKit version 1")
+            raise AccessDeniedException("Session not authorized by PolicyKit")
 
         return ok
 
 
 if utils.to_bool(sys_conf.get('configure', 'policy-kit')):
     class BackendService(PolicyKitService):
         INTERFACE_NAME = 'com.hp.hplip'
openSUSE Build Service is sponsored by