From ffd6295009427398b9a97247f082731230992be2 Mon Sep 17 00:00:00 2001 From: Angelo Naselli Date: Wed, 4 Jun 2014 15:43:45 +0200 Subject: added logviewer policy for polkit --- .../org.mageia.policykit.pkexec.adminpanel.policy | 21 --------- extras/polkit/org.mageia.logviewer.policy | 51 ++++++++++++++++++++++ .../org.mageia.policykit.pkexec.adminpanel.policy | 21 +++++++++ lib/AdminPanel/MainDisplay.pm | 1 + 4 files changed, 73 insertions(+), 21 deletions(-) delete mode 100644 extras/org.mageia.policykit.pkexec.adminpanel.policy create mode 100644 extras/polkit/org.mageia.logviewer.policy create mode 100644 extras/polkit/org.mageia.policykit.pkexec.adminpanel.policy diff --git a/extras/org.mageia.policykit.pkexec.adminpanel.policy b/extras/org.mageia.policykit.pkexec.adminpanel.policy deleted file mode 100644 index 78f47d09..00000000 --- a/extras/org.mageia.policykit.pkexec.adminpanel.policy +++ /dev/null @@ -1,21 +0,0 @@ - - - - - Mageia.Org - http://www.mageia.org - - - Allow APanel GUI - Authentication is required to run the program apanel (user=$(user), program=$(program), command_line=$(command_line)) - - no - auth_admin - auth_admin - - /usr/bin/apanel.pl - true - - 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 @@ + + + + + Mageia + http://www.mageia.org/ + + + Run Mageia Log Viewer + Executa el visor de registres de Mageia + Εκτέλεση του Προβολέα Καταγραφών Mageia + Ejecutar el visor de registros + Mageia loginäitaja käivitamine + Visionner les journaux de Mageia + Jalankan Penampil Log Mageia + Start Mageia's Logviewer + Przeglądanie Logów + Execultar Leitor de Log Mageia + Lansează vizualizatorul de fișiere jurnal pentru Mageia + Запуск просмотра журналов + Zagon pregledovalnika dnevnikov Mageje + Mageia Günlük Kaydı Görüntüleyici Çalıştır + Запуск засобу перегляду журналу Mageia + 執行 Mageia 記錄檔檢視器 + Authentication is required to run Mageia Log Viewer + Απαιτείται πιστοποίηση για την εκτέλεση του Προβολέα Καταγραφών Mageia + Se necesita autenticación para ejecutar el visor de registros + Mageia loginäitaja käivitamine nõuab autentimist + Une authentification est nécessaire pour visionner les journaux de Mageia + Otentikasi diperlukan untuk menjalankan Penampil Log Mageia + Authenticatie is nodig om Mageia's Logviewer te starten + Przeglądanie Logów - wymagane uwierzytelnianie + A autenticação é necessária para executar o leitor de Log Mageia + Autentificare necesară pentru lansarea aplicației Mageia de vizualizat fișiere jurnal + Необходима аутентификация для запуска просмотра журналов + Za zagon pregledovalnika dnevnikov Mageje je potrebno overjanje + Mageia Günlük Kaydı Görüntüleyici' yi çalıştırmak için kimlik doğrulama gerekli + Щоб запустити засіб перегляду журналу Mageia, слід пройти розпізнавання + 執行 Mageia 記錄檔檢視器需要認證 + drakconf + + no + no + auth_admin_keep + + /usr/local/bin/logviewer + true + + diff --git a/extras/polkit/org.mageia.policykit.pkexec.adminpanel.policy b/extras/polkit/org.mageia.policykit.pkexec.adminpanel.policy new file mode 100644 index 00000000..78f47d09 --- /dev/null +++ b/extras/polkit/org.mageia.policykit.pkexec.adminpanel.policy @@ -0,0 +1,21 @@ + + + + + Mageia.Org + http://www.mageia.org + + + Allow APanel GUI + Authentication is required to run the program apanel (user=$(user), program=$(program), command_line=$(command_line)) + + no + auth_admin + auth_admin + + /usr/bin/apanel.pl + true + + 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); } -- cgit v1.2.1