Note: This is a beta release of Red Hat Bugzilla 5.0. The data contained within is a snapshot of the live data so any changes you make will not be reflected in the production Bugzilla. Also email is disabled so feel free to test any aspect of the site that you want. File any problems you find or give feedback here.
Bug 83822 - chroot and LD_PRELOAD don't mix...
Summary: chroot and LD_PRELOAD don't mix...
Keywords:
Status: CLOSED WONTFIX
Alias: None
Product: Red Hat Linux
Classification: Retired
Component: rpm
Version: 8.0
Hardware: i386
OS: Linux
medium
low
Target Milestone: ---
Assignee: Jeff Johnson
QA Contact: Mike McLean
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2003-02-09 14:59 UTC by Nadav Har'El
Modified: 2007-04-18 16:50 UTC (History)
1 user (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2003-02-13 16:09:27 UTC


Attachments (Terms of Use)

Description Nadav Har'El 2003-02-09 14:59:41 UTC
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 16:09:27 UTC
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.