- Check result of polkit_authority_check_authorization_sync() for NULL.
This commit is contained in:
parent
9f092f3bd3
commit
0fcca973dc
@ -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/download/cups-pk-helper/cups-pk-helper-%{ve
|
||||
|
||||
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 PolicyKit.
|
||||
|
||||
%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@redhat.com> - 0.0.4-6
|
||||
- Check result of polkit_authority_check_authorization_sync() for NULL.
|
||||
|
||||
* Thu Aug 13 2009 Marek Kasik <mkasik@redhat.com> - 0.0.4-5
|
||||
- Add parameters to DevicesGet method.
|
||||
|
||||
|
123
polkit_result.patch
Normal file
123
polkit_result.patch
Normal file
@ -0,0 +1,123 @@
|
||||
--- 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>
|
Loading…
Reference in New Issue
Block a user