aboutsummaryrefslogtreecommitdiffstats
path: root/meta-networking/recipes-protocols/frr/frr/CVE-2022-42917.patch
blob: 73493bb12015ed04993be91a6faa3355f250ebc7 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
From 5216a05b32390a64efeb598051411e1776042624 Mon Sep 17 00:00:00 2001
From: Marius Tomaschewski <mt@suse.com>
Date: Fri, 11 Nov 2022 12:26:04 +0100
Subject: [PATCH] tools: remove backslash from declare check regex

The backslash in `grep -q '^declare \-a'` is not needed and
causes `grep: warning: stray \ before -` warning in grep-3.8.

Signed-off-by: Marius Tomaschewski <mt@suse.com>

CVE: CVE-2022-42917

Upstream-Status: Backport
[https://github.com/FRRouting/frr/commit/5216a05b32390a64efeb598051411e1776042624]

Signed-off-by: Yi Zhao <yi.zhao@windriver.com>
---
 tools/frrcommon.sh.in | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/tools/frrcommon.sh.in b/tools/frrcommon.sh.in
index 61f1abb37..3c16c27c6 100755
--- a/tools/frrcommon.sh.in
+++ b/tools/frrcommon.sh.in
@@ -335,7 +335,7 @@ if [ -z "$FRR_PATHSPACE" ]; then
 	load_old_config "/etc/sysconfig/frr"
 fi
 
-if { declare -p watchfrr_options 2>/dev/null || true; } | grep -q '^declare \-a'; then
+if { declare -p watchfrr_options 2>/dev/null || true; } | grep -q '^declare -a'; then
 	log_warning_msg "watchfrr_options contains a bash array value." \
 		"The configured value is intentionally ignored since it is likely wrong." \
 		"Please remove or fix the setting."
-- 
2.25.1