From 5cad38a047accc5facd05704f32d3b37f9532f38 Mon Sep 17 00:00:00 2001 From: Richard Hansen Date: Tue, 14 May 2024 20:39:49 -0400 Subject: [PATCH] Don't attempt to read file if open fails --- ddclient.in | 2 ++ 1 file changed, 2 insertions(+) diff --git a/ddclient.in b/ddclient.in index 3edb930..e0e2304 100755 --- a/ddclient.in +++ b/ddclient.in @@ -1664,6 +1664,7 @@ sub _read_config { local *FD; if (!open(FD, "< $file")) { warning("Cannot open file '%s'. (%s)", $file, $!); + goto done; } # If file is owned by our effective uid, ensure that it has no access for group or others. @@ -1809,6 +1810,7 @@ sub _read_config { warning("file ends while expecting a continuation line.") if $continuation; + done: %$globals = %globals; %$config = %config;