6 Star 0 Fork 1

OpenCloudOS Stream/kpatch

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
0003-do-not-rm-selinux-rpm-owned-directory.patch 1.19 KB
一键复制 编辑 原始数据 按行查看 历史
nilusyi 提交于 2023-02-22 17:41 . OCS package init
kpatch: do not rm selinux rpm owned directory
As part of the kpatch rpm package installation, the /var/lib/kpatch directory
gets created and is set to be selinux owned by the kpatch rpm package.
There is a problem where uninstalling the last kpatch-patch will also remove
this directory. When another kpatch-patch installation occurs, the
/var/lib/kpatch get recreated but withtout the selinux context which triggers a
policy error.
Since /var/lib/kpatch is now created by the rpm spec file, do not remove it
from the uinstall target of the kpatch script. This insures selinux context
consistency.
RHEL-only.
Signed-off-by: Yannick Cote <ycote@redhat.com>
diff -Nupr kpatch-0.9.4.old/kpatch/kpatch kpatch-0.9.4/kpatch/kpatch
--- kpatch-0.9.4.old/kpatch/kpatch 2021-08-26 15:31:07.000000000 -0400
+++ kpatch-0.9.4/kpatch/kpatch 2022-06-10 12:19:55.791538218 -0400
@@ -584,7 +584,6 @@ case "$1" in
echo "uninstalling $PATCH ($KVER)"
rm -f "$MODULE" || die "failed to uninstall module $PATCH"
rmdir --ignore-fail-on-non-empty "$INSTALLDIR/$KVER" || die "failed to remove directory $INSTALLDIR/$KVER"
- rmdir --ignore-fail-on-non-empty "$INSTALLDIR" || die "failed to remove directory $INSTALLDIR"
;;
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/opencloudos-stream/kpatch.git
git@gitee.com:opencloudos-stream/kpatch.git
opencloudos-stream
kpatch
kpatch
master

搜索帮助