chiark / gitweb /
journalctl: respect --after-cursor semantics with --follow in all cases
[elogind.git] / src / journal / journald-server.c
index 9ec425d2d4d4ca3aad7380472b458afb8a382274..80c97364209405da735e70e40d31730eda8e7e81 100644 (file)
@@ -1351,10 +1351,11 @@ static int server_parse_proc_cmdline(Server *s) {
 static int server_parse_config_file(Server *s) {
         assert(s);
 
-        return config_parse(NULL, "/etc/systemd/journald.conf", NULL,
-                            "Journal\0",
-                            config_item_perf_lookup, journald_gperf_lookup,
-                            false, false, true, s);
+        return config_parse_many("/etc/systemd/journald.conf",
+                                 CONF_DIRS_NULSTR("systemd/journald.conf"),
+                                 "Journal\0",
+                                 config_item_perf_lookup, journald_gperf_lookup,
+                                 false, s);
 }
 
 static int server_dispatch_sync(sd_event_source *es, usec_t t, void *userdata) {
@@ -1551,8 +1552,16 @@ int server_init(Server *s) {
 
                         s->audit_fd = fd;
 
-                } else
-                        log_error("Unknown socket passed as file descriptor %d, ignoring.", fd);
+                } else {
+                        log_warning("Unknown socket passed as file descriptor %d, ignoring.", fd);
+
+                        /* Let's close the fd, better be safe than
+                           sorry. The fd might reference some resource
+                           that we really want to release if we don't
+                           make use of it. */
+
+                        safe_close(fd);
+                }
         }
 
         r = server_open_syslog_socket(s);