PolicyKit: Branch 'master'
David Zeuthen
david at kemper.freedesktop.org
Wed Jul 25 17:37:41 PDT 2007
polkit/polkit-context.c | 1 +
1 files changed, 1 insertion(+)
New commits:
diff-tree 6da30d9867aa5956c11691554e7923d88857fe04 (from 0da3d306107ff0f6958dba70ff585dc0e66cfbff)
Author: David Zeuthen <davidz at redhat.com>
Date: Wed Jul 25 20:37:43 2007 -0400
for PolKitContext, mention that a mechanism need to provide .policy files
diff --git a/polkit/polkit-context.c b/polkit/polkit-context.c
index c54e1af..14953f7 100644
--- a/polkit/polkit-context.c
+++ b/polkit/polkit-context.c
@@ -60,6 +60,7 @@
* decisions. Typically, it's used as a singleton:
*
* <itemizedlist>
+ * <listitem>First, the Mechanism need to declare one or more PolicyKit Actions by dropping a <literal>.policy</literal> file into <literal>/usr/share/PolicyKit/policy</literal>. This is described in the PolicyKit specification.</listitem>
* <listitem>The mechanism starts up and uses polkit_context_new() to create a new context</listitem>
* <listitem>If the mechanism is a long running daemon, it should use polkit_context_set_config_changed() to register a callback when configuration changes. This is useful if, for example, the mechanism needs to revise decisions based on earlier answers from libpolkit. For example, a daemon that manages permissions on <literal>/dev</literal> may want to add/remove ACL's when configuration changes; for example, the system administrator could have changed the PolicyKit configuration file <literal>/etc/PolicyKit/PolicyKit.conf</literal> such that some user is now privileged to access a specific device.</listitem>
* <listitem>If polkit_context_set_config_changed() is used, the mechanism must also use polkit_context_set_io_watch_functions() to integrate libpolkit into the mainloop.</listitem>
More information about the hal-commit
mailing list