cups-pk-helper/polkit_result.patch

124 lines
6.0 KiB
Diff
Raw Normal View History

--- 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>