Bug 83822 - chroot and LD_PRELOAD don't mix...
chroot and LD_PRELOAD don't mix...
Product: Red Hat Linux
Classification: Retired
Component: rpm (Show other bugs)
i386 Linux
medium Severity low
: ---
: ---
Assigned To: Jeff Johnson
Mike McLean
Depends On:
  Show dependency treegraph
Reported: 2003-02-09 09:59 EST by Nadav Har'El
Modified: 2007-04-18 12:50 EDT (History)
1 user (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2003-02-13 11:09:27 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 Nadav Har'El 2003-02-09 09:59:41 EST
From Bugzilla Helper:
User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.0.1) Gecko/20021003

Description of problem:
When "rpm" is run with the "-root ..." option to install stuff on an alternative
root, scripts (pre-install, post-install, etc.) are run in a chroot() environment.
Unfortunately, if the user had the LD_PRELOAD environment variable set, this
variable is propagated to the scripts, and they fail to run because the library
cannot (usually) be found in the chroot environment.
I believe that rpm should, when doing chroot(), unset environment variables that
are counter-productive in a chroot. LD_PRELOAD is the most obvious (it bit one
of my coworkers!), but unsetting LD_LIBRARY_PATH, SHELL, and perhaps even all
environment variables (!) should be considered.
Comment 1 Jeff Johnson 2003-02-13 11:09:27 EST
rpm changes the environment as little as possible,
and that's probably wiseset, as there's always going
to be one more enviroment variable that needs fiddling.

There's no objective basis for whether LD_PRELOAD is
useful in a chroot. For some, it is, for others it's not.
Without objective criteria, filtering the environment
doesn't belong in rpm.

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