Bug 57111 - rpm --root breaks if directory component ends in "."
Summary: rpm --root breaks if directory component ends in "."
Alias: None
Product: Red Hat Linux
Classification: Retired
Component: rpm
Version: 7.2
Hardware: i386
OS: Linux
Target Milestone: ---
Assignee: Jeff Johnson
QA Contact:
Depends On:
TreeView+ depends on / blocked
Reported: 2001-12-04 23:57 UTC by Paul Menage
Modified: 2008-05-01 15:38 UTC (History)
0 users

Clone Of:
Last Closed: 2001-12-04 23:57:47 UTC

Attachments (Terms of Use)

Description Paul Menage 2001-12-04 23:57:43 UTC
Description of Problem:

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


How Reproducible:


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 15:51:01 UTC
The fix -- when attempted -- is going to be removing rpmrc configuration

Meanwhile, the workaround is
	Don't do that.

Comment 2 Jeff Johnson 2001-12-05 15:56:33 UTC
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.