mrc0mmand / rpms / libguestfs

Forked from rpms/libguestfs 3 years ago
Clone

Blame SOURCES/0235-v2v-Detect-AVG-Technologies-as-AV-software-RHBZ-1261.patch

ffd6ed
From 2187d79e5537990e5266cca3a2c2f0c91470bf5a Mon Sep 17 00:00:00 2001
ffd6ed
From: "Richard W.M. Jones" <rjones@redhat.com>
ffd6ed
Date: Wed, 9 Sep 2015 13:12:16 +0100
ffd6ed
Subject: [PATCH] v2v: Detect AVG Technologies as AV software (RHBZ#1261436).
ffd6ed
ffd6ed
Thanks: Junqin Zhou
ffd6ed
(cherry picked from commit d68be534eab585916ec829424d072f3ace5a4060)
ffd6ed
---
ffd6ed
 v2v/detect_antivirus.ml | 7 +++++--
ffd6ed
 1 file changed, 5 insertions(+), 2 deletions(-)
ffd6ed
ffd6ed
diff --git a/v2v/detect_antivirus.ml b/v2v/detect_antivirus.ml
ffd6ed
index 747b225..545bd29 100644
ffd6ed
--- a/v2v/detect_antivirus.ml
ffd6ed
+++ b/v2v/detect_antivirus.ml
ffd6ed
@@ -23,17 +23,20 @@ let rex_kaspersky = Str.regexp_case_fold "kaspersky"
ffd6ed
 let rex_mcafee    = Str.regexp_case_fold "mcafee"
ffd6ed
 let rex_norton    = Str.regexp_case_fold "norton"
ffd6ed
 let rex_sophos    = Str.regexp_case_fold "sophos"
ffd6ed
+let rex_avg_tech  = Str.regexp_case_fold "avg technologies" (* RHBZ#1261436 *)
ffd6ed
 
ffd6ed
 let rec detect_antivirus { Types.i_type = t; i_apps = apps } =
ffd6ed
   assert (t = "windows");
ffd6ed
   List.exists check_app apps
ffd6ed
 
ffd6ed
-and check_app { Guestfs.app2_name = name } =
ffd6ed
+and check_app { Guestfs.app2_name = name;
ffd6ed
+                app2_publisher = publisher } =
ffd6ed
   name      =~ rex_virus     ||
ffd6ed
   name      =~ rex_kaspersky ||
ffd6ed
   name      =~ rex_mcafee    ||
ffd6ed
   name      =~ rex_norton    ||
ffd6ed
-  name      =~ rex_sophos
ffd6ed
+  name      =~ rex_sophos    ||
ffd6ed
+  publisher =~ rex_avg_tech
ffd6ed
 
ffd6ed
 and (=~) str rex =
ffd6ed
   try ignore (Str.search_forward rex str 0); true with Not_found -> false
ffd6ed
-- 
ffd6ed
1.8.3.1
ffd6ed