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