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

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