Blame SOURCES/fapolicyd-1.1.1-ld_so.patch

c944e2
diff -urp fapolicyd-1.1.1.orig/fapolicyd.spec fapolicyd-1.1.1/fapolicyd.spec
c944e2
--- fapolicyd-1.1.1.orig/fapolicyd.spec	2022-01-28 15:17:55.000000000 -0500
c944e2
+++ fapolicyd-1.1.1/fapolicyd.spec	2022-01-28 15:19:31.594155397 -0500
c944e2
@@ -30,7 +30,7 @@ makes use of the kernel's fanotify inter
c944e2
 # generate rules for python
c944e2
 sed -i "s/%python2_path%/`readlink -f %{__python2} | sed 's/\//\\\\\//g'`/g" rules.d/*.rules
c944e2
 sed -i "s/%python3_path%/`readlink -f %{__python3} | sed 's/\//\\\\\//g'`/g" rules.d/*.rules
c944e2
-sed -i "s/%ld_so_path%/`find /usr/lib64/ -type f -name 'ld-2\.*.so' | sed 's/\//\\\\\//g'`/g" rules.d/*.rules
c944e2
+sed -i "s/%ld_so_path%/`readelf -e /usr/bin/bash | grep Requesting | sed 's/.$//' | rev | cut -d" " -f1 | rev  | sed 's/\//\\\\\//g'`/g" rules.d/*.rules
c944e2
 
c944e2
 %build
c944e2
 %configure \
c944e2
diff -urp fapolicyd-1.1.1.orig/m4/dyn_linker.m4 fapolicyd-1.1.1/m4/dyn_linker.m4
c944e2
--- fapolicyd-1.1.1.orig/m4/dyn_linker.m4	2022-01-28 15:17:55.000000000 -0500
c944e2
+++ fapolicyd-1.1.1/m4/dyn_linker.m4	2022-01-28 15:20:02.048609672 -0500
c944e2
@@ -1,6 +1,10 @@
c944e2
 AC_DEFUN([LD_SO_PATH],
c944e2
 [
c944e2
-  xpath=`realpath /usr/lib64/ld-2.*.so`
c944e2
+  xpath1=`readelf -e /usr/bin/bash | grep Requesting | sed 's/.$//' | rev | cut -d" " -f1 | rev`
c944e2
+  xpath=`realpath $xpath1`
c944e2
+  if test ! -f "$xpath" ; then
c944e2
+    AC_MSG_ERROR([Cant find the dynamic linker])
c944e2
+  fi
c944e2
   echo "dynamic linker is.....$xpath"
c944e2
   AC_DEFINE_UNQUOTED(SYSTEM_LD_SO, ["$xpath"], [dynamic linker])
c944e2
 ])