!287 [sync] PR-271: 执行社区用例时临时关闭环境的SElinux功能

From: @openeuler-sync-bot 
Reviewed-by: @jiangheng12 
Signed-off-by: @jiangheng12
This commit is contained in:
openeuler-ci-bot 2024-06-06 07:48:34 +00:00 committed by Gitee
commit d571152f4c
No known key found for this signature in database
GPG Key ID: 173E9B9CA92EEF8F

View File

@ -6,7 +6,7 @@
%{?no_gtk2:%global gtk2 0}
%global sshd_uid 74
%global openssh_release 29
%global openssh_release 30
Name: openssh
Version: 8.8p1
@ -383,7 +383,17 @@ make
popd
%check
if [ -e /sys/fs/selinux/enforce ]; then
# Store the SElinux state
cat /sys/fs/selinux/enforce > selinux.tmp
setenfore 0
fi
make tests
if [ -e /sys/fs/selinux/enforce ]; then
# Restore the SElinux state
cat selinux.tmp > /sys/fs/selinux/enforce
rm -rf selinux.tmp
fi
%install
mkdir -p -m755 $RPM_BUILD_ROOT%{_sysconfdir}/ssh
@ -508,6 +518,12 @@ getent passwd sshd >/dev/null || \
%attr(0644,root,root) %{_mandir}/man8/sftp-server.8*
%changelog
* Mon Apr 29 2024 renmingshuai<renmingshuai@huawei.com> - 8.8p1-30
- Type:bugfix
- CVE:
- SUG:NA
- DESC:Disable SElinux when make tests
* Thu Mar 14 2024 renmingshuai<renmingshuai@huawei.com> - 8.8p1-29
- Type:bugfix
- CVE: