Bug 57111 - rpm --root breaks if directory component ends in "."
rpm --root breaks if directory component ends in "."
Status: CLOSED WONTFIX
Product: Red Hat Linux
Classification: Retired
Component: rpm (Show other bugs)
7.2
i386 Linux
medium Severity medium
: ---
: ---
Assigned To: Jeff Johnson
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2001-12-04 18:57 EST by Paul Menage
Modified: 2008-05-01 11:38 EDT (History)
0 users

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2001-12-04 18:57:47 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:


Attachments (Terms of Use)

  None (edit)
Description Paul Menage 2001-12-04 18:57:43 EST
Description of Problem:


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

rpm-4.0.3-1.03

How Reproducible:

Always

Steps to Reproduce:

strace -eopen rpm -qa --root /a./b.

Actual Results:

rpm loses the "." from the end of any directory component, and attempts to
open the RPM database rooted in /a/b, not in /a./b.

...
open("/a/b/var/lib/rpm/Packages", O_RDONLY|O_LARGEFILE) = -1 ENOENT (No
such file or directory)
...

Expected Results:


Additional Information:
Comment 1 Jeff Johnson 2001-12-05 10:51:01 EST
The fix -- when attempted -- is going to be removing rpmrc configuration
entirely.

Meanwhile, the workaround is
	Don't do that.
Comment 2 Jeff Johnson 2001-12-05 10:56:33 EST
Oops, wrong bug, apologies, the text is always off the screen
when replying to a bug using netscape.

You're probably right, as rpm attempts to canonicalize
all possible path names to avoid inadvertently doing
	rm -rf /../../.
However, the answer is still gonna be
	Don't do that.
for now, as the risk involved with changing (and breaking) the
canonicalization of path is far too great to justify attempting
to support directories with a trailing '.' at this time.

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