- Fix policies to check when editing a job.

This commit is contained in:
mkasik 2009-08-18 17:06:39 +00:00
parent 0fcca973dc
commit 1ffb7f5c2c
2 changed files with 32 additions and 1 deletions

View File

@ -1,6 +1,6 @@
Name: cups-pk-helper
Version: 0.0.4
Release: 6%{?dist}
Release: 7%{?dist}
Summary: A helper that makes system-config-printer use PolicyKit
Group: System Environment/Base
@ -11,6 +11,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
Patch3: edit_job.patch
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
@ -43,6 +44,7 @@ interfaces available under control of PolicyKit.
%patch0 -p1 -b .polkit-1
%patch1 -p1 -b .get-devices
%patch2 -p1 -b .polkit-result
%patch3 -p1 -b .edit-job
%build
# Patch0 modifies configure.ac
@ -72,6 +74,9 @@ rm -rf $RPM_BUILD_ROOT
%changelog
* Tue Aug 18 2009 Marek Kasik <mkasik@redhat.com> - 0.0.4-7
- Fix policies to check when editing a job.
* Tue Aug 18 2009 Marek Kasik <mkasik@redhat.com> - 0.0.4-6
- Check result of polkit_authority_check_authorization_sync() for NULL.

26
edit_job.patch Normal file
View File

@ -0,0 +1,26 @@
--- cups-pk-helper-0.0.4/src/cups-pk-helper-mechanism.c 2009-08-18 18:50:55.000000000 +0200
+++ cups-pk-helper-0.0.4/src/cups-pk-helper-mechanism.c 2009-08-18 18:51:28.000000000 +0200
@@ -995,7 +995,6 @@ cph_mechanism_job_cancel (CphMechanism
switch (job_status) {
case CPH_JOB_STATUS_OWNED_BY_USER: {
if (!_check_polkit_for_action_v (mechanism, context,
- "job-not-owned-edit",
"job-edit",
NULL))
return FALSE;
@@ -1037,7 +1036,6 @@ cph_mechanism_job_restart (CphMechanism
switch (job_status) {
case CPH_JOB_STATUS_OWNED_BY_USER: {
if (!_check_polkit_for_action_v (mechanism, context,
- "job-not-owned-edit",
"job-edit",
NULL))
return FALSE;
@@ -1080,7 +1078,6 @@ cph_mechanism_job_set_hold_until (CphMec
switch (job_status) {
case CPH_JOB_STATUS_OWNED_BY_USER: {
if (!_check_polkit_for_action_v (mechanism, context,
- "job-not-owned-edit",
"job-edit",
NULL))
return FALSE;