From: David Zeuthen Date: Thu, 26 Jul 2007 00:37:43 +0000 (-0400) Subject: for PolKitContext, mention that a mechanism need to provide .policy files X-Git-Tag: POLICY_KIT_0_4~2 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=6da30d9867aa5956c11691554e7923d88857fe04;p=platform%2Fupstream%2Fpolkit.git 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: * * + * First, the Mechanism need to declare one or more PolicyKit Actions by dropping a .policy file into /usr/share/PolicyKit/policy. This is described in the PolicyKit specification. * The mechanism starts up and uses polkit_context_new() to create a new context * 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 /dev may want to add/remove ACL's when configuration changes; for example, the system administrator could have changed the PolicyKit configuration file /etc/PolicyKit/PolicyKit.conf such that some user is now privileged to access a specific device. * 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.