rpms/cups-pk-helper/devel polkit_result.patch, NONE, 1.1 cups-pk-helper.spec, 1.11, 1.12

Marek Kašík mkasik at fedoraproject.org
Tue Aug 18 14:23:27 UTC 2009


Author: mkasik

Update of /cvs/pkgs/rpms/cups-pk-helper/devel
In directory cvs1.fedora.phx.redhat.com:/tmp/cvs-serv23161

Modified Files:
	cups-pk-helper.spec 
Added Files:
	polkit_result.patch 
Log Message:
* Tue Aug 18 2009 Marek Kasik <mkasik at redhat.com> - 0.0.4-6
- Check result of polkit_authority_check_authorization_sync() for NULL.


polkit_result.patch:
 cups-pk-helper-mechanism.c                    |    2 -
 org.opensuse.cupspkhelper.mechanism.policy.in |   40 +++++++++++++-------------
 2 files changed, 21 insertions(+), 21 deletions(-)

--- NEW FILE polkit_result.patch ---
--- cups-pk-helper-0.0.4/src/cups-pk-helper-mechanism.c.polkit-result	2009-08-17 14:55:52.000000000 +0200
+++ cups-pk-helper-0.0.4/src/cups-pk-helper-mechanism.c	2009-08-17 14:55:52.000000000 +0200
@@ -278,7 +278,7 @@ _check_polkit_for_action_internal (CphMe
                                                                NULL);
         g_object_unref (pk_caller);
 
