]> git.ipfire.org Git - thirdparty/knot-resolver.git/commitdiff
use common convention for configuration path and user name
authorTomas Krizek <tomas.krizek@nic.cz>
Fri, 12 Jan 2018 09:29:53 +0000 (10:29 +0100)
committerVladimír Čunát <vladimir.cunat@nic.cz>
Wed, 24 Jan 2018 10:52:47 +0000 (11:52 +0100)
13 files changed:
ci/respdiff/kresd.config
client/kresc.c
config.mk
daemon/README.rst
daemon/lua/kres-gen.sh
doc/build.rst
etc/config.cluster
etc/config.isp
etc/config.personal
etc/config.splitview
modules/etcd/README.rst
modules/etcd/etcd.lua
scripts/kresd.apparmor

index e7827b00c240ffe93ceeebb7acd2d8793ddc3e3a..98d62f17f29f7a65a7688a719899e83b48f644bd 100644 (file)
@@ -6,7 +6,7 @@ net.listen('127.0.0.1', 8853, { tls = true })
 net.listen('::1', 8853, { tls = true })
 
 -- Auto-maintain root TA
-trust_anchors.file = '.local/etc/kresd/root.keys'
+trust_anchors.file = '.local/etc/knot-resolver/root.keys'
 
 -- Large cache size, so we don't need to flush often
 -- This can be larger than available RAM, least frequently accessed
index 5f38d4f83ac9b588e7c096bc4e2b2f8ba106123f..42dba3454aa8c031de9efa1b461d894860a998f8 100644 (file)
@@ -90,7 +90,7 @@ const char *get_type_name(const char *value)
 
 static void complete_function(EditLine * el)
 {
-       //Add left parenthesis to function name. 
+       //Add left parenthesis to function name.
        el_insertstr(el, "(");
 }
 
