[Rpm-maint] [rpm-software-management/rpm] wrong chroot/fchdir order to break out of chroot? (Issue #1884)

Michael Schroeder notifications at github.com
Thu Jan 27 09:00:19 UTC 2022


It's supposed to work like this:

before rpmChrootIn:
root: /
cwd: /home/user

after rpmChrootIn:
root: /rootdir
cwd: /    (i.e. outside of the /rootdir chroot jail!)

Thus, rpm dies a chroot(.) to restore the original root and a fchdir() to restore the original working directory.

One might argue that rpm should not assume that the cwd is unchanged and that it would be better to also open a fd that points to the original root. 




-- 
Reply to this email directly or view it on GitHub:
https://github.com/rpm-software-management/rpm/issues/1884#issuecomment-1022986835
You are receiving this because you are subscribed to this thread.

Message ID: <rpm-software-management/rpm/issues/1884/1022986835 at github.com>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.rpm.org/pipermail/rpm-maint/attachments/20220127/3a2dd3e8/attachment-0001.html>


More information about the Rpm-maint mailing list