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

odstranena kontrola na roota

parent 69f0c012
No related branches found
No related tags found
No related merge requests found
......@@ -51,12 +51,6 @@ 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";
......
......@@ -52,12 +52,6 @@ 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";
......
......@@ -96,12 +96,6 @@ if ($ip_net_client !~ /^(([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\.){3}(
WardenCommon::errMsg("Enter correct IP address in CIDR format!");
}
# superuser controle
my $UID = $<;
if ($UID != 0) {
WardenCommon::errMsg("You must be root for running this script!");
}
# check parameters definition
switch () {
case {!defined $hostname} {WardenCommon::errMsg("Parameter 'hostname' is not defined!")}
......
......@@ -95,12 +95,6 @@ if ($ip_net_client !~ /^(([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\.){3}(
WardenCommon::errMsg("Enter correct IP in CIDR format!");
}
# superuser controle
my $UID = $<;
if ($UID != 0) {
WardenCommon::errMsg("You must be root for running this script!");
}
# check parameters definition
switch () {
case {!defined $hostname} {WardenCommon::errMsg("Parameter 'hostname' is not defined!")}
......
......@@ -82,12 +82,6 @@ if ($help) {
help;
}
# superuser controle
my $UID = $<;
if ($UID != 0) {
WardenCommon::errMsg("You must be root for running this script!");
}
# check parameters definition
if (!defined $client_id) {
WardenCommon::errMsg("Parameter 'client_id' is not defined!");
......
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