[mate-system-tools] 17/20: pkexec wrappers: Execute MATE System Tools components via pkexec wrappers on Debian.
Mike Gabriel
sunweaver at debian.org
Sat Oct 25 07:59:33 UTC 2014
This is an automated email from the git hooks/post-receive script.
sunweaver pushed a commit to branch master
in repository mate-system-tools.
commit 96fde3df5f44cb1794f22701f8929bafb64ce29e
Author: Mike Gabriel <mike.gabriel at das-netzwerkteam.de>
Date: Sat Oct 25 04:31:53 2014 +0200
pkexec wrappers: Execute MATE System Tools components via pkexec wrappers on Debian.
---
debian/bin/mate-network-admin-pkexec | 2 +
debian/bin/mate-services-admin-pkexec | 2 +
debian/bin/mate-shares-admin-pkexec | 2 +
debian/bin/mate-time-admin-pkexec | 2 +
debian/mate-system-tools-common.install | 1 +
debian/mate-system-tools.install | 1 +
debian/mate-system-tools.links | 4 ++
debian/org.debian.pkexec.mate-system-tools.policy | 55 +++++++++++++++++++++++
debian/patches/2003_launch-pkexec-wrappers.patch | 47 +++++++++++++++++++
debian/patches/series | 1 +
10 files changed, 117 insertions(+)
diff --git a/debian/bin/mate-network-admin-pkexec b/debian/bin/mate-network-admin-pkexec
new file mode 100644
index 0000000..43aecca
--- /dev/null
+++ b/debian/bin/mate-network-admin-pkexec
@@ -0,0 +1,2 @@
+#!/bin/sh
+pkexec "/usr/bin/mate-network-admin" "$@"
\ No newline at end of file
diff --git a/debian/bin/mate-services-admin-pkexec b/debian/bin/mate-services-admin-pkexec
new file mode 100644
index 0000000..769f2ce
--- /dev/null
+++ b/debian/bin/mate-services-admin-pkexec
@@ -0,0 +1,2 @@
+#!/bin/sh
+pkexec "/usr/bin/mate-services-admin" "$@"
\ No newline at end of file
diff --git a/debian/bin/mate-shares-admin-pkexec b/debian/bin/mate-shares-admin-pkexec
new file mode 100644
index 0000000..d180f0b
--- /dev/null
+++ b/debian/bin/mate-shares-admin-pkexec
@@ -0,0 +1,2 @@
+#!/bin/sh
+pkexec "/usr/bin/mate-shares-admin" "$@"
\ No newline at end of file
diff --git a/debian/bin/mate-time-admin-pkexec b/debian/bin/mate-time-admin-pkexec
new file mode 100644
index 0000000..3958694
--- /dev/null
+++ b/debian/bin/mate-time-admin-pkexec
@@ -0,0 +1,2 @@
+#!/bin/sh
+pkexec "/usr/bin/mate-time-admin" "$@"
\ No newline at end of file
diff --git a/debian/mate-system-tools-common.install b/debian/mate-system-tools-common.install
index 599e888..1222948 100644
--- a/debian/mate-system-tools-common.install
+++ b/debian/mate-system-tools-common.install
@@ -3,3 +3,4 @@ usr/share/glib-2.0/
usr/share/icons/
usr/share/locale/
usr/share/mate-system-tools/
+debian/org.debian.pkexec.mate-system-tools.policy /usr/share/polkit-1/actions/
diff --git a/debian/mate-system-tools.install b/debian/mate-system-tools.install
index cb26810..53cc603 100644
--- a/debian/mate-system-tools.install
+++ b/debian/mate-system-tools.install
@@ -1,3 +1,4 @@
usr/bin
+debian/bin/* usr/bin/
usr/lib
usr/share/applications
\ No newline at end of file
diff --git a/debian/mate-system-tools.links b/debian/mate-system-tools.links
new file mode 100644
index 0000000..84c53c8
--- /dev/null
+++ b/debian/mate-system-tools.links
@@ -0,0 +1,4 @@
+usr/share/man/man1/mate-time-admin.1.gz usr/share/man/man1/mate-time-admin-pkexec.1.gz
+usr/share/man/man1/mate-services-admin.1.gz usr/share/man/man1/mate-services-admin-pkexec.1.gz
+usr/share/man/man1/mate-shares-admin.1.gz usr/share/man/man1/mate-shares-admin-pkexec.1.gz
+usr/share/man/man1/mate-network-admin.1.gz usr/share/man/man1/mate-network-admin-pkexec.1.gz
\ No newline at end of file
diff --git a/debian/org.debian.pkexec.mate-system-tools.policy b/debian/org.debian.pkexec.mate-system-tools.policy
new file mode 100644
index 0000000..55ac24e
--- /dev/null
+++ b/debian/org.debian.pkexec.mate-system-tools.policy
@@ -0,0 +1,55 @@
+<?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>
+
+ <action id="org.debian.mate-time-admin.imc">
+ <message>Authentication is required to run the MATE System Tools (time-admin)</message>
+ <icon_name>time-admin</icon_name>
+ <defaults>
+ <allow_any>auth_admin</allow_any>
+ <allow_inactive>auth_admin</allow_inactive>
+ <allow_active>auth_admin</allow_active>
+ </defaults>
+ <annotate key="org.freedesktop.policykit.exec.path">/usr/bin/mate-time-admin</annotate>
+ <annotate key="org.freedesktop.policykit.exec.allow_gui">true</annotate>
+ </action>
+
+ <action id="org.debian.mate-network-admin.imc">
+ <message>Authentication is required to run the MATE System Tools (network-admin)</message>
+ <icon_name>preferences-system-network</icon_name>
+ <defaults>
+ <allow_any>auth_admin</allow_any>
+ <allow_inactive>auth_admin</allow_inactive>
+ <allow_active>auth_admin</allow_active>
+ </defaults>
+ <annotate key="org.freedesktop.policykit.exec.path">/usr/bin/mate-network-admin</annotate>
+ <annotate key="org.freedesktop.policykit.exec.allow_gui">true</annotate>
+ </action>
+
+ <action id="org.debian.mate-services-admin.imc">
+ <message>Authentication is required to run the MATE System Tools (services-admin)</message>
+ <icon_name>network-server</icon_name>
+ <defaults>
+ <allow_any>auth_admin</allow_any>
+ <allow_inactive>auth_admin</allow_inactive>
+ <allow_active>auth_admin</allow_active>
+ </defaults>
+ <annotate key="org.freedesktop.policykit.exec.path">/usr/bin/mate-services-admin</annotate>
+ <annotate key="org.freedesktop.policykit.exec.allow_gui">true</annotate>
+ </action>
+
+ <action id="org.debian.mate-shares-admin.imc">
+ <message>Authentication is required to run the MATE System Tools (shares-admin)</message>
+ <icon_name>folder-remote</icon_name>
+ <defaults>
+ <allow_any>auth_admin</allow_any>
+ <allow_inactive>auth_admin</allow_inactive>
+ <allow_active>auth_admin</allow_active>
+ </defaults>
+ <annotate key="org.freedesktop.policykit.exec.path">/usr/bin/mate-shares-admin</annotate>
+ <annotate key="org.freedesktop.policykit.exec.allow_gui">true</annotate>
+ </action>
+
+</policyconfig>
diff --git a/debian/patches/2003_launch-pkexec-wrappers.patch b/debian/patches/2003_launch-pkexec-wrappers.patch
new file mode 100644
index 0000000..403d234
--- /dev/null
+++ b/debian/patches/2003_launch-pkexec-wrappers.patch
@@ -0,0 +1,47 @@
+Description: Launch pkexec wrappers instead of launching directly
+Author: Mike Gabriel <mike.gabriel at das-netzwerkteam.de>
+
+--- a/src/network/mate-network.desktop.in.in
++++ b/src/network/mate-network.desktop.in.in
+@@ -2,7 +2,7 @@
+ Version=1.0
+ _Name=Network
+ _Comment=Configure network devices and connections
+-Exec=mate-network-admin
++Exec=mate-network-admin-pkexec
+ Icon=preferences-system-network
+ Terminal=false
+ Type=Application
+--- a/src/services/mate-services.desktop.in.in
++++ b/src/services/mate-services.desktop.in.in
+@@ -2,7 +2,7 @@
+ Version=1.0
+ _Name=Services
+ _Comment=Configure which services will be run when the system starts
+-Exec=mate-services-admin
++Exec=mate-services-admin-pkexec
+ Icon=network-server
+ Terminal=false
+ Type=Application
+--- a/src/shares/mate-shares.desktop.in.in
++++ b/src/shares/mate-shares.desktop.in.in
+@@ -2,7 +2,7 @@
+ Version=1.0
+ _Name=Shared Folders
+ _Comment=Configure which folders are available for your network neighborhood
+-Exec=mate-shares-admin
++Exec=mate-shares-admin-pkexec
+ Icon=folder-remote
+ Terminal=false
+ Type=Application
+--- a/src/time/mate-time.desktop.in.in
++++ b/src/time/mate-time.desktop.in.in
+@@ -2,7 +2,7 @@
+ Version=1.0
+ _Name=Time and Date
+ _Comment=Change system time, date, and timezone
+-Exec=mate-time-admin
++Exec=mate-time-admin-pkexec
+ Icon=time-admin
+ Terminal=false
+ Type=Application
diff --git a/debian/patches/series b/debian/patches/series
index 2dd24d3..9e9cbab 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -2,3 +2,4 @@
1003_use-NotShowIn-instead-of-OnlyShowIn.patch
2001_omit-gfdl-licensed-doc-files.patch
2002_fix-pkgconfig-bad-directive.patch
+2003_launch-pkexec-wrappers.patch
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-mate/mate-system-tools.git
More information about the pkg-mate-commits
mailing list