]> git.ipfire.org Git - thirdparty/dracut.git/commit
fix(10i18n): stop leaking shell options
authorMichal Hecko <mhecko@redhat.com>
Mon, 21 Feb 2022 09:59:27 +0000 (10:59 +0100)
committerJóhann B. Guðmundsson <johannbg@gmail.com>
Wed, 9 Mar 2022 04:09:53 +0000 (04:09 +0000)
commit35064768ebf14d3ec6bf3f7df52580fb4920ea3d
tree99bbbc172a07a95684d751021a8a3c05eef8dab4
parent3385989266ddb1c0685f9f7501f1835e9ce49730
fix(10i18n): stop leaking shell options

The findkeymap function manipulates the shell options and relies on
restoring them using the trap. However, as the function might be called
recursively, each recursive invocation changes the signal handler to its
own. As the recursion is entered with shell options already modified,
the changed trap handler is replaced with restoration to the modified
shell options, not the original ones. This patch wraps the findkeymap
function so that the shellopts are manipulated and restored outside the
recursion.
modules.d/10i18n/module-setup.sh