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

Vladimir Vukicevic notifications at github.com
Fri Jan 14 19:57:07 UTC 2022


>From inspection (based on some issues on non-linux that are too complex to get in here) -- in order to "break out" of chroot, rpm does this:

https://github.com/rpm-software-management/rpm/blob/4afe2d14d33db82ccb41c0a8d5eb1a4db90762fc/lib/rpmchroot.c#L160

Isn't this backwards?  Shouldn't the `fchdir` happen first to set the process working dir to the fd, and then `chroot(".")` would then "break out"?  This all seems to work on linux though, so I'm not sure what's up.

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

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


More information about the Rpm-maint mailing list