Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
Daniel Kahn Gillmor
Knot DNS Resolver
Commits
05331a56
Commit
05331a56
authored
Jan 21, 2016
by
Marek Vavrusa
Browse files
daemon: "-c -" doesn't ready any configuration
this includes default configuration, resolver starts completely blank
parent
7f282a1d
Changes
2
Hide whitespace changes
Inline
Side-by-side
daemon/engine.c
View file @
05331a56
...
...
@@ -69,6 +69,7 @@ static int l_help(lua_State *L)
"cache
\n
network configuration
\n
"
"modules
\n
modules configuration
\n
"
"kres
\n
resolver services
\n
"
"trust_anchors
\n
configure trust anchors
\n
"
;
lua_pushstring
(
L
,
help_str
);
return
1
;
...
...
@@ -570,6 +571,9 @@ static int engine_loadconf(struct engine *engine, const char *config_path)
return
kr_error
(
ENOEXEC
);
}
/* Load config file */
if
(
strcmp
(
config_path
,
"-"
)
==
0
)
{
return
ret
;
/* No config, no defaults. */
}
if
(
access
(
config_path
,
F_OK
)
!=
-
1
)
{
ret
=
l_dosandboxfile
(
engine
->
L
,
config_path
);
}
...
...
daemon/main.c
View file @
05331a56
...
...
@@ -324,7 +324,7 @@ int main(int argc, char **argv)
kr_log_error
(
"[system] rundir '%s': %s
\n
"
,
rundir
,
strerror
(
errno
));
return
EXIT_FAILURE
;
}
if
(
config
&&
access
(
config
,
R_OK
)
!=
0
)
{
if
(
config
&&
strcmp
(
config
,
"-"
)
!=
0
&&
access
(
config
,
R_OK
)
!=
0
)
{
kr_log_error
(
"[system] rundir '%s'
\n
"
,
rundir
);
kr_log_error
(
"[system] config '%s': %s
\n
"
,
config
,
strerror
(
errno
));
return
EXIT_FAILURE
;
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment