]> git.ipfire.org Git - thirdparty/dhcp.git/commitdiff
[master] Server file names now logged after config parsing
authorThomas Markwalder <tmark@isc.org>
Mon, 8 Sep 2014 11:45:42 +0000 (07:45 -0400)
committerThomas Markwalder <tmark@isc.org>
Mon, 8 Sep 2014 11:45:42 +0000 (07:45 -0400)
    Merges in rt36671

RELNOTES
server/dhcpd.c

index 855a9d91ff47f485f6a1f38a1b484263883af051..641830625c9bc05e1497b068e1ef78c437d7ada8 100644 (file)
--- a/RELNOTES
+++ b/RELNOTES
@@ -54,6 +54,10 @@ by Eric Young (eay@cryptsoft.com).
 
                        Changes since 4.3.1
 
+- Log statements depicting what files will be used by the server now occur
+  after the configuration file has been processed.
+  [ISC-Bugs #36671]
+
 - Addressed Coverity issues reported as of 07-31-2014:
   [ISC-Bugs #36712] Corrects Coverity reported "high" impact issues
   [ISC-Bugs #36933] Corrects Coverity reported "medium" impact issues
index 24d638e7d31e3f29746d5374d7012fbfa94ef7f4..e0d45e175b73ba23872ec1b8bb4f0784d1ae224a 100644 (file)
@@ -400,11 +400,7 @@ main(int argc, char **argv) {
                log_info (copyright);
                log_info (arr);
                log_info (url);
-               log_info ("Config file: %s", path_dhcpd_conf);
-               log_info ("Database file: %s", path_dhcpd_db);
-               log_info ("PID file: %s", path_dhcpd_pid);
        } else {
-               quiet = 0;
                log_perror = 0;
        }
 
@@ -616,7 +612,7 @@ main(int argc, char **argv) {
                log_fatal ("Configuration file errors encountered -- exiting");
 
        postconf_initialization (quiet);
+
 #if defined (PARANOIA) && !defined (EARLY_CHROOT)
        if (set_chroot) setup_chroot (set_chroot);
 #endif /* PARANOIA && !EARLY_CHROOT */
@@ -1018,6 +1014,12 @@ void postconf_initialization (int quiet)
        }
 #endif
 
+       if (!quiet) {
+               log_info ("Config file: %s", path_dhcpd_conf);
+               log_info ("Database file: %s", path_dhcpd_db);
+               log_info ("PID file: %s", path_dhcpd_pid);
+       }
+
        oc = lookup_option(&server_universe, options, SV_LOG_FACILITY);
        if (oc) {
                if (evaluate_option_cache(&db, NULL, NULL, NULL, options, NULL,
@@ -1027,17 +1029,14 @@ void postconf_initialization (int quiet)
                                openlog("dhcpd", DHCP_LOG_OPTIONS, db.data[0]);
                                /* Log the startup banner into the new
                                   log file. */
-                               if (!quiet) {
-                                       /* Don't log to stderr twice. */
-                                       tmp = log_perror;
-                                       log_perror = 0;
-                                       log_info("%s %s",
-                                                message, PACKAGE_VERSION);
-                                       log_info(copyright);
-                                       log_info(arr);
-                                       log_info(url);
-                                       log_perror = tmp;
-                               }
+                               /* Don't log to stderr twice. */
+                               tmp = log_perror;
+                               log_perror = 0;
+                               log_info("%s %s", message, PACKAGE_VERSION);
+                               log_info(copyright);
+                               log_info(arr);
+                               log_info(url);
+                               log_perror = tmp;
                        } else
                                log_fatal("invalid log facility");
                        data_string_forget(&db, MDL);