Blame SOURCES/0013-Analyzer-Ensure-parsed-id-contains-digit.patch

1c5238
From 89ea4a5feaf30f80a79ca3ba8166f304cc414e07 Mon Sep 17 00:00:00 2001
1c5238
From: Justin Stephenson <jstephen@redhat.com>
1c5238
Date: Tue, 15 Nov 2022 12:47:51 -0500
1c5238
Subject: [PATCH] Analyzer: Ensure parsed id contains digit
1c5238
MIME-Version: 1.0
1c5238
Content-Type: text/plain; charset=UTF-8
1c5238
Content-Transfer-Encoding: 8bit
1c5238
1c5238
In analyzer list verbose output, we parse the last field of cache_req_search_send() lines.
1c5238
Certain log messages need to be filtered out by ensuring the parsed field is
1c5238
a digit, such as the last line below.
1c5238
1c5238
[cache_req_search_send] (0x0400): [CID#1] CR #1: Looking up GID:1031401119@testrealm.test
1c5238
[cache_req_search_send] (0x0400): [CID#1] CR #1: Looking up GID:1031401119@testrealm.test
1c5238
[cache_req_search_send] (0x0400): [CID#1] CR #1: Looking up GID:1031401119@domain-zflo.com
1c5238
[cache_req_search_send] (0x0400): [CID#1] CR #1: Returning [GID:1031401119@domain-zflo.com] from cache
1c5238
1c5238
Reviewed-by: Iker Pedrosa <ipedrosa@redhat.com>
1c5238
Reviewed-by: Tomáš Halman <thalman@redhat.com>
1c5238
(cherry picked from commit bfa8d50c479cf8ef7b299eb5848309a3a9ea7f12)
1c5238
1c5238
Reviewed-by: Iker Pedrosa <ipedrosa@redhat.com>
1c5238
Reviewed-by: Tomáš Halman <thalman@redhat.com>
1c5238
---
1c5238
 src/tools/analyzer/modules/request.py | 2 +-
1c5238
 1 file changed, 1 insertion(+), 1 deletion(-)
1c5238
1c5238
diff --git a/src/tools/analyzer/modules/request.py b/src/tools/analyzer/modules/request.py
1c5238
index 15c8e6bfb..bf279ea75 100644
1c5238
--- a/src/tools/analyzer/modules/request.py
1c5238
+++ b/src/tools/analyzer/modules/request.py
1c5238
@@ -214,7 +214,7 @@ class RequestAnalyzer:
1c5238
                         print("       - " + name[:-1])
1c5238
                         cr_done.append(cr)
1c5238
                 if (id and ("UID" in cidline or "GID" in cidline)):
1c5238
-                    if id not in id_done:
1c5238
+                    if id not in id_done and bool(re.search(r'\d', id)):
1c5238
                         print("       - " + id)
1c5238
                         id_done.append(id)
1c5238
 
1c5238
-- 
1c5238
2.37.3
1c5238