aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAngelo Naselli <angelo.naselli@softeco.it>2014-06-04 15:43:45 +0200
committerAngelo Naselli <angelo.naselli@softeco.it>2014-06-04 15:43:45 +0200
commitffd6295009427398b9a97247f082731230992be2 (patch)
treebbc384760c299231fd0ac2fe1fbb027aeaaae7f6
parent6161a899e3003be84a4d50f5e7f7dadf4f7d84f3 (diff)
downloadmanatools-ffd6295009427398b9a97247f082731230992be2.tar
manatools-ffd6295009427398b9a97247f082731230992be2.tar.gz
manatools-ffd6295009427398b9a97247f082731230992be2.tar.bz2
manatools-ffd6295009427398b9a97247f082731230992be2.tar.xz
manatools-ffd6295009427398b9a97247f082731230992be2.zip
added logviewer policy for polkit
-rw-r--r--extras/polkit/org.mageia.logviewer.policy51
-rw-r--r--extras/polkit/org.mageia.policykit.pkexec.adminpanel.policy (renamed from extras/org.mageia.policykit.pkexec.adminpanel.policy)0
-rw-r--r--lib/AdminPanel/MainDisplay.pm1
3 files changed, 52 insertions, 0 deletions
diff --git a/extras/polkit/org.mageia.logviewer.policy b/extras/polkit/org.mageia.logviewer.policy
new file mode 100644
index 00000000..ab35808a
--- /dev/null
+++ b/extras/polkit/org.mageia.logviewer.policy
@@ -0,0 +1,51 @@
+<?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.logviewer.pkexec.run">
+ <description>Run Mageia Log Viewer</description>
+ <description xml:lang="ca">Executa el visor de registres de Mageia</description>
+ <description xml:lang="el">Εκτέλεση του Προβολέα Καταγραφών Mageia</description>
+ <description xml:lang="es">Ejecutar el visor de registros</description>
+ <description xml:lang="et">Mageia loginäitaja käivitamine</description>
+ <description xml:lang="fr">Visionner les journaux de Mageia</description>
+ <description xml:lang="id">Jalankan Penampil Log Mageia</description>
+ <description xml:lang="nl">Start Mageia's Logviewer</description>
+ <description xml:lang="pl">Przeglądanie Logów</description>
+ <description xml:lang="pt_BR">Execultar Leitor de Log Mageia</description>
+ <description xml:lang="ro">Lansează vizualizatorul de fișiere jurnal pentru Mageia</description>
+ <description xml:lang="ru">Запуск просмотра журналов</description>
+ <description xml:lang="sl">Zagon pregledovalnika dnevnikov Mageje</description>
+ <description xml:lang="tr">Mageia Günlük Kaydı Görüntüleyici Çalıştır</description>
+ <description xml:lang="uk">Запуск засобу перегляду журналу Mageia</description>
+ <description xml:lang="zh_TW">執行 Mageia 記錄檔檢視器</description>
+ <message>Authentication is required to run Mageia Log Viewer</message>
+ <message xml:lang="el">Απαιτείται πιστοποίηση για την εκτέλεση του Προβολέα Καταγραφών Mageia</message>
+ <message xml:lang="es">Se necesita autenticación para ejecutar el visor de registros</message>
+ <message xml:lang="et">Mageia loginäitaja käivitamine nõuab autentimist</message>
+ <message xml:lang="fr">Une authentification est nécessaire pour visionner les journaux de Mageia</message>
+ <message xml:lang="id">Otentikasi diperlukan untuk menjalankan Penampil Log Mageia</message>
+ <message xml:lang="nl">Authenticatie is nodig om Mageia's Logviewer te starten</message>
+ <message xml:lang="pl">Przeglądanie Logów - wymagane uwierzytelnianie</message>
+ <message xml:lang="pt_BR">A autenticação é necessária para executar o leitor de Log Mageia</message>
+ <message xml:lang="ro">Autentificare necesară pentru lansarea aplicației Mageia de vizualizat fișiere jurnal</message>
+ <message xml:lang="ru">Необходима аутентификация для запуска просмотра журналов</message>
+ <message xml:lang="sl">Za zagon pregledovalnika dnevnikov Mageje je potrebno overjanje</message>
+ <message xml:lang="tr">Mageia Günlük Kaydı Görüntüleyici' yi çalıştırmak için kimlik doğrulama gerekli</message>
+ <message xml:lang="uk">Щоб запустити засіб перегляду журналу Mageia, слід пройти розпізнавання</message>
+ <message xml:lang="zh_TW">執行 Mageia 記錄檔檢視器需要認證</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/local/bin/logviewer</annotate>
+ <annotate key="org.freedesktop.policykit.exec.allow_gui">true</annotate>
+ </action>
+</policyconfig>
diff --git a/extras/org.mageia.policykit.pkexec.adminpanel.policy b/extras/polkit/org.mageia.policykit.pkexec.adminpanel.policy
index 78f47d09..78f47d09 100644
--- a/extras/org.mageia.policykit.pkexec.adminpanel.policy
+++ b/extras/polkit/org.mageia.policykit.pkexec.adminpanel.policy
diff --git a/lib/AdminPanel/MainDisplay.pm b/lib/AdminPanel/MainDisplay.pm
index 23c435eb..784d006e 100644
--- a/lib/AdminPanel/MainDisplay.pm
+++ b/lib/AdminPanel/MainDisplay.pm
@@ -378,6 +378,7 @@ sub _loadSettings {
my ($self, $force_load) = @_;
# configuration file name
my $fileName = "$self->{confDir}/settings.conf";
+ die "Configuration file missing" if (! -e $fileName);
if (!$self->{settings} || $force_load) {
$self->{settings} = new AdminPanel::SettingsReader($fileName);
}