Panu Matilainen e62cb2
From 7072b2d2b92e4d2731451bdcca8d83ab6b945016 Mon Sep 17 00:00:00 2001
Panu Matilainen e62cb2
Message-ID: <7072b2d2b92e4d2731451bdcca8d83ab6b945016.1687934969.git.pmatilai@redhat.com>
Panu Matilainen e62cb2
From: Panu Matilainen <pmatilai@redhat.com>
Panu Matilainen e62cb2
Date: Tue, 20 Jun 2023 10:11:20 +0300
Panu Matilainen e62cb2
Subject: [PATCH] Fix per-file plugin hook regression introduced in 4.18
Panu Matilainen e62cb2
Panu Matilainen e62cb2
Commit 6dd62720fe84f7e2ad902c915b952fc0b29e3dcd neglected to update
Panu Matilainen e62cb2
rpmpluginsCallFsmFilePost() to pass the absolute path in the case
Panu Matilainen e62cb2
of unowned directories. Because in that case there's no rpmfi to
Panu Matilainen e62cb2
pass to the plugin in that case, there's simply no way for the plugin
Panu Matilainen e62cb2
to know what path is being manipulated. Oops.
Panu Matilainen e62cb2
Panu Matilainen e62cb2
Fixes: #2543
Panu Matilainen e62cb2
---
Panu Matilainen e62cb2
 lib/fsm.c | 2 +-
Panu Matilainen e62cb2
 1 file changed, 1 insertion(+), 1 deletion(-)
Panu Matilainen e62cb2
Panu Matilainen e62cb2
diff --git a/lib/fsm.c b/lib/fsm.c
Panu Matilainen e62cb2
index 747ed2b09..c44f6313c 100644
Panu Matilainen e62cb2
--- a/lib/fsm.c
Panu Matilainen e62cb2
+++ b/lib/fsm.c
Panu Matilainen e62cb2
@@ -360,7 +360,7 @@ static int fsmDoMkDir(rpmPlugins plugins, int dirfd, const char *dn,
Panu Matilainen e62cb2
     }
Panu Matilainen e62cb2
 
Panu Matilainen e62cb2
     /* Run fsm file post hook for all plugins */
Panu Matilainen e62cb2
-    rpmpluginsCallFsmFilePost(plugins, NULL, dn, mode, op, rc);
Panu Matilainen e62cb2
+    rpmpluginsCallFsmFilePost(plugins, NULL, apath, mode, op, rc);
Panu Matilainen e62cb2
 
Panu Matilainen e62cb2
     if (!rc) {
Panu Matilainen e62cb2
 	rpmlog(RPMLOG_DEBUG,
Panu Matilainen e62cb2
-- 
Panu Matilainen e62cb2
2.41.0
Panu Matilainen e62cb2