diff --git a/configure.ac b/configure.ac index bfa94c5..f1e253b 100644 --- a/configure.ac +++ b/configure.ac @@ -161,7 +161,7 @@ AC_ARG_ENABLE(polkit, AS_HELP_STRING([--enable-polkit],[enable PolicyKit]), enable_polkit=$enableval,enable_polkit=yes) AM_CONDITIONAL(CD_BUILD_POLKIT, test x$enable_polkit = xyes) if test x$enable_polkit = xyes; then - PKG_CHECK_MODULES(POLKIT, polkit-gobject-1 >= 0.103) + PKG_CHECK_MODULES(POLKIT, polkit-gobject-1 >= 0.97) AC_DEFINE(USE_POLKIT, 1, [if we should use PolicyKit]) fi diff --git a/po/POTFILES.in b/po/POTFILES.in index 34044eb..0a64586 100644 --- a/po/POTFILES.in +++ b/po/POTFILES.in @@ -3,6 +3,6 @@ client/cd-create-profile.c client/cd-fix-profile.c client/cd-util.c contrib/colord-sane/cd-main.c -policy/org.freedesktop.color.policy.in.in +policy/org.freedesktop.color.policy.in src/cd-debug.c src/cd-main.c diff --git a/po/POTFILES.skip b/po/POTFILES.skip deleted file mode 100644 index 855c79c..0000000 --- a/po/POTFILES.skip +++ /dev/null @@ -1 +0,0 @@ -policy/org.freedesktop.color.policy.in diff --git a/policy/Makefile.am b/policy/Makefile.am index 14e01ae..85e3ecc 100644 --- a/policy/Makefile.am +++ b/policy/Makefile.am @@ -1,20 +1,9 @@ -org.freedesktop.color.policy.in: org.freedesktop.color.policy.in.in Makefile - $(AM_V_GEN)if test "x$(daemon_user)" != "xroot"; then \ - sed -e "s|<!--@ANNOTATE_OWNER@-->|<annotate key=\"org.freedesktop.policykit.owner\">unix-user:$(daemon_user)</annotate>|g" $< > $@ ; \ - else \ - sed -e "/^\s*<!--@ANNOTATE_OWNER@-->\s*$$/d;s|<!--@ANNOTATE_OWNER@-->||g" $< > $@ ; \ - fi - @INTLTOOL_POLICY_RULE@ polkit_policydir = $(datadir)/polkit-1/actions -polkit_policy_in_files = org.freedesktop.color.policy.in -polkit_policy_DATA = $(polkit_policy_in_files:.policy.in=.policy) -#polkit_policy_DATA = \ -# org.freedesktop.color.policy +dist_polkit_policy_DATA = \ + org.freedesktop.color.policy -EXTRA_DIST = org.freedesktop.color.policy.in.in -CLEANFILES = \ - org.freedesktop.color.policy \ - org.freedesktop.color.policy.in +EXTRA_DIST = org.freedesktop.color.policy.in +DISTCLEANFILES = org.freedesktop.color.policy -include $(top_srcdir)/git.mk diff --git a/policy/org.freedesktop.color.policy.in b/policy/org.freedesktop.color.policy.in new file mode 100644 index 0000000..a5bcfaf --- /dev/null +++ b/policy/org.freedesktop.color.policy.in @@ -0,0 +1,150 @@ +<?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.0/policyconfig.dtd"> +<policyconfig> + + <!-- + Policy definitions for System Color Manager actions. + Copyright (c) 2010 Richard Hughes <richard@hughsie.com> + --> + + <vendor>System Color Manager</vendor> + <vendor_url>http://www.freedesktop.org/projects/system-color-manager/</vendor_url> + <icon_name>application-vnd.iccprofile</icon_name> + + <action id="org.freedesktop.color-manager.create-device"> + <!-- SECURITY: + - Normal users should not have to authenticate to add devices + --> + <_description>Create a color managed device</_description> + <_message>Authentication is required to create a color managed device</_message> + <icon_name>application-vnd.iccprofile</icon_name> + <defaults> + <allow_any>no</allow_any> + <allow_inactive>no</allow_inactive> + <allow_active>yes</allow_active> + </defaults> + </action> + + <action id="org.freedesktop.color-manager.create-profile"> + <!-- SECURITY: + - Normal users should not have to authenticate to add profiles + --> + <_description>Create a color profile</_description> + <_message>Authentication is required to create a color profile</_message> + <icon_name>application-vnd.iccprofile</icon_name> + <defaults> + <allow_any>no</allow_any> + <allow_inactive>no</allow_inactive> + <allow_active>yes</allow_active> + </defaults> + </action> + + <action id="org.freedesktop.color-manager.delete-device"> + <!-- SECURITY: + - Normal users should not have to authenticate to delete devices + --> + <_description>Remove a color managed device</_description> + <_message>Authentication is required to remove a color managed device</_message> + <icon_name>application-vnd.iccprofile</icon_name> + <defaults> + <allow_any>no</allow_any> + <allow_inactive>no</allow_inactive> + <allow_active>yes</allow_active> + </defaults> + </action> + + <action id="org.freedesktop.color-manager.delete-profile"> + <!-- SECURITY: + - Normal users should not have to authenticate to delete profiles + --> + <_description>Remove a color profile</_description> + <_message>Authentication is required to remove a color profile</_message> + <icon_name>application-vnd.iccprofile</icon_name> + <defaults> + <allow_any>no</allow_any> + <allow_inactive>no</allow_inactive> + <allow_active>yes</allow_active> + </defaults> + </action> + + <action id="org.freedesktop.color-manager.modify-device"> + <!-- SECURITY: + - Normal users should not have to authenticate to modify devices + --> + <_description>Modify color settings for a device</_description> + <_message>Authentication is required to modify the color settings for a device</_message> + <icon_name>application-vnd.iccprofile</icon_name> + <defaults> + <allow_any>no</allow_any> + <allow_inactive>no</allow_inactive> + <allow_active>yes</allow_active> + </defaults> + </action> + + <action id="org.freedesktop.color-manager.modify-profile"> + <!-- SECURITY: + - Normal users should not have to authenticate to modify profiles + --> + <_description>Modify a color profile</_description> + <_message>Authentication is required to modify a color profile</_message> + <icon_name>application-vnd.iccprofile</icon_name> + <defaults> + <allow_any>no</allow_any> + <allow_inactive>no</allow_inactive> + <allow_active>yes</allow_active> + </defaults> + </action> + + <action id="org.freedesktop.color-manager.install-system-wide"> + <!-- SECURITY: + - Normal users require admin authentication to install files system + wide to apply color profiles for sessions that have not explicitly + chosen profiles to apply. + - This should not be set to 'yes' as unprivileged users could then + set a profile set to all-white or all-black and thus make the + other sessions unusable. + --> + <_description>Install system color profiles</_description> + <_message>Authentication is required to install the color profile for all users</_message> + <icon_name>application-vnd.iccprofile</icon_name> + <defaults> + <allow_any>no</allow_any> + <allow_inactive>no</allow_inactive> + <allow_active>auth_admin_keep</allow_active> + </defaults> + </action> + + <action id="org.freedesktop.color-manager.device-inhibit"> + <!-- SECURITY: + - Normal users should not have to authenticate to profile + devices. + --> + <_description>Inhibit color profile selection</_description> + <_message>Authentication is required to disable profile matching for a device</_message> + <icon_name>application-vnd.iccprofile</icon_name> + <defaults> + <allow_any>no</allow_any> + <allow_inactive>no</allow_inactive> + <allow_active>yes</allow_active> + </defaults> + </action> + + <action id="org.freedesktop.color-manager.sensor-lock"> + <!-- SECURITY: + - Normal users should not have to authenticate to use the + colorimeter device. + --> + <_description>Use color sensor</_description> + <_message>Authentication is required to use the color sensor</_message> + <icon_name>application-vnd.iccprofile</icon_name> + <defaults> + <allow_any>no</allow_any> + <allow_inactive>no</allow_inactive> + <allow_active>yes</allow_active> + </defaults> + </action> + +</policyconfig> + diff --git a/policy/org.freedesktop.color.policy.in.in b/policy/org.freedesktop.color.policy.in.in deleted file mode 100644 index 2a3a7f0..0000000 --- a/policy/org.freedesktop.color.policy.in.in +++ /dev/null @@ -1,159 +0,0 @@ -<?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.0/policyconfig.dtd"> -<policyconfig> - - <!-- - Policy definitions for System Color Manager actions. - Copyright (c) 2010 Richard Hughes <richard@hughsie.com> - --> - - <vendor>System Color Manager</vendor> - <vendor_url>http://www.freedesktop.org/projects/system-color-manager/</vendor_url> - <icon_name>application-vnd.iccprofile</icon_name> - - <action id="org.freedesktop.color-manager.create-device"> - <!-- SECURITY: - - Normal users should not have to authenticate to add devices - --> - <_description>Create a color managed device</_description> - <_message>Authentication is required to create a color managed device</_message> - <icon_name>application-vnd.iccprofile</icon_name> - <defaults> - <allow_any>no</allow_any> - <allow_inactive>no</allow_inactive> - <allow_active>yes</allow_active> - </defaults> - <!--@ANNOTATE_OWNER@--> - </action> - - <action id="org.freedesktop.color-manager.create-profile"> - <!-- SECURITY: - - Normal users should not have to authenticate to add profiles - --> - <_description>Create a color profile</_description> - <_message>Authentication is required to create a color profile</_message> - <icon_name>application-vnd.iccprofile</icon_name> - <defaults> - <allow_any>no</allow_any> - <allow_inactive>no</allow_inactive> - <allow_active>yes</allow_active> - </defaults> - <!--@ANNOTATE_OWNER@--> - </action> - - <action id="org.freedesktop.color-manager.delete-device"> - <!-- SECURITY: - - Normal users should not have to authenticate to delete devices - --> - <_description>Remove a color managed device</_description> - <_message>Authentication is required to remove a color managed device</_message> - <icon_name>application-vnd.iccprofile</icon_name> - <defaults> - <allow_any>no</allow_any> - <allow_inactive>no</allow_inactive> - <allow_active>yes</allow_active> - </defaults> - <!--@ANNOTATE_OWNER@--> - </action> - - <action id="org.freedesktop.color-manager.delete-profile"> - <!-- SECURITY: - - Normal users should not have to authenticate to delete profiles - --> - <_description>Remove a color profile</_description> - <_message>Authentication is required to remove a color profile</_message> - <icon_name>application-vnd.iccprofile</icon_name> - <defaults> - <allow_any>no</allow_any> - <allow_inactive>no</allow_inactive> - <allow_active>yes</allow_active> - </defaults> - <!--@ANNOTATE_OWNER@--> - </action> - - <action id="org.freedesktop.color-manager.modify-device"> - <!-- SECURITY: - - Normal users should not have to authenticate to modify devices - --> - <_description>Modify color settings for a device</_description> - <_message>Authentication is required to modify the color settings for a device</_message> - <icon_name>application-vnd.iccprofile</icon_name> - <defaults> - <allow_any>no</allow_any> - <allow_inactive>no</allow_inactive> - <allow_active>yes</allow_active> - </defaults> - <!--@ANNOTATE_OWNER@--> - </action> - - <action id="org.freedesktop.color-manager.modify-profile"> - <!-- SECURITY: - - Normal users should not have to authenticate to modify profiles - --> - <_description>Modify a color profile</_description> - <_message>Authentication is required to modify a color profile</_message> - <icon_name>application-vnd.iccprofile</icon_name> - <defaults> - <allow_any>no</allow_any> - <allow_inactive>no</allow_inactive> - <allow_active>yes</allow_active> - </defaults> - <!--@ANNOTATE_OWNER@--> - </action> - - <action id="org.freedesktop.color-manager.install-system-wide"> - <!-- SECURITY: - - Normal users require admin authentication to install files system - wide to apply color profiles for sessions that have not explicitly - chosen profiles to apply. - - This should not be set to 'yes' as unprivileged users could then - set a profile set to all-white or all-black and thus make the - other sessions unusable. - --> - <_description>Install system color profiles</_description> - <_message>Authentication is required to install the color profile for all users</_message> - <icon_name>application-vnd.iccprofile</icon_name> - <defaults> - <allow_any>no</allow_any> - <allow_inactive>no</allow_inactive> - <allow_active>auth_admin_keep</allow_active> - </defaults> - <!--@ANNOTATE_OWNER@--> - </action> - - <action id="org.freedesktop.color-manager.device-inhibit"> - <!-- SECURITY: - - Normal users should not have to authenticate to profile - devices. - --> - <_description>Inhibit color profile selection</_description> - <_message>Authentication is required to disable profile matching for a device</_message> - <icon_name>application-vnd.iccprofile</icon_name> - <defaults> - <allow_any>no</allow_any> - <allow_inactive>no</allow_inactive> - <allow_active>yes</allow_active> - </defaults> - <!--@ANNOTATE_OWNER@--> - </action> - - <action id="org.freedesktop.color-manager.sensor-lock"> - <!-- SECURITY: - - Normal users should not have to authenticate to use the - colorimeter device. - --> - <_description>Use color sensor</_description> - <_message>Authentication is required to use the color sensor</_message> - <icon_name>application-vnd.iccprofile</icon_name> - <defaults> - <allow_any>no</allow_any> - <allow_inactive>no</allow_inactive> - <allow_active>yes</allow_active> - </defaults> - <!--@ANNOTATE_OWNER@--> - </action> - -</policyconfig> -