]> sjero.net Git - wget/commitdiff
Exit immediately if the system config file cannot be parsed.
authorReza Snowdon <vivi@mage.me.uk>
Mon, 29 Nov 2010 14:24:48 +0000 (15:24 +0100)
committerGiuseppe Scrivano <gscrivano@gnu.org>
Mon, 29 Nov 2010 14:24:48 +0000 (15:24 +0100)
src/ChangeLog
src/init.c

index d9000556ac267bc303871d1dc58a41cd6c024a3e..5e5843f2d3c19953247544f5b4a8be80848ad615 100644 (file)
@@ -1,3 +1,9 @@
+2010-11-27  Reza Snowdon  <vivi@mage.me.uk> 
+
+        * init.c (initialize): If 'ok' is not zero; exit, as
+       this indicates there was a problem parsing 'SYSTEM_WGETRC'.
+        Fixes bug #20370  
+
 2010-11-22  Giuseppe Scrivano  <gscrivano@gnu.org>
 
        Revert last commit.
index ffdaa6d6a93c65fc1f7af6beb05b81287ab940fd..5559369d48ada3a571f54d3f1029c39b81f85538 100644 (file)
@@ -588,6 +588,15 @@ initialize (void)
   else if (file_exists_p (SYSTEM_WGETRC))
     ok &= run_wgetrc (SYSTEM_WGETRC);
 #endif
+  /* If there are any problems parsing the system wgetrc file, tell
+     the user and exit */
+  if (! ok)
+    {
+      fprintf (stderr, _("\
+Parsing system wgetrc file failed, please check '%s'.           \
+Or specify a different file using --config\n"), SYSTEM_WGETRC);
+      exit (2);
+    }
   /* Override it with your own, if one exists.  */
   file = wgetrc_file_name ();
   if (!file)