journald-remote/gateway hardening fixes flagged by kres (#42733)

This commit is contained in:
Lennart Poettering
2026-06-25 22:09:58 +02:00
committed by GitHub
5 changed files with 48 additions and 30 deletions
@@ -88,6 +88,12 @@ curl -LSfs \
--header "Range: entries=$TEST_CURSOR:1:1" \
http://localhost:19531/entries?SYSLOG_IDENTIFIER="$TEST_TAG" >"$LOG_FILE"
jq -se "length == 0" "$LOG_FILE"
# A skip of INT64_MIN must not crash the daemon
curl -LSs \
--header "Accept: application/json" \
--header "Range: entries=:-9223372036854775808:1" \
http://localhost:19531/entries >/dev/null || true
curl -LSfs http://localhost:19531/entries >"$LOG_FILE"
# Check if the specified cursor refers to an existing entry and return just that entry
curl -LSfs \
--header "Accept: application/json" \