diff --git a/man/systemd.dnssd.xml b/man/systemd.dnssd.xml
index 7538a463f9..1c05cffba6 100644
--- a/man/systemd.dnssd.xml
+++ b/man/systemd.dnssd.xml
@@ -34,15 +34,16 @@
The main network service file must have the extension .dnssd; other
extensions are ignored.
- The .dnssd files are read from the files located in the system
- network directory /usr/lib/systemd/dnssd, the volatile runtime network
- directory /run/systemd/dnssd and the local administration network
- directory /etc/systemd/dnssd. All configuration files are collectively
- sorted and processed in lexical order, regardless of the directories in which they live.
- However, files with identical filenames replace each other. Files in /etc
- have the highest priority, files in /run take precedence over files with
- the same name in /usr/lib. This can be used to override a system-supplied
- configuration file with a local file if needed.
+ The .dnssd files are read from the files located in the system network
+ directories /usr/lib/systemd/dnssd and
+ /usr/local/lib/systemd/dnssd, the volatile runtime network directory
+ /run/systemd/dnssd and the local administration network directory
+ /etc/systemd/dnssd. All configuration files are collectively sorted and processed in
+ lexical order, regardless of the directories in which they live. However, files with identical filenames
+ replace each other. Files in /etc have the highest priority, files in
+ /run take precedence over files with the same name in
+ /usr/lib. This can be used to override a system-supplied configuration file with a
+ local file if needed.
Along with the network service file foo.dnssd, a "drop-in" directory
foo.dnssd.d/ may exist. All files with the suffix
@@ -50,14 +51,12 @@
parsed. This is useful to alter or add configuration settings, without having to modify the main
configuration file. Each drop-in file must have appropriate section headers.
- In addition to /etc/systemd/dnssd, drop-in .d
- directories can be placed in /usr/lib/systemd/dnssd or
- /run/systemd/dnssd directories. Drop-in files in
- /etc take precedence over those in /run which in turn
- take precedence over those in /usr/lib. Drop-in files under any of these
- directories take precedence over the main network service file wherever located. (Of course, since
- /run is temporary and /usr/lib is for vendors, it is
- unlikely drop-ins should be used in either of those places.)
+ In addition to /etc/systemd/dnssd, drop-in .d directories
+ can be placed in /usr/lib/systemd/dnssd or /run/systemd/dnssd
+ directories. Drop-in files in /etc take precedence over those in
+ /run which in turn take precedence over those in /usr/lib or
+ /usr/local/lib. Drop-in files under any of these directories take precedence over
+ the main network service file wherever located.
diff --git a/src/resolve/resolved-dnssd.c b/src/resolve/resolved-dnssd.c
index b5346a97b1..0e6fa1d0c9 100644
--- a/src/resolve/resolved-dnssd.c
+++ b/src/resolve/resolved-dnssd.c
@@ -2,21 +2,14 @@
#include "conf-files.h"
#include "conf-parser.h"
+#include "def.h"
#include "resolved-dnssd.h"
#include "resolved-dns-rr.h"
#include "resolved-manager.h"
#include "specifier.h"
#include "strv.h"
-const char* const dnssd_service_dirs[] = {
- "/etc/systemd/dnssd",
- "/run/systemd/dnssd",
- "/usr/lib/systemd/dnssd",
-#if HAVE_SPLIT_USR
- "/lib/systemd/dnssd",
-#endif
- NULL
-};
+#define DNSSD_SERVICE_DIRS ((const char* const*) CONF_PATHS_STRV("systemd/dnssd"))
DnssdTxtData *dnssd_txtdata_free(DnssdTxtData *txt_data) {
if (!txt_data)
@@ -93,7 +86,7 @@ static int dnssd_service_load(Manager *manager, const char *filename) {
dropin_dirname = strjoina(service->name, ".dnssd.d");
- r = config_parse_many(filename, dnssd_service_dirs, dropin_dirname,
+ r = config_parse_many(filename, DNSSD_SERVICE_DIRS, dropin_dirname,
"Service\0",
config_item_perf_lookup, resolved_dnssd_gperf_lookup,
false, service);
@@ -196,7 +189,7 @@ int dnssd_load(Manager *manager) {
if (manager->mdns_support != RESOLVE_SUPPORT_YES)
return 0;
- r = conf_files_list_strv(&files, ".dnssd", NULL, 0, dnssd_service_dirs);
+ r = conf_files_list_strv(&files, ".dnssd", NULL, 0, DNSSD_SERVICE_DIRS);
if (r < 0)
return log_error_errno(r, "Failed to enumerate .dnssd files: %m");