diff options
Diffstat (limited to 'perl-install/standalone/polkit')
16 files changed, 346 insertions, 0 deletions
diff --git a/perl-install/standalone/polkit/Makefile b/perl-install/standalone/polkit/Makefile new file mode 100644 index 000000000..b57dbe96d --- /dev/null +++ b/perl-install/standalone/polkit/Makefile @@ -0,0 +1,27 @@ +BINDIR = /usr/bin +LIBEXECDIR = /usr/libexec +BINDEST = $(PREFIX)$(BINDIR) +POLKITRULESDEST = $(PREFIX)/usr/share/polkit-1/rules.d +POLKITPOLICYDEST = $(PREFIX)/usr/share/polkit-1/actions + +RULES := $(wildcard *.rules) +POLICY_IN := $(wildcard *.policy.in) +POLICY = $(POLICY_IN:.policy.in=.policy) +WRAPPERS = $(patsubst org.mageia.%.policy,%,$(POLICY)) + +all: $(WRAPPERS) $(POLICY) + +clean: + rm -f $(WRAPPERS) $(POLICY) + +%: org.mageia.%.policy.in + @echo -e '#!/bin/sh\nif [[ "$$UID" != "0" ]] ; then\n $(BINDIR)/pkexec $(LIBEXECDIR)/$@ "$$''@"\n exit $$''?\nfi\nexec $(LIBEXECDIR)/$@ "$$''@"\n' > $@ + +%.policy: %.policy.in + intltool-merge --utf8 ../po $< $@ -x -u -c ../po/.intltool-merge-cache + +install: all + install -d $(BINDEST) $(POLKITRULESDEST) $(POLKITPOLICYDEST) + install -m755 $(WRAPPERS) $(BINDEST) + install -m644 $(POLICY) $(POLKITPOLICYDEST) + install -m644 $(RULES) $(POLKITRULESDEST) diff --git a/perl-install/standalone/polkit/org.mageia.drakauth.policy.in b/perl-install/standalone/polkit/org.mageia.drakauth.policy.in new file mode 100644 index 000000000..cfb2ba973 --- /dev/null +++ b/perl-install/standalone/polkit/org.mageia.drakauth.policy.in @@ -0,0 +1,22 @@ +<?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/policyconfig.dtd"> +<policyconfig> + + <vendor>Mageia</vendor> + <vendor_url>http://www.mageia.org/</vendor_url> + + <action id="org.mageia.drakauth.pkexec.run"> + <_description>Run Mageia Authentication Configuration</_description> + <_message>Authentication is required to run Mageia Authentication Configuration</_message> + <icon_name>drakconf</icon_name> + <defaults> + <allow_any>no</allow_any> + <allow_inactive>no</allow_inactive> + <allow_active>auth_admin_keep</allow_active> + </defaults> + <annotate key="org.freedesktop.policykit.exec.path">/usr/libexec/drakauth</annotate> + <annotate key="org.freedesktop.policykit.exec.allow_gui">true</annotate> + </action> +</policyconfig> diff --git a/perl-install/standalone/polkit/org.mageia.drakautologin.policy.in b/perl-install/standalone/polkit/org.mageia.drakautologin.policy.in new file mode 100644 index 000000000..161e456ef --- /dev/null +++ b/perl-install/standalone/polkit/org.mageia.drakautologin.policy.in @@ -0,0 +1,22 @@ +<?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/policyconfig.dtd"> +<policyconfig> + + <vendor>Mageia</vendor> + <vendor_url>http://www.mageia.org/</vendor_url> + + <action id="org.mageia.drakautologin.pkexec.run"> + <_description>Run Mageia AutoLogin Configuration</_description> + <_message>Authentication is required to run Mageia AutoLogin Configuration</_message> + <icon_name>drakconf</icon_name> + <defaults> + <allow_any>no</allow_any> + <allow_inactive>no</allow_inactive> + <allow_active>auth_admin_keep</allow_active> + </defaults> + <annotate key="org.freedesktop.policykit.exec.path">/usr/libexec/drakautologin</annotate> + <annotate key="org.freedesktop.policykit.exec.allow_gui">true</annotate> + </action> +</policyconfig> diff --git a/perl-install/standalone/polkit/org.mageia.drakboot.policy.in b/perl-install/standalone/polkit/org.mageia.drakboot.policy.in new file mode 100644 index 000000000..8c1b81104 --- /dev/null +++ b/perl-install/standalone/polkit/org.mageia.drakboot.policy.in @@ -0,0 +1,22 @@ +<?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/policyconfig.dtd"> +<policyconfig> + + <vendor>Mageia</vendor> + <vendor_url>http://www.mageia.org/</vendor_url> + + <action id="org.mageia.drakboot.pkexec.run"> + <_description>Run Mageia Boot Configuration</_description> + <_message>Authentication is required to run Mageia Boot Configuration</_message> + <icon_name>drakconf</icon_name> + <defaults> + <allow_any>no</allow_any> + <allow_inactive>no</allow_inactive> + <allow_active>auth_admin_keep</allow_active> + </defaults> + <annotate key="org.freedesktop.policykit.exec.path">/usr/libexec/drakboot</annotate> + <annotate key="org.freedesktop.policykit.exec.allow_gui">true</annotate> + </action> +</policyconfig> diff --git a/perl-install/standalone/polkit/org.mageia.drakclock.policy.in b/perl-install/standalone/polkit/org.mageia.drakclock.policy.in new file mode 100644 index 000000000..ffb240242 --- /dev/null +++ b/perl-install/standalone/polkit/org.mageia.drakclock.policy.in @@ -0,0 +1,22 @@ +<?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/policyconfig.dtd"> +<policyconfig> + + <vendor>Mageia</vendor> + <vendor_url>http://www.mageia.org/</vendor_url> + + <action id="org.mageia.drakclock.pkexec.run"> + <_description>Run Mageia Date and Time Configuration</_description> + <_message>Authentication is required to run Mageia Date and Time Configuration</_message> + <icon_name>drakconf</icon_name> + <defaults> + <allow_any>no</allow_any> + <allow_inactive>no</allow_inactive> + <allow_active>yes</allow_active> + </defaults> + <annotate key="org.freedesktop.policykit.exec.path">/usr/libexec/drakclock</annotate> + <annotate key="org.freedesktop.policykit.exec.allow_gui">true</annotate> + </action> +</policyconfig> diff --git a/perl-install/standalone/polkit/org.mageia.drakdisk.policy.in b/perl-install/standalone/polkit/org.mageia.drakdisk.policy.in new file mode 100644 index 000000000..97f69f252 --- /dev/null +++ b/perl-install/standalone/polkit/org.mageia.drakdisk.policy.in @@ -0,0 +1,22 @@ +<?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/policyconfig.dtd"> +<policyconfig> + + <vendor>Mageia</vendor> + <vendor_url>http://www.mageia.org/</vendor_url> + + <action id="org.mageia.drakdisk.pkexec.run"> + <_description>Run Mageia Disk Layout Editor</_description> + <_message>Authentication is required to run Mageia Disk Layout Editor</_message> + <icon_name>drakconf</icon_name> + <defaults> + <allow_any>no</allow_any> + <allow_inactive>no</allow_inactive> + <allow_active>auth_admin_keep</allow_active> + </defaults> + <annotate key="org.freedesktop.policykit.exec.path">/usr/libexec/drakdisk</annotate> + <annotate key="org.freedesktop.policykit.exec.allow_gui">true</annotate> + </action> +</policyconfig> diff --git a/perl-install/standalone/polkit/org.mageia.drakdm.policy.in b/perl-install/standalone/polkit/org.mageia.drakdm.policy.in new file mode 100644 index 000000000..21f464c51 --- /dev/null +++ b/perl-install/standalone/polkit/org.mageia.drakdm.policy.in @@ -0,0 +1,22 @@ +<?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/policyconfig.dtd"> +<policyconfig> + + <vendor>Mageia</vendor> + <vendor_url>http://www.mageia.org/</vendor_url> + + <action id="org.mageia.drakdm.pkexec.run"> + <_description>Run Mageia Login Manager Configuration</_description> + <_message>Authentication is required to run Mageia Login Manager Configuration</_message> + <icon_name>drakconf</icon_name> + <defaults> + <allow_any>no</allow_any> + <allow_inactive>no</allow_inactive> + <allow_active>auth_admin_keep</allow_active> + </defaults> + <annotate key="org.freedesktop.policykit.exec.path">/usr/libexec/drakdm</annotate> + <annotate key="org.freedesktop.policykit.exec.allow_gui">true</annotate> + </action> +</policyconfig> diff --git a/perl-install/standalone/polkit/org.mageia.drakfont.policy.in b/perl-install/standalone/polkit/org.mageia.drakfont.policy.in new file mode 100644 index 000000000..ab5952d66 --- /dev/null +++ b/perl-install/standalone/polkit/org.mageia.drakfont.policy.in @@ -0,0 +1,22 @@ +<?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/policyconfig.dtd"> +<policyconfig> + + <vendor>Mageia</vendor> + <vendor_url>http://www.mageia.org/</vendor_url> + + <action id="org.mageia.drakfont.pkexec.run"> + <_description>Run Mageia Font Configuration</_description> + <_message>Authentication is required to run Mageia Font Configuration</_message> + <icon_name>drakconf</icon_name> + <defaults> + <allow_any>no</allow_any> + <allow_inactive>no</allow_inactive> + <allow_active>auth_self_keep</allow_active> + </defaults> + <annotate key="org.freedesktop.policykit.exec.path">/usr/libexec/drakfont</annotate> + <annotate key="org.freedesktop.policykit.exec.allow_gui">true</annotate> + </action> +</policyconfig> diff --git a/perl-install/standalone/polkit/org.mageia.drakhardware.policy.in b/perl-install/standalone/polkit/org.mageia.drakhardware.policy.in new file mode 100644 index 000000000..778c96639 --- /dev/null +++ b/perl-install/standalone/polkit/org.mageia.drakhardware.policy.in @@ -0,0 +1,22 @@ +<?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/policyconfig.dtd"> +<policyconfig> + + <vendor>Mageia</vendor> + <vendor_url>http://www.mageia.org/</vendor_url> + + <action id="org.mageia.drakhardware.pkexec.run"> + <_description>Run Mageia Hardware Configuration</_description> + <_message>Authentication is required to run Mageia Hardware Configuration</_message> + <icon_name>drakconf</icon_name> + <defaults> + <allow_any>no</allow_any> + <allow_inactive>no</allow_inactive> + <allow_active>auth_admin_keep</allow_active> + </defaults> + <annotate key="org.freedesktop.policykit.exec.path">/usr/libexec/drakhardware</annotate> + <annotate key="org.freedesktop.policykit.exec.allow_gui">true</annotate> + </action> +</policyconfig> diff --git a/perl-install/standalone/polkit/org.mageia.draklog.policy.in b/perl-install/standalone/polkit/org.mageia.draklog.policy.in new file mode 100644 index 000000000..14af2ddcf --- /dev/null +++ b/perl-install/standalone/polkit/org.mageia.draklog.policy.in @@ -0,0 +1,22 @@ +<?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/policyconfig.dtd"> +<policyconfig> + + <vendor>Mageia</vendor> + <vendor_url>http://www.mageia.org/</vendor_url> + + <action id="org.mageia.draklog.pkexec.run"> + <_description>Run Mageia Log Viewer</_description> + <_message>Authentication is required to run Mageia Log Viewer</_message> + <icon_name>drakconf</icon_name> + <defaults> + <allow_any>no</allow_any> + <allow_inactive>no</allow_inactive> + <allow_active>auth_admin_keep</allow_active> + </defaults> + <annotate key="org.freedesktop.policykit.exec.path">/usr/libexec/draklog</annotate> + <annotate key="org.freedesktop.policykit.exec.allow_gui">true</annotate> + </action> +</policyconfig> diff --git a/perl-install/standalone/polkit/org.mageia.drakperm.policy.in b/perl-install/standalone/polkit/org.mageia.drakperm.policy.in new file mode 100644 index 000000000..87940968a --- /dev/null +++ b/perl-install/standalone/polkit/org.mageia.drakperm.policy.in @@ -0,0 +1,22 @@ +<?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/policyconfig.dtd"> +<policyconfig> + + <vendor>Mageia</vendor> + <vendor_url>http://www.mageia.org/</vendor_url> + + <action id="org.mageia.drakperm.pkexec.run"> + <_description>Run Mageia Security Permissions Configuration</_description> + <_message>Authentication is required to run Mageia Security Permissions Configuration</_message> + <icon_name>drakconf</icon_name> + <defaults> + <allow_any>no</allow_any> + <allow_inactive>no</allow_inactive> + <allow_active>auth_admin_keep</allow_active> + </defaults> + <annotate key="org.freedesktop.policykit.exec.path">/usr/libexec/drakperm</annotate> + <annotate key="org.freedesktop.policykit.exec.allow_gui">true</annotate> + </action> +</policyconfig> diff --git a/perl-install/standalone/polkit/org.mageia.drakscanner.policy.in b/perl-install/standalone/polkit/org.mageia.drakscanner.policy.in new file mode 100644 index 000000000..50c1da552 --- /dev/null +++ b/perl-install/standalone/polkit/org.mageia.drakscanner.policy.in @@ -0,0 +1,22 @@ +<?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/policyconfig.dtd"> +<policyconfig> + + <vendor>Mageia</vendor> + <vendor_url>http://www.mageia.org/</vendor_url> + + <action id="org.mageia.drakscanner.pkexec.run"> + <_description>Run Mageia Scanner Configuration</_description> + <_message>Authentication is required to run Mageia Scanner Configuration</_message> + <icon_name>drakconf</icon_name> + <defaults> + <allow_any>no</allow_any> + <allow_inactive>no</allow_inactive> + <allow_active>auth_admin_keep</allow_active> + </defaults> + <annotate key="org.freedesktop.policykit.exec.path">/usr/libexec/drakscanner</annotate> + <annotate key="org.freedesktop.policykit.exec.allow_gui">true</annotate> + </action> +</policyconfig> diff --git a/perl-install/standalone/polkit/org.mageia.draksec.policy.in b/perl-install/standalone/polkit/org.mageia.draksec.policy.in new file mode 100644 index 000000000..fcec510fe --- /dev/null +++ b/perl-install/standalone/polkit/org.mageia.draksec.policy.in @@ -0,0 +1,22 @@ +<?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/policyconfig.dtd"> +<policyconfig> + + <vendor>Mageia</vendor> + <vendor_url>http://www.mageia.org/</vendor_url> + + <action id="org.mageia.draksec.pkexec.run"> + <_description>Run Mageia Application Security Configuration</_description> + <_message>Authentication is required to run Mageia Application Security Configuration</_message> + <icon_name>drakconf</icon_name> + <defaults> + <allow_any>no</allow_any> + <allow_inactive>no</allow_inactive> + <allow_active>auth_admin_keep</allow_active> + </defaults> + <annotate key="org.freedesktop.policykit.exec.path">/usr/libexec/draksec</annotate> + <annotate key="org.freedesktop.policykit.exec.allow_gui">true</annotate> + </action> +</policyconfig> diff --git a/perl-install/standalone/polkit/org.mageia.draksec.rules b/perl-install/standalone/polkit/org.mageia.draksec.rules new file mode 100644 index 000000000..45a7f0efe --- /dev/null +++ b/perl-install/standalone/polkit/org.mageia.draksec.rules @@ -0,0 +1,11 @@ +polkit.addRule(function(action, subject) { + if (typeof drakToolAuth != "function" || action.id.indexOf("org.mageia.") != 0) + return polkit.Result.NOT_HANDLED; + + var tool = action.id.split(".")[2]; + var rv = drakToolAuth(tool); + if (rv != polkit.Result.NOT_HANDLED) + polkit.log("draksec security policy for '" + tool + "' is overriden to '" + rv + "'"); + return rv; +}); + diff --git a/perl-install/standalone/polkit/org.mageia.drakups.policy.in b/perl-install/standalone/polkit/org.mageia.drakups.policy.in new file mode 100644 index 000000000..31735098d --- /dev/null +++ b/perl-install/standalone/polkit/org.mageia.drakups.policy.in @@ -0,0 +1,22 @@ +<?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/policyconfig.dtd"> +<policyconfig> + + <vendor>Mageia</vendor> + <vendor_url>http://www.mageia.org/</vendor_url> + + <action id="org.mageia.drakups.pkexec.run"> + <_description>Run Mageia UPS Configuration</_description> + <_message>Authentication is required to run Mageia UPS Configuration</_message> + <icon_name>drakconf</icon_name> + <defaults> + <allow_any>no</allow_any> + <allow_inactive>no</allow_inactive> + <allow_active>auth_admin_keep</allow_active> + </defaults> + <annotate key="org.freedesktop.policykit.exec.path">/usr/libexec/drakups</annotate> + <annotate key="org.freedesktop.policykit.exec.allow_gui">true</annotate> + </action> +</policyconfig> diff --git a/perl-install/standalone/polkit/org.mageia.drakxservices.policy.in b/perl-install/standalone/polkit/org.mageia.drakxservices.policy.in new file mode 100644 index 000000000..9c4512a50 --- /dev/null +++ b/perl-install/standalone/polkit/org.mageia.drakxservices.policy.in @@ -0,0 +1,22 @@ +<?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/policyconfig.dtd"> +<policyconfig> + + <vendor>Mageia</vendor> + <vendor_url>http://www.mageia.org/</vendor_url> + + <action id="org.mageia.drakxservices.pkexec.run"> + <_description>Run Mageia Service Configuration</_description> + <_message>Authentication is required to run Mageia Service Configuration</_message> + <icon_name>drakconf</icon_name> + <defaults> + <allow_any>no</allow_any> + <allow_inactive>no</allow_inactive> + <allow_active>auth_admin_keep</allow_active> + </defaults> + <annotate key="org.freedesktop.policykit.exec.path">/usr/libexec/drakxservices</annotate> + <annotate key="org.freedesktop.policykit.exec.allow_gui">true</annotate> + </action> +</policyconfig> |
