Skip to content

Commit c96d542

Browse files
author
A. Täffner
committed
removed unneeded db permission and enhanced error handling on low entropy
1 parent 204521a commit c96d542

File tree

2 files changed

+3
-8
lines changed

2 files changed

+3
-8
lines changed

install/lib/installer_base.lib.php

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -667,13 +667,6 @@ public function grant_master_database_rights($verbose = false) {
667667
$this->warning('Unable to set rights of user in master database: '.$value['db']."\n Query: ".$query."\n Error: ".$this->dbmaster->errorMessage);
668668
}
669669

670-
$query = "GRANT SELECT, UPDATE ON ?? TO ?@?";
671-
if ($verbose){
672-
echo $query ."\n";
673-
}
674-
if(!$this->dbmaster->query($query, $value['db'] . '.dns_rr', $value['user'], $host)) {
675-
$this->warning('Unable to set rights of user in master database: '.$value['db']."\n Query: ".$query."\n Error: ".$this->dbmaster->errorMessage);
676-
}
677670
}
678671

679672
}

server/plugins-available/bind_plugin.inc.php

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,8 @@ function soa_dnssec_create(&$data) {
9494

9595
//* Check Entropy
9696
if (file_get_contents('/proc/sys/kernel/random/entropy_avail') < 400) {
97-
$app->log('DNSSEC ERROR: We are low on entropy. Not generating new Keys for '.$domain.'. Please consider installing package haveged.', LOGLEVEL_WARN);
97+
$app->log('DNSSEC WARNING: We are low on entropy. This could cause server script to fail. Please consider installing package haveged.', LOGLEVEL_WARN);
98+
echo "DNSSEC WARNING: We are low on entropy. This could cause server script to fail. Please consider installing package haveged.\n"
9899
return false;
99100
}
100101

@@ -179,6 +180,7 @@ function soa_dnssec_update(&$data, $new=false) {
179180
//* Check for available entropy
180181
if (file_get_contents('/proc/sys/kernel/random/entropy_avail') < 200) {
181182
$app->log('DNSSEC ERROR: We are low on entropy. This could cause server script to fail. Please consider installing package haveged.', LOGLEVEL_ERR);
183+
echo "DNSSEC ERROR: We are low on entropy. This could cause server script to fail. Please consider installing package haveged.\n"
182184
return false;
183185
}
184186

0 commit comments

Comments
 (0)