]> git.ipfire.org Git - thirdparty/systemd.git/commit
meson: use better shellscript argument passing
authorEli Schwartz <eschwartz@archlinux.org>
Sun, 15 May 2022 15:11:24 +0000 (11:11 -0400)
committerYu Watanabe <watanabe.yu+github@gmail.com>
Sun, 15 May 2022 18:04:16 +0000 (03:04 +0900)
commitac3eda348952687bf2cd9efca86edd77bd7ee52b
treedb59e7ecac70ed3c381ea76e1fe0a64337f9cbac
parent63d08a85719fb52499f55f6f2a3a6a07cca73d35
meson: use better shellscript argument passing

Passing potentially arbitrary data into a shellscript is potentially
very broken if you do not correctly quote it for use. This quoting must
be done as part of the interpretation of the data itself, e.g. python's
shlex.quote; simply formatting it into a string with double quotes is
NOT sufficient.

An alternative is to communicate the data reliably via argv to the shell
process, and allow the shell to internally handle it via `"$1"`, which
is quote-safe and will expand the data from argv as a single tokenized
word.
meson.build
test/meson.build