Bug 226873 - svgalib will not load unless libraries are copied to usb drive
svgalib will not load unless libraries are copied to usb drive
Product: Fedora
Classification: Fedora
Component: selinux-policy-targeted (Show other bugs)
i386 Linux
medium Severity medium
: ---
: ---
Assigned To: Daniel Walsh
Ben Levenson
Depends On:
  Show dependency treegraph
Reported: 2007-02-01 15:10 EST by mcconnau
Modified: 2007-11-30 17:11 EST (History)
1 user (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2007-02-05 10:36:22 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)

  None (edit)
Description mcconnau 2007-02-01 15:10:09 EST
Description of problem:
I installed FC6 from CD set (checksums verified), then installed svgalib
(www.svgalib.org) both versions 1.4.3 and 1.9.25.  After building according to
instructions (with a few changes mainly to correct new compiler issues in 1.4.3)
I tried to run a demo.  It fails to load libraries, complaining that it cannot
restore segment protection after relocation.  Same result by doing ldd -r on the
libraries.  The problem is resolved and the demos run after I copy the libraries
to a usb thumb-drive and change the links in /usr/local/lib to point there.  I
was running as root and had full permissions on all directories in the path to
the demo program and the libraries, and on those files.  I have used svgalib on
several other Linux distros, including a Fedora Core laptop installation from
Emperor Linux, without running into this issue.  I can't think how to determine
whether this is a FC6 issue or svgalib issue.

Version-Release number of selected component (if applicable):

How reproducible:

Steps to Reproduce:
see above
Comment 1 Tim Waugh 2007-02-05 10:26:10 EST
Fixing component and reassigning.
Comment 2 Jakub Jelinek 2007-02-05 10:36:22 EST
You built svgalib incorrectly (or it has buggy Makefiles?).
Shared libraries need to be built as position independent code (i.e. using
-fpic or -fPIC compile time flags).
In FC6 the SELinux policy by default disallows DT_TEXTREL shared libraries
(on some arches like x86_64 DT_TEXTREL has never been supported at all), unless
the library uses a special SELinux type (e.g. textrel_shlib_t).
On the USB thumb drive guess you don't have a filesystem that supports SELinux

The best fix is just make sure the library is built with -fpic.  As a fallback,
if it is not (easily) possible to fix it, you can chcon -t textrel_shlib_t the
shared library.

Note You need to log in before you can comment on or make changes to this bug.