Skip to content
Snippets Groups Projects
Commit e7e5062c authored by Tomáš Plesník's avatar Tomáš Plesník
Browse files

vracena kontrola na rootu kvuli zjistovani udaju z OS pomoci nastroju pro roota

parent 3a488a4a
No related branches found
No related tags found
Loading
......@@ -52,6 +52,12 @@ if ($help) {
usage;
}
# superuser controle
my $UID = $<;
if ($UID != 0) {
WardenCommon::errMsg("You must be root for running this script!");
}
# connect to DB
our $DBH = DBI->connect("DBI:mysql:database=$WardenCommon::DB_NAME;host=$WardenCommon::DB_HOST", $WardenCommon::DB_USER, $WardenCommon::DB_PASS, {RaiseError => 1, mysql_auto_reconnect => 1})
|| die "Could not connect to database: $DBI::errstr";
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment