Opened 23 years ago
Closed 14 years ago
#224 closed defect (invalid)
chroot breaks /@unixroot rewrite
Reported by: | Yuri Dario | Owned by: | bird |
---|---|---|---|
Priority: | normal | Milestone: | libc-0.6.4 |
Component: | libc-backend | Version: | 0.6.2 |
Severity: | normal | Keywords: | |
Cc: |
Description
While working at RPM, I discovered some wrong installations when a non UNIXRoot drive was used.
Debug showed that calling chroot("/@unixroot/"), ..., chroot(".") broke the unixroot rewrite.
The logged libc output shows how /@unixroot resolves to D:/ after the two chrooted calls.
Removing the chroot, restored @unixroot behaviour.
Attaching sample log, unable to write a testcase.
Attachments (1)
Change History (4)
by , 23 years ago
Attachment: | libc_0ec4.zip added |
---|
comment:1 by , 23 years ago
Just for the record, rpmtsPrepare() in lib/transaction.c is the location of the chroot(). Fortunately, this chroot was not required, so rpm works.
comment:2 by , 14 years ago
Status: | new → assigned |
---|
comment:3 by , 14 years ago
Resolution: | → invalid |
---|---|
Status: | assigned → closed |
chroot changes /@unixroot/, that's how it works. What's going wrong in this case is that rpm thinks the pwd is the old unixroot - it does a chdir("/") at timestamp 019f280f. The chroot does not alter the current directory, so the following chroot(".") is probably supposed to undo the previous chroot("/@unixroot/"). I would think that the chdir("/") should be a chdir("/@unixroot") and is something you've missed when porting rpm.
libc debug log