sd-daemon: escape notification msg using shell_escape()

Follow-up for f9e0a62392

xescape() would unconditionally emit hex escapes, rendering
\n unreadable.
This commit is contained in:
Mike Yuan
2026-06-13 17:11:11 +02:00
committed by Zbigniew Jędrzejewski-Szmek
parent cd13dc16c3
commit a9e5f5116e
+2 -2
View File
@@ -637,8 +637,8 @@ static int pid_notify_with_fds_internal(
}
if (DEBUG_LOGGING) {
_cleanup_free_ char *escaped = xescape_full(state, "\"", /* console_width = */ SIZE_MAX, XESCAPE_8_BIT);
log_debug("Notify message sent to '%s': \"%s\"", e, escaped ?: state);
_cleanup_free_ char *escaped = shell_escape(state, "\"");
log_debug("Notify message sent to '%s': \"%s\"", e, strnull(escaped));
}
return 1;