[pve-devel] [PATCH proxmox-ve v3 2/3] apt-hook: verify that fd is numeric

Stoiko Ivanov s.ivanov at proxmox.com
Fri Feb 11 16:15:46 CET 2022


since we read it from the environment

Co-authored-by: Fabian Grünbichler <f.gruenbichler at proxmox.com>
Signed-off-by: Stoiko Ivanov <s.ivanov at proxmox.com>
---
 debian/apthook/pve-apt-hook | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/debian/apthook/pve-apt-hook b/debian/apthook/pve-apt-hook
index 2053fef..8fa58c5 100755
--- a/debian/apthook/pve-apt-hook
+++ b/debian/apthook/pve-apt-hook
@@ -15,7 +15,7 @@ my $log = sub {
   print "W: ($hook_name) $line";
 };
 
-if (!defined $fd || $fd == 0) {
+if (!defined $fd || $fd == 0 || $fd !~ /^\d+$/) {
   $log->("APT_HOOK_INFO_FD not correctly defined, skipping apt-pve-hook checks\n");
   exit 0;
 }
-- 
2.30.2






More information about the pve-devel mailing list