From 593e1a7ea764dd5110dcddda0e6a120c2cd2640f Mon Sep 17 00:00:00 2001 From: Jordi Sanfeliu Date: Mon, 19 Mar 2018 12:30:29 +0100 Subject: [PATCH] fixed in 'zfs.pm' the way how is collected pool's data --- Changes | 4 +++- lib/zfs.pm | 6 +++--- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/Changes b/Changes index b5b6348..78318a9 100644 --- a/Changes +++ b/Changes @@ -23,7 +23,7 @@ - Fixed to limit the length of the device names in 'fs.pm'. - Fixed a missing gap colouring in some zoomed graphs of 'system.pm'. - Fixed to save missing values as 'unknown' in 'apcupsd.pm'. [#201] -- Fixed XSS vulnerability in CGI variables. [#203] +- Fixed a XSS vulnerability in CGI variables. [#203] (thanks to Sebastian Gilon from http://testarmy.com/, who pointed this out) - Fixed to check if setgid() and setuid() functions were successful before starting the HTTP built-in. @@ -32,6 +32,8 @@ (thanks to Sander Bos for pointing this out) - Fixed to set permissions 0600 to log files. (thanks to Sander Bos for pointing this out) +- Fixed in 'zfs.pm' the way how is collected pool's data. + (thanks to Derek Dongray, derek AT valedon.co.uk) 3.10.0 - 25-Sep-2017 diff --git a/lib/zfs.pm b/lib/zfs.pm index b333411..075b047 100644 --- a/lib/zfs.pm +++ b/lib/zfs.pm @@ -257,9 +257,9 @@ sub zfs_update { if($pool) { my @zpool; - $free = trim(`zfs get -rHp -o value available $pool`); - $udata = trim(`zfs get -rHp -o value used $pool`); - $usnap = trim(`zfs get -rHp -o value usedbysnapshots $pool`); + $free = trim(`zfs get -Hp -o value available $pool`); + $udata = trim(`zfs get -Hp -o value used $pool`); + $usnap = eval join('+',`zfs get -rHp -o value usedbysnapshots -tfilesystem $pool`); @zpool = split(' ', `zpool list -H $pool` || ""); if(scalar(@zpool) == 10) { # ZFS version 0.6.4+