Historical bug tracker for the Pacman package manager.
The pacman bug tracker has moved to gitlab:
https://gitlab.archlinux.org/pacman/pacman/-/issues
This tracker remains open for interaction with historical bugs during the transition period. Any new bugs reports will be closed without further action.
The pacman bug tracker has moved to gitlab:
https://gitlab.archlinux.org/pacman/pacman/-/issues
This tracker remains open for interaction with historical bugs during the transition period. Any new bugs reports will be closed without further action.
FS#36161 - left-open directory filedescriptor causes chroot() to error EPERM on BSD
Attached to Project:
Pacman
Opened by Wolfgang Bumiller (Wrybane) - Monday, 15 July 2013, 16:43 GMT
Last edited by Allan McRae (Allan) - Monday, 06 January 2014, 04:52 GMT
Opened by Wolfgang Bumiller (Wrybane) - Monday, 15 July 2013, 16:43 GMT
Last edited by Allan McRae (Allan) - Monday, 06 January 2014, 04:52 GMT
|
DetailsSummary and Info:
alpm_run_chroot in libalpm uses opendir() to open a file descriptor to the current directory before doing the whole fork+chrooting, on FreeBSD chroot(2) fails with EPERM when a directory file descriptor is open with _either_ `kern.chroot_allow_open_directories` being 0, or when the process already is inside a chroot. (This is documented in the manpage, and different than on linux where this is explicitly allowed according to the manpage). Since the file descriptor is not used in the forked process anyway (as it just chroot()s and exec()s), it should be safe to close it. The attached patch fixes the issue. Steps to Reproduce: install packages from inside a chroot on ArchBSD |
This task depends upon
Closed by Allan McRae (Allan)
Monday, 06 January 2014, 04:52 GMT
Reason for closing: Fixed
Additional comments about closing: git commits 20127e73 and 086bbc5b
Monday, 06 January 2014, 04:52 GMT
Reason for closing: Fixed
Additional comments about closing: git commits 20127e73 and 086bbc5b
pacman-fork.patch
user.email=wry.git@bumiller.com
user.name=Wolfgang Bumiller