commit 9f088d598187b1bddd0ce4fb97a56d61564d8381 Author: Vincent Untz Date: Tue Dec 6 10:40:21 2011 +0100 Add org.freedesktop.policykit.owner annotations to .policy file We only add those annotations when the daemon is configured to run as non-root. diff --git a/policy/Makefile.am b/policy/Makefile.am index 85e3ecc..272675b 100644 --- a/policy/Makefile.am +++ b/policy/Makefile.am @@ -1,9 +1,16 @@ +org.freedesktop.color.policy.in: org.freedesktop.color.policy.in.in Makefile.am + $(AM_V_GEN)if test "x$(daemon_user)" != "xroot"; then \ + sed -e "s|<@ANNOTATE_OWNER@/>|unix-user:$(daemon_user)|g" $< > $@ ; \ + else \ + sed -e "/^\s*<@ANNOTATE_OWNER@\/>\s*$$/d;s|<@ANNOTATE_OWNER@/>||g" $< > $@ ; \ + fi + @INTLTOOL_POLICY_RULE@ polkit_policydir = $(datadir)/polkit-1/actions -dist_polkit_policy_DATA = \ +polkit_policy_DATA = \ org.freedesktop.color.policy -EXTRA_DIST = org.freedesktop.color.policy.in -DISTCLEANFILES = org.freedesktop.color.policy +EXTRA_DIST = org.freedesktop.color.policy.in.in +DISTCLEANFILES = org.freedesktop.color.policy org.freedesktop.color.policy.in -include $(top_srcdir)/git.mk diff --git a/policy/org.freedesktop.color.policy.in b/policy/org.freedesktop.color.policy.in deleted file mode 100644 index a5bcfaf..0000000 --- a/policy/org.freedesktop.color.policy.in +++ /dev/null @@ -1,150 +0,0 @@ - - - - - - - System Color Manager - http://www.freedesktop.org/projects/system-color-manager/ - application-vnd.iccprofile - - - - <_description>Create a color managed device - <_message>Authentication is required to create a color managed device - application-vnd.iccprofile - - no - no - yes - - - - - - <_description>Create a color profile - <_message>Authentication is required to create a color profile - application-vnd.iccprofile - - no - no - yes - - - - - - <_description>Remove a color managed device - <_message>Authentication is required to remove a color managed device - application-vnd.iccprofile - - no - no - yes - - - - - - <_description>Remove a color profile - <_message>Authentication is required to remove a color profile - application-vnd.iccprofile - - no - no - yes - - - - - - <_description>Modify color settings for a device - <_message>Authentication is required to modify the color settings for a device - application-vnd.iccprofile - - no - no - yes - - - - - - <_description>Modify a color profile - <_message>Authentication is required to modify a color profile - application-vnd.iccprofile - - no - no - yes - - - - - - <_description>Install system color profiles - <_message>Authentication is required to install the color profile for all users - application-vnd.iccprofile - - no - no - auth_admin_keep - - - - - - <_description>Inhibit color profile selection - <_message>Authentication is required to disable profile matching for a device - application-vnd.iccprofile - - no - no - yes - - - - - - <_description>Use color sensor - <_message>Authentication is required to use the color sensor - application-vnd.iccprofile - - no - no - yes - - - - - diff --git a/policy/org.freedesktop.color.policy.in.in b/policy/org.freedesktop.color.policy.in.in new file mode 100644 index 0000000..4570f8f --- /dev/null +++ b/policy/org.freedesktop.color.policy.in.in @@ -0,0 +1,159 @@ + + + + + + + System Color Manager + http://www.freedesktop.org/projects/system-color-manager/ + application-vnd.iccprofile + + + + <_description>Create a color managed device + <_message>Authentication is required to create a color managed device + application-vnd.iccprofile + + no + no + yes + + <@ANNOTATE_OWNER@/> + + + + + <_description>Create a color profile + <_message>Authentication is required to create a color profile + application-vnd.iccprofile + + no + no + yes + + <@ANNOTATE_OWNER@/> + + + + + <_description>Remove a color managed device + <_message>Authentication is required to remove a color managed device + application-vnd.iccprofile + + no + no + yes + + <@ANNOTATE_OWNER@/> + + + + + <_description>Remove a color profile + <_message>Authentication is required to remove a color profile + application-vnd.iccprofile + + no + no + yes + + <@ANNOTATE_OWNER@/> + + + + + <_description>Modify color settings for a device + <_message>Authentication is required to modify the color settings for a device + application-vnd.iccprofile + + no + no + yes + + <@ANNOTATE_OWNER@/> + + + + + <_description>Modify a color profile + <_message>Authentication is required to modify a color profile + application-vnd.iccprofile + + no + no + yes + + <@ANNOTATE_OWNER@/> + + + + + <_description>Install system color profiles + <_message>Authentication is required to install the color profile for all users + application-vnd.iccprofile + + no + no + auth_admin_keep + + <@ANNOTATE_OWNER@/> + + + + + <_description>Inhibit color profile selection + <_message>Authentication is required to disable profile matching for a device + application-vnd.iccprofile + + no + no + yes + + <@ANNOTATE_OWNER@/> + + + + + <_description>Use color sensor + <_message>Authentication is required to use the color sensor + application-vnd.iccprofile + + no + no + yes + + <@ANNOTATE_OWNER@/> + + + +