-        if (!polkit_authorization_result_get_is_authorized (pk_result)) {
+        if (pk_result == NULL || !polkit_authorization_result_get_is_authorized (pk_result)) {
                 g_set_error (error,
                              CPH_MECHANISM_ERROR,
                              CPH_MECHANISM_ERROR_NOT_PRIVILEGED,
--- cups-pk-helper-0.0.4/src/org.opensuse.cupspkhelper.mechanism.policy.in.polkit-result	2009-08-17 14:55:52.000000000 +0200
+++ cups-pk-helper-0.0.4/src/org.opensuse.cupspkhelper.mechanism.policy.in	2009-08-17 14:55:52.000000000 +0200
@@ -12,8 +12,8 @@
        operation: if some authorization is required, then the PolicyKit helper
        will fallback on printer-X-edit. -->
   <action id="org.opensuse.cupspkhelper.mechanism.printer-set-default">
-    <_description>Set a printer as default printer</_description>
-    <_message>Privileges are required to set a printer, or a class, as default printer.</_message>
+    <description>Set a printer as default printer</description>
+    <message>Privileges are required to set a printer, or a class, as default printer.</message>
     <defaults>
       <allow_inactive>no</allow_inactive>
       <allow_active>auth_admin_keep</allow_active>
@@ -24,8 +24,8 @@
        operation: if some authorization is required, then the PolicyKit helper
        will fallback on printer-X-edit. -->
   <action id="org.opensuse.cupspkhelper.mechanism.printer-enable">
-    <_description>Enable/Disable a printer</_description>
-    <_message>Privileges are required to enable/disable a printer, or a class.</_message>
+    <description>Enable/Disable a printer</description>
+    <message>Privileges are required to enable/disable a printer, or a class.</message>
     <defaults>
       <allow_inactive>no</allow_inactive>
       <allow_active>auth_admin_keep</allow_active>
@@ -33,8 +33,8 @@
   </action>
 
   <action id="org.opensuse.cupspkhelper.mechanism.printer-local-edit">
-    <_description>Add/Remove/Edit a local printer</_description>
-    <_message>Privileges are required to add/remove/edit a local printer.</_message>
+    <description>Add/Remove/Edit a local printer</description>
+    <message>Privileges are required to add/remove/edit a local printer.</message>
     <defaults>
       <allow_inactive>no</allow_inactive>
       <allow_active>auth_admin_keep</allow_active>
@@ -42,8 +42,8 @@
   </action>
 
   <action id="org.opensuse.cupspkhelper.mechanism.printer-remote-edit">
-    <_description>Add/Remove/Edit a remote printer</_description>
-    <_message>Privileges are required to add/remove/edit a remote printer.</_message>
+    <description>Add/Remove/Edit a remote printer</description>
+    <message>Privileges are required to add/remove/edit a remote printer.</message>
     <defaults>
       <allow_inactive>no</allow_inactive>
       <allow_active>auth_admin_keep</allow_active>
@@ -51,8 +51,8 @@
   </action>
 
   <action id="org.opensuse.cupspkhelper.mechanism.class-edit">
-    <_description>Add/Remove/Edit a class</_description>
-    <_message>Privileges are required to add/remove/edit a class.</_message>
+    <description>Add/Remove/Edit a class</description>
+    <message>Privileges are required to add/remove/edit a class.</message>
     <defaults>
       <allow_inactive>no</allow_inactive>
       <allow_active>auth_admin_keep</allow_active>
@@ -60,8 +60,8 @@
   </action>
 
   <action id="org.opensuse.cupspkhelper.mechanism.server-settings">
-    <_description>Get/Set server settings</_description>
-    <_message>Privileges are required to get/set server settings.</_message>
+    <description>Get/Set server settings</description>
+    <message>Privileges are required to get/set server settings.</message>
     <defaults>
       <allow_inactive>no</allow_inactive>
       <allow_active>auth_admin_keep</allow_active>
@@ -69,8 +69,8 @@
   </action>
 
   <action id="org.opensuse.cupspkhelper.mechanism.job-edit">
-    <_description>Restart/Cancel/Edit a job</_description>
-    <_message>Privileges are required to restart/cancel/edit a job.</_message>
+    <description>Restart/Cancel/Edit a job</description>
+    <message>Privileges are required to restart/cancel/edit a job.</message>
     <defaults>
       <allow_inactive>no</allow_inactive>
       <allow_active>yes</allow_active>
@@ -78,8 +78,8 @@
   </action>
 
   <action id="org.opensuse.cupspkhelper.mechanism.job-not-owned-edit">
-    <_description>Restart/Cancel/Edit a job owned by another user</_description>
-    <_message>Privileges are required to restart/cancel/edit a job owned by another user.</_message>
+    <description>Restart/Cancel/Edit a job owned by another user</description>
+    <message>Privileges are required to restart/cancel/edit a job owned by another user.</message>
     <defaults>
       <allow_inactive>no</allow_inactive>
       <allow_active>auth_admin_keep</allow_active>
@@ -87,8 +87,8 @@
   </action>
 
   <action id="org.opensuse.cupspkhelper.mechanism.devices-get">
-    <_description>Get devices</_description>
-    <_message>Privileges are required to get devices.</_message>
+    <description>Get devices</description>
+    <message>Privileges are required to get devices.</message>
     <defaults>
       <allow_inactive>no</allow_inactive>
       <allow_active>auth_admin_keep</allow_active>
@@ -97,8 +97,8 @@
 
   <!-- Deprecated -->
   <action id="org.opensuse.cupspkhelper.mechanism.printeraddremove">
-    <_description>Add/Remove/Edit a printer</_description>
-    <_message>Privileges are required to add/remove/edit a printer.</_message>
+    <description>Add/Remove/Edit a printer</description>
+    <message>Privileges are required to add/remove/edit a printer.</message>
     <defaults>
       <allow_inactive>no</allow_inactive>
       <allow_active>auth_admin_keep</allow_active>


Index: cups-pk-helper.spec
===================================================================
RCS file: /cvs/pkgs/rpms/cups-pk-helper/devel/cups-pk-helper.spec,v
retrieving revision 1.11
retrieving revision 1.12
diff -u -p -r1.11 -r1.12
--- cups-pk-helper.spec	13 Aug 2009 14:02:25 -0000	1.11
+++ cups-pk-helper.spec	18 Aug 2009 14:23:25 -0000	1.12
@@ -1,6 +1,6 @@
 Name:           cups-pk-helper
 Version:        0.0.4
-Release:        5%{?dist}
+Release:        6%{?dist}
 Summary:        A helper that makes system-config-printer use PolicyKit
 
 Group:          System Environment/Base
@@ -10,6 +10,7 @@ Source0:        http://www.vuntz.net/dow
 
 Patch0:         polkit-1.patch
 Patch1:         get_devices.patch
+Patch2:         polkit_result.patch
 
 BuildRoot:      %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
 
@@ -41,6 +42,7 @@ interfaces available under control of Po
 
 %patch0 -p1 -b .polkit-1
 %patch1 -p1 -b .get-devices
+%patch2 -p1 -b .polkit-result
 
 %build
 # Patch0 modifies configure.ac
@@ -70,6 +72,9 @@ rm -rf $RPM_BUILD_ROOT
 
 
 %changelog
+* Tue Aug 18 2009 Marek Kasik <mkasik at redhat.com> - 0.0.4-6
+- Check result of polkit_authority_check_authorization_sync() for NULL.
+
 * Thu Aug 13 2009 Marek Kasik <mkasik at redhat.com> - 0.0.4-5
 - Add parameters to DevicesGet method.
 




More information about the fedora-extras-commits mailing list