after executing hook scripts, remove their executable permission of non root users

Signed-off-by: Qiumiao Zhang <zhangqiumiao1@huawei.com>
This commit is contained in:
Qiumiao Zhang 2022-12-19 10:47:52 +08:00
parent d9573933f2
commit 53c8cb268a
2 changed files with 35 additions and 2 deletions

View File

@ -0,0 +1,26 @@
From 2aa0a7ccd957307f098b4a36e4e55a37d512204a Mon Sep 17 00:00:00 2001
From: Qiumiao Zhang <zhangqiumiao1@huawei.com>
Date: Mon, 19 Dec 2022 10:43:12 +0800
Subject: [PATCH] remove the executable permission of non root users from hook
scripts
Signed-off-by: Qiumiao Zhang <zhangqiumiao1@huawei.com>
---
usr/Euler/project/util/CommonFunction | 1 +
1 file changed, 1 insertion(+)
diff --git a/usr/Euler/project/util/CommonFunction b/usr/Euler/project/util/CommonFunction
index b10dc7e..3527af6 100644
--- a/usr/Euler/project/util/CommonFunction
+++ b/usr/Euler/project/util/CommonFunction
@@ -75,6 +75,7 @@ function INIT_Execute_Hook()
fi
fi
done
+ chmod g-x,o-x ${hookdir}/S* > /dev/null 2>&1
fi
if [ "x${installbreak}" == "x${hookbase}" ]; then
--
2.27.0

View File

@ -3,7 +3,7 @@ Summary: scripts for system installation
Group: Applications/System
License: MulanPSL-2.0
Version: 1.2
Release: 4
Release: 5
SOURCE0: %{name}-%{version}.tar.gz
Patch0001: 0001-add-support-for-nvme-disk.patch
@ -102,7 +102,14 @@ rm -rf %{_tmppath}/%{name}-%{version}
rm -rf $RPM_BUILD_DIR/%{name}-%{version}
%changelog
* Sat Oct 5 2022 zhangqiumiao <zhangqiumiao1@huawei.com> - 1.2-4
* Mon Dec 19 2022 zhangqiumiao <zhangqiumiao1@huawei.com> - 1.2-5
- Type:bugfix
- CVE:NA
- SUG:NA
- DESC:after executing hook scripts, remove their executable permission
of non root users
* Sat Nov 5 2022 zhangqiumiao <zhangqiumiao1@huawei.com> - 1.2-4
- Type:requirement
- CVE:NA
- SUG:NA