aboutsummaryrefslogtreecommitdiffstats
path: root/lib/AdminPanel/Module
diff options
context:
space:
mode:
Diffstat (limited to 'lib/AdminPanel/Module')
-rw-r--r--lib/AdminPanel/Module/LogViewer.pm4
-rw-r--r--lib/AdminPanel/Module/Users.pm7
2 files changed, 6 insertions, 5 deletions
diff --git a/lib/AdminPanel/Module/LogViewer.pm b/lib/AdminPanel/Module/LogViewer.pm
index ec6025dc..28c0d67a 100644
--- a/lib/AdminPanel/Module/LogViewer.pm
+++ b/lib/AdminPanel/Module/LogViewer.pm
@@ -61,6 +61,7 @@ use AdminPanel::Shared::JournalCtl;
use POSIX qw/strftime floor/;
+use English;
use Date::Simple ();
use File::HomeDir qw(home);
@@ -476,8 +477,7 @@ sub _warn_about_user_mode {
"You will not be able to read system logs which you do not have rights to,\n".
"but you may still browse all the others.");
- # $EUID: effective user identifier
- if(($> != 0) and (!$self->sh_gui->ask_OkCancel({title => $title, text => $msg}))) {
+ if(($EUID != 0) and (!$self->sh_gui->ask_OkCancel({title => $title, text => $msg}))) {
# TODO add Privileges?
return 0;
}
diff --git a/lib/AdminPanel/Module/Users.pm b/lib/AdminPanel/Module/Users.pm
index 4e710b30..dbf69620 100644
--- a/lib/AdminPanel/Module/Users.pm
+++ b/lib/AdminPanel/Module/Users.pm
@@ -77,6 +77,7 @@ use USER;
use utf8;
use Sys::Syslog;
use Glib;
+use English;
use yui;
use AdminPanel::Shared::GUI;
use AdminPanel::Shared::Locales;
@@ -141,7 +142,7 @@ sub _USERInitialize {
my $self = shift;
# $EUID: effective user identifier
- if ($> == 0) {
+ if ($EUID == 0) {
return USER::ADMIN->new;
}
@@ -851,7 +852,7 @@ sub addUserDialog {
my $self = shift;
my $standalone = shift;
- if ($> != 0) {
+ if ($EUID != 0) {
$self->sh_gui->warningMsgBox({
title => $self->name,
text => $self->loc->N("root privileges required"),
@@ -2486,7 +2487,7 @@ sub _refreshActions {
sub _manageUsersDialog {
my $self = shift;
- if ($> != 0) {
+ if ($EUID != 0) {
$self->sh_gui->warningMsgBox({
title => $self->name,
text => $self->loc->N("root privileges required"),