systemd/0061-timesyncd-properly-handle-OOM-errors-when-parsing-fa.patch
Zbigniew Jędrzejewski-Szmek d743bb5bcc Revert "Build with meson"
This reverts commits 3fb4a15096
and 0e8350ca14.

Either building with meson or other upstream changes was causing
issues with booting, and I didn't have time to debug this properly.
2017-06-27 13:42:28 -04:00

29 lines
1.1 KiB
Diff

From d7215ee47b09ca190b2eadfe3af71f810cd94418 Mon Sep 17 00:00:00 2001
From: Lennart Poettering <lennart@poettering.net>
Date: Tue, 30 May 2017 14:49:35 +0200
Subject: [PATCH] timesyncd: properly handle OOM errors when parsing fallback
servers (#6047)
(cherry picked from commit c4c069121cbd5f882ef2e7effba5cdd3673c0a1f)
---
src/timesync/timesyncd.c | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/src/timesync/timesyncd.c b/src/timesync/timesyncd.c
index 052329f61e..ff90f04070 100644
--- a/src/timesync/timesyncd.c
+++ b/src/timesync/timesyncd.c
@@ -132,7 +132,11 @@ int main(int argc, char *argv[]) {
if (r < 0)
log_warning_errno(r, "Failed to parse configuration file: %m");
- assert_se(manager_parse_fallback_string(m, NTP_SERVERS) >= 0);
+ r = manager_parse_fallback_string(m, NTP_SERVERS);
+ if (r < 0) {
+ log_error_errno(r, "Failed to parse fallback server strings: %m");
+ goto finish;
+ }
log_debug("systemd-timesyncd running as pid " PID_FMT, getpid());
sd_notify(false,