File: 0001-Get-bash-path-with-command.patch

package info (click to toggle)
fapolicyd 1.1.7-5
  • links: PTS, VCS
  • area: main
  • in suites: bookworm
  • size: 1,032 kB
  • sloc: ansic: 9,139; makefile: 163; sh: 105; python: 26
file content (25 lines) | stat: -rw-r--r-- 902 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
From: Nobuhiro Iwamatsu <iwamatsu@nigauri.org>
Date: Sun, 11 Dec 2022 17:27:52 +0900
Subject: [PATCH] Get bash path with command

The command path is different in the distribution. This is not the hard
code, but the implementation obtained with 'command' command.

Signed-off-by: Nobuhiro Iwamatsu <iwamatsu@nigauri.org>
---
 m4/dyn_linker.m4 | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/m4/dyn_linker.m4 b/m4/dyn_linker.m4
index 0e269e9..c0c8aa3 100644
--- a/m4/dyn_linker.m4
+++ b/m4/dyn_linker.m4
@@ -1,6 +1,7 @@
 AC_DEFUN([LD_SO_PATH],
 [
-  xpath1=`readelf -e /usr/bin/bash | grep Requesting | sed 's/.$//' | rev | cut -d" " -f1 | rev`
+  bash_path=`command -v bash`
+  xpath1=`readelf -e $bash_path | grep Requesting | sed 's/.$//' | rev | cut -d" " -f1 | rev`
   xpath=`realpath $xpath1`
   if test ! -f "$xpath" ; then
     AC_MSG_ERROR([Cant find the dynamic linker])