From 195ea913dfd4f4140727d5e92ab9c42eac49a4fc Mon Sep 17 00:00:00 2001 From: iliajie Date: Wed, 5 Jul 2023 12:06:47 +0300 Subject: [PATCH] Fix logic to check if `/dev/urandom` is allowed https://github.com/webmin/webmin/commit/1bc262481db121138b031e533d903ab1782c1b22#commitcomment-120432005 --- bind8/bind8-lib.pl | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/bind8/bind8-lib.pl b/bind8/bind8-lib.pl index d53cfb6c6..6d1a1a082 100755 --- a/bind8/bind8-lib.pl +++ b/bind8/bind8-lib.pl @@ -65,10 +65,10 @@ our @dnssec_dlv_key = ( 257, 3, 5, '"BEAAAAPHMu/5onzrEE7z1egmhg/WPO0+juoZrW3euWE my $rand_flag; if ($gconfig{'os_type'} =~ /-linux$/ && + $config{'force_random'} eq '0' && -r "/dev/urandom" && - !$config{'force_random'} && - $bind_version && - &compare_version_numbers($bind_version, '9.14') < 0) { + $bind_version =~ /^9\./ && + &compare_version_numbers($bind_version, '<', '9.14.2')) { # Version: 9.14.2 deprecated the use of -r option # in favor of using /dev/random [bugs:#5370] $rand_flag = "-r /dev/urandom";