summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorDavid Zeuthen <davidz@redhat.com>2012-05-24 15:50:59 -0400
committerDavid Zeuthen <davidz@redhat.com>2012-05-24 15:50:59 -0400
commit587deddf80b2ad72d1ff21a2d5858c720303106c (patch)
tree5f8d40a5d0f6618c3d41ceef5e2026b18e2f2b83 /src
parent0e85f07781f8eab9670e06cee32b38657e3b62ce (diff)
downloadpolkit-587deddf80b2ad72d1ff21a2d5858c720303106c.tar.gz
Clarify pkexec(1) variables
Signed-off-by: David Zeuthen <davidz@redhat.com>
Diffstat (limited to 'src')
-rw-r--r--src/examples/org.freedesktop.policykit.examples.pkexec.policy.in13
-rw-r--r--src/programs/pkexec.c6
2 files changed, 10 insertions, 9 deletions
diff --git a/src/examples/org.freedesktop.policykit.examples.pkexec.policy.in b/src/examples/org.freedesktop.policykit.examples.pkexec.policy.in
index 9c05b77..049c024 100644
--- a/src/examples/org.freedesktop.policykit.examples.pkexec.policy.in
+++ b/src/examples/org.freedesktop.policykit.examples.pkexec.policy.in
@@ -1,15 +1,14 @@
<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE policyconfig PUBLIC
- "-//freedesktop//DTD PolicyKit Policy Configuration 1.0//EN"
- "http://www.freedesktop.org/standards/PolicyKit/1/policyconfig.dtd">
+<!DOCTYPE policyconfig PUBLIC "-//freedesktop//DTD polkit Policy Configuration 1.0//EN"
+"http://www.freedesktop.org/software/polkit/policyconfig-1.dtd">
<policyconfig>
- <vendor>Examples for the PolicyKit Project</vendor>
- <vendor_url>http://hal.freedesktop.org/docs/PolicyKit/</vendor_url>
+ <vendor>Examples for the polkit project</vendor>
+ <vendor_url>http://www.freedesktop.org/wiki/Software/polkit/</vendor_url>
<action id="org.freedesktop.policykit.example.pkexec.run-frobnicate">
- <_description>Run the PolicyKit example program Frobnicate</_description>
- <_message>Authentication is required to run the PolicyKit example program Frobnicate (user=$(user), program=$(program), command_line=$(command_line))</_message>
+ <_description>Run the polkit example program Frobnicate</_description>
+ <_message>Authentication is required to run the polkit example program Frobnicate (user=$(user), user.gecos=$(user.gecos), user.display=$(user.display), program=$(program), command_line=$(command_line))</_message>
<icon_name>audio-x-generic</icon_name> <!-- just an example -->
<defaults>
<allow_any>no</allow_any>
diff --git a/src/programs/pkexec.c b/src/programs/pkexec.c
index db13cf9..d87825c 100644
--- a/src/programs/pkexec.c
+++ b/src/programs/pkexec.c
@@ -669,11 +669,13 @@ main (int argc, char *argv[])
details = polkit_details_new ();
polkit_details_insert (details, "user", pw->pw_name);
+ if (pw->pw_gecos != NULL)
+ polkit_details_insert (details, "user.gecos", pw->pw_gecos);
if (pw->pw_gecos != NULL && strlen (pw->pw_gecos) > 0)
s = g_strdup_printf ("%s (%s)", pw->pw_gecos, pw->pw_name);
else
s = g_strdup_printf ("%s", pw->pw_name);
- polkit_details_insert (details, "user_full", s);
+ polkit_details_insert (details, "user.display", s);
g_free (s);
polkit_details_insert (details, "program", path);
polkit_details_insert (details, "command_line", command_line);
@@ -696,7 +698,7 @@ main (int argc, char *argv[])
* be expanded to the path of the program e.g. "/bin/bash" and the latter
* to the user e.g. "John Doe (johndoe)" or "johndoe".
*/
- N_("Authentication is needed to run `$(program)' as user $(user)"));
+ N_("Authentication is needed to run `$(program)' as user $(user.display)"));
}
}
polkit_details_insert (details, "polkit.gettext_domain", GETTEXT_PACKAGE);