Verified Commit 564c4673 authored by Tomas Krizek's avatar Tomas Krizek Committed by Vladimír Čunát

use common convention for configuration path and user name

parent 55f3749f
......@@ -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
......
......@@ -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);
}
}
......
......@@ -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
......
......@@ -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})
......
......@@ -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
......
......@@ -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
~~~~~~~~~~~~~~~~~~~~~~
......
......@@ -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 = {
......
......@@ -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 = {
......
......@@ -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'
......
......@@ -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')}))
......@@ -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'
}
}
......
......@@ -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()
......
......@@ -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,
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment