Merge pull request #18863 from keszybz/cmdline-escaping

Escape command lines properly
This commit is contained in:
Lennart Poettering
2021-05-07 17:29:39 +02:00
committed by GitHub
23 changed files with 628 additions and 322 deletions
+1 -1
View File
@@ -250,7 +250,7 @@ static int bus_print_property(const char *name, const char *expected_value, sd_b
while ((r = sd_bus_message_read_basic(m, SD_BUS_TYPE_STRING, &str)) > 0) {
_cleanup_free_ char *e = NULL;
e = shell_maybe_quote(str, ESCAPE_BACKSLASH_ONELINE);
e = shell_maybe_quote(str, 0);
if (!e)
return -ENOMEM;
+1 -1
View File
@@ -181,7 +181,7 @@ static void log_job_error_with_service_result(const char* service, const char *r
assert(service);
service_shell_quoted = shell_maybe_quote(service, ESCAPE_BACKSLASH);
service_shell_quoted = shell_maybe_quote(service, 0);
if (!strv_isempty((char**) extra_args)) {
_cleanup_free_ char *t = NULL;