security-tool/fix-function-allow-rpm-q.patch

26 lines
697 B
Diff
Raw Normal View History

From ec749d9a85c709779dd0862fdaf8d938ae76a12f Mon Sep 17 00:00:00 2001
From: zhengxiaoxiao <zhengxiaoxiao2@huawei.com>
Date: Mon, 27 Jun 2022 19:58:34 +0800
Subject: [PATCH] fix function allow rpm-q
---
security-tool.sh | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/security-tool.sh b/security-tool.sh
index e8619f5..0877081 100644
--- a/security-tool.sh
+++ b/security-tool.sh
@@ -687,7 +687,7 @@ function fn_handle_allow()
local prename=$2
local ret=0
- rpm -q "$rpmname"
+ chroot $ROOTFS rpm -q "$rpmname"
if [ $? -eq 0 ]; then
local denyfile="$ROOTFS/etc/$prename.deny"
local allowfile="$ROOTFS/etc/$prename.allow"
--
1.8.3.1