@@ -392,7 +392,7 @@ static int interact()
                //Create necessary folders.
                char *dirs[3] =
                    { afmt("%s/.local", home), afmt("%s/.local/share", home),
-                       afmt("%s/.local/share/kresd/", home)
+                       afmt("%s/.local/share/knot-resolver/", home)
                };
                bool ok = true;
                for (int i = 0; i < 3; i++) {
@@ -403,12 +403,12 @@ static int interact()
                }
                if (ok) {
                        hist_file =
-                           afmt("%s/.local/share/kresd/" HISTORY_FILE, home);
+                           afmt("%s/.local/share/knot-resolver/" HISTORY_FILE, home);
                }
        } else {
-               if (!mkdir(afmt("%s/kresd/", data_home), 0755)
+               if (!mkdir(afmt("%s/knot-resolver/", data_home), 0755)
                    || errno == EEXIST) {
-                       hist_file = afmt("%s/kresd/" HISTORY_FILE, data_home);
+                       hist_file = afmt("%s/knot-resolver/" HISTORY_FILE, data_home);
                }
        }
 
index f45db58efc74771d197b83422bd2de04627cc3e3..8cb4b3ad4d474ff2c810bae55081e0bb6b553b10 100644 (file)
--- a/config.mk
+++ b/config.mk
@@ -18,7 +18,7 @@ PKGCONFIGDIR ?= $(LIBDIR)/pkgconfig
 MANDIR ?= $(PREFIX)/share/man
 INCLUDEDIR ?= $(PREFIX)/include
 MODULEDIR ?= $(LIBDIR)/kdns_modules
-ETCDIR ?= $(PREFIX)/etc/kresd
+ETCDIR ?= $(PREFIX)/etc/knot-resolver
 ROOTHINTS ?= $(ETCDIR)/root.hints
 COVERAGE_STAGE ?= gcov
 COVERAGE_STATSDIR ?= $(CURDIR)/coverage.stats
index 1b6108f89ed8207652f28ef74aae3ad6303f774a..5a7aa75f40cf4d8a89a5a07681ca44e7e55e63a0 100644 (file)
@@ -434,7 +434,7 @@ Environment
 
       > user('baduser')
       invalid user name
-      > user('kresd', 'netgrp')
+      > user('knot-resolver', 'netgrp')
       true
       > user('root')
       Operation not permitted
@@ -605,9 +605,9 @@ For when listening on ``localhost`` just doesn't cut it.
 
    .. code-block:: lua
 
-      > net.tls("/etc/kresd/server-cert.pem", "/etc/kresd/server-key.pem")
+      > net.tls("/etc/knot-resolver/server-cert.pem", "/etc/knot-resolver/server-key.pem")
       > net.tls()
-      ("/etc/kresd/server-cert.pem", "/etc/kresd/server-key.pem")
+      ("/etc/knot-resolver/server-cert.pem", "/etc/knot-resolver/server-key.pem")
       > net.listen("::", 853)
       > net.listen("::", 443, {tls = true})
 
index 3599e9b3aa4f3f7ff52d626fb2f8c4ed60b1fc56..ff673a517cf3b7b9590ab8f22e7f5b6bbc8e5b70 100755 (executable)
@@ -6,7 +6,7 @@
 # (Avoid typos, accidental mismatches, etc.)
 #
 # To regenerate the C definitions for lua:
-# - you need to have debugging symbols for knot-dns and kresd;
+# - you need to have debugging symbols for knot-dns and knot-resolver;
 #   you get those by compiling with -g; for knot-dns it might be enough
 #   to just install it with debugging symbols included (in your distro way)
 # - remove file ./kres-gen.lua and run make as usual
index 6ac99ba759adbf279b0370ac692c000012c117d4..6da43b3a3c290bd645efda26b1b9a95782cd3140 100644 (file)
@@ -108,7 +108,7 @@ Most of the dependencies can be resolved from packages, here's an overview for s
 
    brew install pkg-config libuv luajit cmocka
 
-Building from sources 
+Building from sources
 ---------------------
 
 Initialize git submodules first.
@@ -195,7 +195,7 @@ All paths are prefixed with ``PREFIX`` variable by default if not specified othe
 
    "library", "``LIBDIR``", "``$(PREFIX)/lib``", "pkg-config is auto-generated [#]_"
    "daemon",  "``SBINDIR``", "``$(PREFIX)/sbin``", ""
-   "configuration", "``ETCDIR``", "``$(PREFIX)/etc/kresd``", "Configuration file, templates."
+   "configuration", "``ETCDIR``", "``$(PREFIX)/etc/knot-resolver``", "Configuration file, templates."
    "modules", "``MODULEDIR``", "``$(LIBDIR)/kdns_modules``", "Runtime directory for loading dynamic modules [#]_."
    "trust anchor file", "``KEYFILE_DEFAULT``", "*(none)*", "Path to read-only trust anchor file, which is used as fallback when no other file is specified. [#]_"
    "work directory", "", "the current directory", "Run directory for daemon. (Only relevant during run time, not e.g. during installation.)"
@@ -216,7 +216,7 @@ By default the resolver library is built as a dynamic library with versioned ABI
    $ make BUILDMODE=dynamic # Default, create dynamic library
    $ make BUILDMODE=static  # Create static library
 
-When the library is linked statically, it usually produces a smaller binary. However linking it to various C modules might violate ODR and increase the size. 
+When the library is linked statically, it usually produces a smaller binary. However linking it to various C modules might violate ODR and increase the size.
 
 Resolving dependencies
 ~~~~~~~~~~~~~~~~~~~~~~
index f434be8f5446db5ee12af55c689efd8eb194b88b..bc1cf60a5bb64258f398bf2fb281ac7f46c3eacc 100644 (file)
@@ -8,7 +8,7 @@
 net = { '127.0.0.1', '::1', '192.168.1.1' }
 
 -- Drop root privileges
-user('kresd', 'kresd')
+user('knot-resolver', 'knot-resolver')
 
 -- Auto-maintain root TA
 trust_anchors.file = 'root.keys'
@@ -16,7 +16,7 @@ trust_anchors.file = 'root.keys'
 -- Large cache size, so we don't need to flush ever
 -- This can be larger than available RAM, least frequently accessed
 -- records will be paged out as long as there's enough disk space to back it
-cache.size = 100 * GB 
+cache.size = 100 * GB
 
 -- Load Useful modules
 modules = {
index 344de7e15ecdfc52fbf53821dc815b88be86bd07..f050bd883f0f410c55135092d6ccf632e4a8eac7 100644 (file)
@@ -5,7 +5,7 @@
 net = { '127.0.0.1', '::1', '192.168.1.1' }
 
 -- Drop root privileges
-user('kresd', 'kresd')
+user('knot-resolver', 'knot-resolver')
 
 -- Auto-maintain root TA
 trust_anchors.file = 'root.keys'
@@ -13,7 +13,7 @@ trust_anchors.file = 'root.keys'
 -- Large cache size, so we don't need to flush often
 -- This can be larger than available RAM, least frequently accessed
 -- records will be paged out
-cache.size = 4 * GB 
+cache.size = 4 * GB
 
 -- Load Useful modules
 modules = {
index a46af4d847f83d21b2bacf34f89ae98f4001ad37..490798e22120da32742379923bc21317893a63fc 100644 (file)
@@ -7,7 +7,7 @@
 -- net = { '127.0.0.1', '::1' }
 
 -- Drop root privileges
-user('kresd', 'kresd')
+user('knot-resolver', 'knot-resolver')
 
 -- Auto-maintain root TA
 trust_anchors.file = 'root.keys'
index 2d5f66d6ec5f2f5fc52c11db74b03057d4b2b31e..1706a498a61a1d9841917b0af6051029f2b15ae4 100644 (file)
@@ -5,7 +5,7 @@
 net = { '127.0.0.1', '::1', '192.168.1.1' }
 
 -- Drop root privileges
-user('kresd', 'kresd')
+user('knot-resolver', 'knot-resolver')
 
 -- Auto-maintain root TA
 trust_anchors.file = 'root.keys'
@@ -28,7 +28,7 @@ modules = {
 -- Large cache size, so we don't need to flush often
 -- This can be larger than available RAM, least frequently accessed
 -- records will be paged out
-cache.size = 4 * GB 
+cache.size = 4 * GB
 
 -- Forward everything below `company.cz` to `192.168.1.3`
 policy.add(policy.suffix(policy.FORWARD('192.168.1.3'), {todname('company.cz')}))
index d25b369a4c3bceddd78cd211715ebb82efdd3cf0..5de55c216a13ca9895a00b93dfeead1e786f62e6 100644 (file)
@@ -4,15 +4,15 @@ Etcd module
 -----------
 
 The module connects to Etcd peers and watches for configuration change.
-By default, the module looks for the subtree under ``/kresd`` directory,
+By default, the module looks for the subtree under ``/knot-resolver`` directory,
 but you can change this `in the configuration <https://github.com/mah0x211/lua-etcd#cli-err--etcdnew-optiontable->`_.
 
 The subtree structure corresponds to the configuration variables in the declarative style.
 
 .. code-block:: bash
 
-       $ etcdctl set /kresd/net/127.0.0.1 53
-       $ etcdctl set /kresd/cache/size 10000000
+       $ etcdctl set /knot-resolvevr/net/127.0.0.1 53
+       $ etcdctl set /knot-resolver/cache/size 10000000
 
 Configures all listening nodes to following configuration:
 
@@ -28,7 +28,7 @@ Example configuration
 
        modules = {
                etcd = {
-                       prefix = '/kresd',
+                       prefix = '/knot-resolver',
                        peer = 'http://127.0.0.1:7001'
                }
        }
index 08348529dac9e394d4badff2936a9dda418063c0..4d4bbfba0788f9ace0a90da1c56fe90cbd016129 100644 (file)
@@ -27,7 +27,7 @@ end
 
 function etcd.init()
        etcd.Etcd = require('etcd.luasocket')
-       etcd.defaults = { prefix = '/kresd' }
+       etcd.defaults = { prefix = '/knot-resolver' }
 end
 
 function etcd.deinit()
index 2b5b5f7ff86829531fbc89d88c4f41016e96948f..ad6f911a06202c72ddd7e31f2fd684cc110faff3 100644 (file)
@@ -7,7 +7,7 @@
   capability net_bind_service,
   capability setgid,
   capability setuid,
-  # seems to be needed during start to read /var/lib/kresd
+  # seems to be needed during start to read /var/lib/knot-resolver
   # while we still run as root.
   capability dac_override,
 
@@ -15,9 +15,9 @@
   network udp,
 
   /proc/sys/net/core/somaxconn r,
-  /etc/kresd/* r, 
-  /var/lib/kresd/ r,
-  /var/lib/kresd/** rwlk,
+  /etc/knot-resolver/* r,
+  /var/lib/knot-resolver/ r,
+  /var/lib/knot-resolver/** rwlk,
 
   # modules
   /usr/lib{,64}/kdns_modules/*.lua r,