]> git.ipfire.org Git - thirdparty/dracut.git/commit
fix(dracut-functions): avoid calling grep with PCRE (-P)
authorDaniel McIlvaney <damcilva@microsoft.com>
Fri, 28 Apr 2023 21:02:05 +0000 (14:02 -0700)
committerLaszlo Gombos <laszlo.gombos@gmail.com>
Mon, 8 May 2023 04:58:09 +0000 (00:58 -0400)
commit67591e8855006eb02aa0ffab7349ab770e471473
treee40579260712cbd10116d7efebb18e1832da0313
parent260883d96f33e7aced3d00c85d0ebffcec1385a1
fix(dracut-functions): avoid calling grep with PCRE (-P)

Invoking grep in Perl mode requires JIT'ing the Perl regex.
This can run into issues with SELinix policy which will generally try to
limit use of execmem in general purpose scripts. This occurs since the
JIT'd code will live in executable  memory.

The PCRE only '\K' command in the Perl REGEX can be replaced by a call
to awk instead.
dracut-functions.sh