Closed kloczek closed 2 years ago
What is your OS?
Permissions of shared libraries are discussed at stackexchange: Why are shared libraries executable?
On any Unix (Linux/Solarix/*BSD) all libraries should be with 755.
I cannot confirm this.
root@debian# lsb_release -d
Description: Debian GNU/Linux 11 (bullseye)
root@debian# ls -l /usr/lib/lib*.so.* | grep -v '^l' | head -n3
-rw-r--r-- 1 root root 1517856 Dec 23 2020 /usr/lib/libBLT.2.5.so.8.6
-rw-r--r-- 1 root root 329680 Dec 23 2020 /usr/lib/libBLTlite.2.5.so.8.6
-rw-r--r-- 1 root root 56480 Jan 15 2018 /usr/lib/libdiscover.so.2.0.1
root@freebsd:~ # uname -mrs
FreeBSD 12.1-RELEASE amd64
root@freebsd:~ # ls -l /usr/lib/lib*.so.* | grep -v '^l' | head -n3
-r--r--r-- 1 root wheel 19104 Nov 1 2019 /usr/lib/libBlocksRuntime.so.0
-r--r--r-- 1 root wheel 867016 Nov 1 2019 /usr/lib/libarchive.so.7
-r--r--r-- 1 root wheel 678304 Nov 1 2019 /usr/lib/libasn1.so.11
root@freebsd:~ # ls -l /usr/local/lib/lib*.so.* | grep -v '^[^ ]*[lx]' | head -n3
-rw-r--r-- 1 root wheel 18216 Apr 23 2020 /usr/local/lib/libcharset.so.1.0.0
-rw-r--r-- 1 root wheel 51960 Apr 23 2020 /usr/local/lib/libhistory.so.8.0
-rw-r--r-- 1 root wheel 1088552 Apr 23 2020 /usr/local/lib/libiconv.so.2.5.1
openbsd# uname -mrs
OpenBSD 6.5 amd64
openbsd# ls -l /usr/lib/lib*.so.* | grep -v '^l' | head -n3
-r--r--r-- 1 root bin 46564560 Apr 13 2019 /usr/lib/libLLVM.so.0.0
-r--r--r-- 1 root bin 5139984 Apr 13 2019 /usr/lib/libc++.so.2.1
-r--r--r-- 1 root bin 1232152 Apr 13 2019 /usr/lib/libc++abi.so.0.1
openbsd# ls -l /usr/local/lib/lib*.so.* | grep -v '^l' | head -n3
-rw-r--r-- 1 root bin 17464 Apr 14 2019 /usr/local/lib/libasprintf.so.1.1
-rw-r--r-- 1 root bin 98712 Aug 6 2019 /usr/local/lib/libbz2.so.10.4
-rw-r--r-- 1 root bin 17232 Apr 14 2019 /usr/local/lib/libcharset.so.1.1
From the second thought, it is a bug.
RHash aims for portability, including Unix support, but HP-UX requires executable bit to be set for the shared library file, otherwise the library code can't be executed. Also Solaris and NetBSD sets executable bit for a shared library files.
The bug is fixed by 9903be0cb94b84188f9b3a42d6b6b8ca5073372e.
Thank you :)
Fix included into RHash v1.4.3.
https://github.com/rhash/RHash/blob/master/librhash/Makefile#L13 And it should be with 755.