#994030 man-db: error while loading shared libraries: libmandb-2.9.4.so

Package:
man-db
Source:
man-db
Description:
tools for reading manual pages
Submitter:
BERTRAND Joël
Date:
2021-09-10 09:57:06 UTC
Severity:
important
#994030#5
Date:
2021-09-10 07:51:30 UTC
From:
To:
Dear Maintainer,

Since a few days (if I remember since I have upgraded my workstation
to last testing release), man aborts with folloging message:

Root hilbert:[~] > man man
man: error while loading shared libraries: libmandb-2.9.4.so: cannot open shared object file: Permission denied

This workstation is a diskless workstation. Rootfs is exported by a NetBSD
server.

strace shows that man binary tries to open libmandb-2.9.4.so in
following directories:
- /usr/lib/man-db/tls/haswell/x86_64/
- /usr/lib/man-db/tls/haswell/
- /usr/lib/man-db/tls/x86_64/
- /usr/lib/man-db/tls/
- /usr/lib/man-db/haswell/x86_64/
- /usr/lib/man-db/haswell/
- /usr/lib/man-db/x86_64/
- /usr/lib/man-db/
- /lib/x86_64-linux-gnu/tls/haswell/x86_64/
- /lib/x86_64-linux-gnu/tls/haswell/
- /lib/x86_64-linux-gnu/tls/x86_64/
- /lib/x86_64-linux-gnu/tls/
- /lib/x86_64-linux-gnu/haswell/x86_64/
- /lib/x86_64-linux-gnu/haswell/
- /lib/x86_64-linux-gnu/x86_64/
- /lib/x86_64-linux-gnu/
- /usr/lib/x86_64-linux-gnu/tls/haswell/x86_64/
- /usr/lib/x86_64-linux-gnu/tls/haswell/
- /usr/lib/x86_64-linux-gnu/tls/x86_64/
- /usr/lib/x86_64-linux-gnu/tls/
- /usr/lib/x86_64-linux-gnu/haswell/x86_64/
- /usr/lib/x86_64-linux-gnu/haswell/
- /usr/lib/x86_64-linux-gnu/x86_64/
- /usr/lib/x86_64-linux-gnu/
- /lib/tls/haswell/x86_64/
- /lib/tls/haswell/
- /lib/tls/x86_64/
- /lib/tls/
- /lib/haswell/x86_64/
- /lib/haswell/
- /lib/x86_64/
- /lib/
- /usr/lib/tls/haswell/x86_64/
- /usr/lib/tls/haswell/
- /usr/lib/tls/x86_64/
- /usr/lib/tls/
- /usr/lib/haswell/x86_64/
- /usr/lib/haswell/
- /usr/lib/x86_64/
- /usr/lib/

libmandb-2.9.4.so is in my case in /usr/lib/man-db/ and libmandb-2.9.4.so and
seems to be a dynamic library:
Root hilbert:[/usr/lib] > ls -al /usr/lib/man-db/libmandb-2.9.4.so
-rw-r--r-- 1 root root 30712 19 févr.  2021 /usr/lib/man-db/libmandb-2.9.4.so
Root hilbert:[/usr/lib] > file /usr/lib/man-db/libmandb-2.9.4.so
/usr/lib/man-db/libmandb-2.9.4.so: ELF 64-bit LSB shared object, x86-64, version 1 (SYSV), dynamically linked, BuildID[sha1]=c20b1c94193b241e4e17834335605b9d68db1632, stripped

I have tried to force library preload with:
Root hilbert:[~] > LD_PRELOAD=/usr/lib/man-db/libmandb-2.9.4.so man man
ERROR: ld.so: object '/usr/lib/man-db/libmandb-2.9.4.so' from LD_PRELOAD cannot be preloaded (cannot open shared object file): ignored.
man: error while loading shared libraries: libmandb-2.9.4.so: cannot open shared object file: Permission denied

Help will be welcome.

Best regards,

JB

#994030#10
Date:
2021-09-10 09:00:42 UTC
From:
To:
access, which isn't normally allowed.  Adding a "network," line to the
end of /etc/apparmor.d/local/usr.bin.man and then running "sudo
apparmor_parser -r /etc/apparmor.d/usr.bin.man" may help, though I
haven't tested that at all.  Failing that, you can use "sudo aa-complain
/etc/apparmor.d/usr.bin.man" to set that profile to complain mode rather
than enforce mode.

See https://wiki.debian.org/AppArmor for more details about AppArmor.

#994030#15
Date:
2021-09-10 09:48:20 UTC
From:
To:
	Thanks a lot for your answer.

	I have added "network," in the three sections of
/etc/apparmor.d/usr.bin.man and man runs now as expected.

	Best regards,

	JB