provide convenience functions for auth checking and port helpers to use them
Basically, checking auths with polkit is now a one-liner:
if (polkit_check_auth (getpid (), "com.acme.some-action", NULL) == 0) {
fprintf (stderr, "Not authorized; go away\n");
exit (1);
}
This can be used for making a lot of the legacy UNIX tools PolicyKit
aware. For example, vixie-cron could make crontab(1) (a setuid
program) check whether the calling user is authorized for the action
org.isc.vixie-cron.edit-own-crontab
This is a nice way to provide least privilege and still put the system
administrator in control via polkit-auth(1), polkit-action(1) and the
GTK+ "Manage Authorizations" utility:
http://people.redhat.com/davidz/polkitg-auth-1.png
http://people.redhat.com/davidz/polkitg-auth-2.png
http://people.redhat.com/davidz/polkitg-auth-3.png