Blame selinux_transactional_update.patch
|
|
e0a517 |
--- plugins/selinux.c.orig 2022-04-07 11:13:19.027518072 +0000
|
|
|
e0a517 |
+++ plugins/selinux.c 2022-12-02 13:59:42.185032111 +0000
|
|
|
e0a517 |
@@ -8,6 +8,7 @@
|
|
|
fda951 |
#include <rpm/rpmlog.h>
|
|
|
fda951 |
#include <rpm/rpmts.h>
|
|
|
fda951 |
#include "lib/rpmplugin.h"
|
|
|
fda951 |
+#include <stdlib.h>
|
|
|
fda951 |
|
|
|
fda951 |
#include "debug.h"
|
|
|
fda951 |
|
|
|
e0a517 |
@@ -173,6 +174,13 @@ static rpmRC selinux_fsm_file_prepare(rp
|
|
|
e0a517 |
|
|
|
fda951 |
if (conrc == 0 || (conrc < 0 && errno == EOPNOTSUPP))
|
|
|
fda951 |
rc = RPMRC_OK;
|
|
|
fda951 |
+ else {
|
|
|
fda951 |
+ char *tup = getenv("TRANSACTIONAL_UPDATE");
|
|
|
e0a517 |
+ if (tup != NULL && !strncmp(tup, "true", 4)) {
|
|
|
fda951 |
+ rpmlog(RPMLOG_DEBUG, "lsetfilecon failed, will be healed upon reboot (transactional update): (%s, %s)\n", path, scon);
|
|
|
fda951 |
+ rc = RPMRC_OK;
|
|
|
fda951 |
+ }
|
|
|
fda951 |
+ }
|
|
|
fda951 |
|
|
|
e0a517 |
rpmlog(loglvl(rc != RPMRC_OK), "lsetfilecon: (%d %s, %s) %s\n",
|
|
|
e0a517 |
fd, path, scon, (conrc < 0 ? strerror(errno) : ""));
|