From fdcc6b9eb0942e40a1a1fd0118648e26df0be2b5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Miloslav=20Trma=C4=8D?= Date: Thu, 18 Apr 2013 21:14:08 +0200 Subject: [PATCH] More warnings about using auth_self* Suggested by Colin Walters. https://bugs.freedesktop.org/show_bug.cgi?id=57284 --- docs/man/polkit.xml | 8 ++++++-- docs/polkit/overview.xml | 24 ++++++++++++++++++++++-- 2 files changed, 28 insertions(+), 4 deletions(-) diff --git a/docs/man/polkit.xml b/docs/man/polkit.xml index f8b4849..d30ee52 100644 --- a/docs/man/polkit.xml +++ b/docs/man/polkit.xml @@ -356,7 +356,9 @@ System Context | | auth_self Authentication by the owner of the session that the client originates from is - required. + required. Note that this is not restrictive enough for most + uses on multi-user systems; auth_admin* is + generally recommended. auth_admin @@ -367,7 +369,9 @@ System Context | | auth_self_keep Like auth_self but the authorization is kept for a brief - period (e.g. five minutes). + period (e.g. five minutes). The warning about + auth_self above applies + likewise. auth_admin_keep diff --git a/docs/polkit/overview.xml b/docs/polkit/overview.xml index fb14e50..150a7bc 100644 --- a/docs/polkit/overview.xml +++ b/docs/polkit/overview.xml @@ -74,6 +74,24 @@ + DO consider the impact of the + chosen implicit authorizations on multi-user systems. Generally, + ordinary users should be able to neither modify important system's + behavior for other users, nor view other users' private data. If + your application needs an authorization framework at all, it is + fairly likely that the default configuration should deny + authorization in at least some cases. Default to using + auth_admin* instead of + auth_self*. (On single-user desktops, the + single user is typically configured as a polkit administrator, so + the two variants behave equally. On multi-user systems, + non-administrator users will be restricted by the default + configuration.) + + + + + DO pass polkit variables along with CheckAuthorization() @@ -261,8 +279,10 @@ that can be used together with GtkLockButton. Note that for GtkLockButton to work well, the - polkit action backing it should use auth_admin_keep or - auth_self_keep for its implicit authorizations. + polkit action backing it should use auth_admin_keep + for its implicit authorizations (or more rarely + auth_self_keep for services which don't affect other + users). This is often used to implement an instant apply paradigm whereby the user -- 1.8.1.4