summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--NEWS1
-rwxr-xr-xdraklive-install2
-rw-r--r--draklive-install.desktop.in2
-rwxr-xr-xdraklive-install.wrapper6
-rw-r--r--mageia-draklive-install.desktop.in2
-rw-r--r--org.mageia.draklive-install-lock-storage.policy22
-rw-r--r--org.mageia.draklive-install.policy22
7 files changed, 55 insertions, 2 deletions
diff --git a/NEWS b/NEWS
index 92d88c0..19bf906 100644
--- a/NEWS
+++ b/NEWS
@@ -1,3 +1,4 @@
+- use polkit instead of consolehelper to gain root access
- drop useless reboot in xsetup
2.7
diff --git a/draklive-install b/draklive-install
index 42ac2f1..1a941a5 100755
--- a/draklive-install
+++ b/draklive-install
@@ -343,6 +343,8 @@ sub clean_live_system_hds() {
sub finish_installation {
my ($fstab) = @_;
+ #- remove the extra authorisation draklive added
+ run_program::rooted($::prefix, 'sed', '-i', '/for draklive-install/d', '/etc/pam.d/polkit-1');
sync_logs();
#- cleanly umount here, it will avoid fs journals to be corrupted after a hackish reboot
umount_all($fstab);
diff --git a/draklive-install.desktop.in b/draklive-install.desktop.in
index 2777431..b3c2332 100644
--- a/draklive-install.desktop.in
+++ b/draklive-install.desktop.in
@@ -1,6 +1,6 @@
[Desktop Entry]
Encoding=UTF-8
-Exec=/usr/bin/draklive-install-lock-storage
+Exec=/usr/bin/draklive-install
Icon=draklive-install
Terminal=false
Type=Application
diff --git a/draklive-install.wrapper b/draklive-install.wrapper
new file mode 100755
index 0000000..5a8f4eb
--- /dev/null
+++ b/draklive-install.wrapper
@@ -0,0 +1,6 @@
+#!/bin/sh
+if [[ "$UID" != "0" ]] ; then
+ /usr/bin/pkexec /usr/sbin/draklive-install-lock-storage "$@"
+ exit $?
+fi
+exec /usr/sbin/draklive-install-lock-storage "$@"
diff --git a/mageia-draklive-install.desktop.in b/mageia-draklive-install.desktop.in
index f935973..f9290e2 100644
--- a/mageia-draklive-install.desktop.in
+++ b/mageia-draklive-install.desktop.in
@@ -2,7 +2,7 @@
Encoding=UTF-8
_Name=Install on Hard Disk
_Comment=Install your Mageia live system to disk
-Exec=/usr/bin/draklive-install-lock-storage
+Exec=/usr/bin/draklive-install
Icon=draklive-install
Terminal=false
Type=Application
diff --git a/org.mageia.draklive-install-lock-storage.policy b/org.mageia.draklive-install-lock-storage.policy
new file mode 100644
index 0000000..a73282f
--- /dev/null
+++ b/org.mageia.draklive-install-lock-storage.policy
@@ -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.draklive-install-lock-storage.pkexec.run">
+ <description>Run draklive-install</description>
+ <message>Authentication is required to run Mageia Draklive Installer</message>
+ <icon_name>draklive-install</icon_name>
+ <defaults>
+ <allow_any>yes</allow_any>
+ <allow_inactive>no</allow_inactive>
+ <allow_active>yes</allow_active>
+ </defaults>
+ <annotate key="org.freedesktop.policykit.exec.path">/usr/sbin/draklive-install-lock-storage</annotate>
+ <annotate key="org.freedesktop.policykit.exec.allow_gui">true</annotate>
+ </action>
+</policyconfig>
diff --git a/org.mageia.draklive-install.policy b/org.mageia.draklive-install.policy
new file mode 100644
index 0000000..dccc272
--- /dev/null
+++ b/org.mageia.draklive-install.policy
@@ -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.draklive-install.pkexec.run">
+ <description>Run draklive-install</description>
+ <message>Authentication is required to run Mageia Draklive Installer</message>
+ <icon_name>draklive-install</icon_name>
+ <defaults>
+ <allow_any>yes</allow_any>
+ <allow_inactive>no</allow_inactive>
+ <allow_active>yes</allow_active>
+ </defaults>
+ <annotate key="org.freedesktop.policykit.exec.path">/usr/sbin/draklive-install</annotate>
+ <annotate key="org.freedesktop.policykit.exec.allow_gui">true</annotate>
+ </action>
+</policyconfig>