Merge pull request #18863 from keszybz/cmdline-escaping
Escape command lines properly
This commit is contained in:
@@ -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;
|
||||
|
||||
|
||||
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user