FS#29162 - [mkinitcpio] Don't copy mount from $PATH
Attached to Project:
Arch Linux
Opened by Ted Pavlic (tpavlic) - Thursday, 29 March 2012, 03:50 GMT
Last edited by Dave Reisner (falconindy) - Wednesday, 04 April 2012, 00:32 GMT
Opened by Ted Pavlic (tpavlic) - Thursday, 29 March 2012, 03:50 GMT
Last edited by Dave Reisner (falconindy) - Wednesday, 04 April 2012, 00:32 GMT
|
Details
Description: If a user with sudo access has a mount
colorizer installed, mkinitcpio will not copy the mount
binary into the initramfs. Instead, it will copy the
colorizer wrapper.
This has never been a problem until a recent update of mkinitcpio. Additional info: * mkinitcpio 0.8.5-1 * AUR/cw installed, but applies to any colorizing mount wrapper Steps to reproduce (on a user account): 1. Install AUR/cw (or similar colorizer that includes mount support) 2. Adjust PATH to place /usr/lib/cw (the location of the mount wrapper) before /bin 3. Run sudo mkinitcpio -p linux The result is that /usr/lib/cw/mount is copied into the initramfs instead of /bin/mount. Consequently, the next boot will fail. |
This task depends upon
Closed by Dave Reisner (falconindy)
Wednesday, 04 April 2012, 00:32 GMT
Reason for closing: Implemented
Additional comments about closing: mkinitcpio 0.8.6
Wednesday, 04 April 2012, 00:32 GMT
Reason for closing: Implemented
Additional comments about closing: mkinitcpio 0.8.6
http://projects.archlinux.org/mkinitcpio.git/commit/?id=828c5f7c54c
Hard-coding paths does not need to be the solution, does it? Can't there be a restricted and configurable PATH used by mkinitcpio? SSH uses a restricted path, and I view mkinitcpio much more important than SSH.
Alternatively, I suppose env_reset can be turned on in sudoers. I don't know if there is a way to confine env_reset just to specific commands (like pacman, yaourt, and mkinitcpio), but a blanket env_reset is the default on many other distributions, IIRC.
On your Arch system, if you do a "sudo env|grep PATH", what do you see? If the PATH was restricted by default, I would have never had the problem with mkinitcpio.