Mailinglist Archive: yast-devel (246 mails)

< Previous Next >
Re: [yast-devel] Re: [yast-commit] <rest-service> master : Do not fail if authorization is already granted
  • From: Marcus Meissner <meissner@xxxxxxx>
  • Date: Wed, 26 Aug 2009 10:27:00 +0200
  • Message-id: <20090826082700.GA4088@xxxxxxx>
On Wed, Aug 26, 2009 at 10:21:37AM +0200, josef reidinger wrote:
Duncan Mac-Vicar P napsal(a):
ref: refs/heads/master
commit 3e0888a99fc4e8eafdd54633acb92c17266eb853
Author: Duncan Mac-Vicar P <dmacvicar@xxxxxxx>
Date: Wed Aug 26 00:13:26 2009 +0200

Do not fail if authorization is already granted
---
.../system/package/yast2-webservice-system.spec | 8 ++++----
1 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/plugins/system/package/yast2-webservice-system.spec
b/plugins/system/package/yast2-webservice-system.spec
index 25bb247..c6872dd 100644
--- a/plugins/system/package/yast2-webservice-system.spec
+++ b/plugins/system/package/yast2-webservice-system.spec
@@ -56,10 +56,10 @@ rm -rf $RPM_BUILD_ROOT

%post
# granting all permissions for the web user
-polkit-auth --user %{pkg_user} --grant
org.freedesktop.hal.power-management.shutdown
-polkit-auth --user %{pkg_user} --grant
org.freedesktop.hal.power-management.shutdown-multiple-sessions
-polkit-auth --user %{pkg_user} --grant
org.freedesktop.hal.power-management.reboot
-polkit-auth --user %{pkg_user} --grant
org.freedesktop.hal.power-management.reboot-multiple-sessions
+polkit-auth --user %{pkg_user} --grant
org.freedesktop.hal.power-management.shutdown ||:
+polkit-auth --user %{pkg_user} --grant
org.freedesktop.hal.power-management.shutdown-multiple-sessions ||:
+polkit-auth --user %{pkg_user} --grant
org.freedesktop.hal.power-management.reboot ||:
+polkit-auth --user %{pkg_user} --grant
org.freedesktop.hal.power-management.reboot-multiple-sessions ||:

%postun
# discard all configured permissions for the web user
Hi,
I think that this is not good idea as silently fail could hide real
problem. I think that we should prefer checking if permissions is set
and if not then grant it. Now if somethink fail in setting permission
noone know it.

And this should perhaps be done not in RPM, but by a fixed configfile.

Ciao, Marcus
--
To unsubscribe, e-mail: yast-devel+unsubscribe@xxxxxxxxxxxx
For additional commands, e-mail: yast-devel+help@xxxxxxxxxxxx

< Previous Next >
References