From 963692acad3cd4e6e431162d203c61f369b14620 Mon Sep 17 00:00:00 2001 From: David Zeuthen Date: Wed, 11 Jul 2012 12:58:06 -0400 Subject: pkexec: add support for argv1 annotation and mention shebang-wrappers Signed-off-by: David Zeuthen --- docs/man/pkexec.xml | 41 ++++++++++++++++++++++++++++++++++++++++- 1 file changed, 40 insertions(+), 1 deletion(-) (limited to 'docs') diff --git a/docs/man/pkexec.xml b/docs/man/pkexec.xml index a8868b2..fffcea4 100644 --- a/docs/man/pkexec.xml +++ b/docs/man/pkexec.xml @@ -134,7 +134,9 @@ annotation on an action with the value set to the full path of the program. In addition to specifying the program, the authentication message, description, icon and defaults can be - specified. + specified. If the org.freedesktop.policykit.exec.argv1 + annotation is present, the action will only be picked if the + first argument to the program matches the value of the annotation. Note that authentication messages may reference variables (see @@ -144,6 +146,43 @@ + WRAPPER USAGE + + To avoid modifying existing software to prefix their + command-line invocations with pkexec, + it's possible to use pkexec in a + she-bang wrapper + like this: + + + + If this script is installed into /usr/bin/my-pk-test, + then the following annotations + + /usr/bin/python + /usr/bin/my-pk-test + [...] +]]> + + can be used to select the appropriate polkit action. Be careful + to get the latter annotation right, otherwise it will match any + pkexec invocation of + /usr/bin/python scripts. + + + VARIABLES The following variables are set by -- cgit v1.2.3