]> git.ipfire.org Git - thirdparty/systemd.git/commit - src/shared/util.h
util: add shell_maybe_quote() call for preparing a string for shell cmdline inclusion
authorLennart Poettering <lennart@poettering.net>
Thu, 9 Apr 2015 16:32:21 +0000 (18:32 +0200)
committerLennart Poettering <lennart@poettering.net>
Thu, 9 Apr 2015 16:32:21 +0000 (18:32 +0200)
commit019c7fba754f74909bdb8bbbbbbe529082928a95
tree9b53a83d39a2b128e46065625fb6a298942e90f8
parentab51b943d42eb6a5e4c6e26cd3c641d4e604bd1c
util: add shell_maybe_quote() call for preparing a string for shell cmdline inclusion

If necessary the passed string is enclosed in "", and all special
characters escapes.

This also ports over usage in bus-util.c and job.c to use this, instead
of a incorrect local implementation that forgets to properly escape.
src/core/job.c
src/libsystemd/sd-bus/bus-util.c
src/shared/util.c
src/shared/util.h
src/test/test-util.c