On Thu, Mar 22, 2018 at 10:29:27PM -0500, Eric Sandeen wrote: > > > On 3/22/18 10:25 PM, Darrick J. Wong wrote: > >> It make sense to check that it's available before running it, but I think > >> hardcoding paths runs the risk of missing it if it's somewhere unique. > > > OTOH hardcoding the path (since we control where xfs_repair gets > > installed) means that we avoid the "someone poisoned PATH" attack. I'm > > not sure I buy that argument since if you have root access you probably > > can just bind mount a garbage atop /sbin/xfs_repair, but eh. > > But this is the initramfs, right? Do we really have any idea where things > land? Do initramfs paths follow the installed system paths? (maybe?) They land wherever the initramfs construction script puts them, though at least on Debian the binaries are usually put in the same places as they are on the rootfs. Not sure about dracut. :) --D > -Eric > -- > To unsubscribe from this list: send the line "unsubscribe linux-xfs" in > the body of a message to majordomo@xxxxxxxxxxxxxxx > More majordomo info at http://vger.kernel.org/majordomo-info.html -- To unsubscribe from this list: send the line "unsubscribe linux-xfs" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html