aboutsummaryrefslogtreecommitdiffstats
path: root/lib/kernel
diff options
context:
space:
mode:
authorLukas Larsson <[email protected]>2019-05-06 11:05:21 +0200
committerLukas Larsson <[email protected]>2019-05-06 11:50:57 +0200
commitf92fc026fe6f34bc869a5166a2726f890986929a (patch)
tree77c052b081bd32bd6fde6bb6d7fd18456ceacb5f /lib/kernel
parent29e64fd9d4eb8ab736936682dca5ed27f4e11a24 (diff)
downloadotp-f92fc026fe6f34bc869a5166a2726f890986929a.tar.gz
otp-f92fc026fe6f34bc869a5166a2726f890986929a.tar.bz2
otp-f92fc026fe6f34bc869a5166a2726f890986929a.zip
kernel: Fix setting of non-existing file as inet_db resolv_conf
This was broken in 7c63a98c28d477.
Diffstat (limited to 'lib/kernel')
-rw-r--r--lib/kernel/src/inet_db.erl3
-rw-r--r--lib/kernel/test/inet_res_SUITE.erl7
2 files changed, 6 insertions, 4 deletions
diff --git a/lib/kernel/src/inet_db.erl b/lib/kernel/src/inet_db.erl
index 3f5a2ea5ee..630ef5d2f7 100644
--- a/lib/kernel/src/inet_db.erl
+++ b/lib/kernel/src/inet_db.erl
@@ -1226,7 +1226,8 @@ handle_set_file(Option, Fname, TagTm, TagInfo, ParseFun, From,
_ ->
ets:insert(Db, {TagInfo, undefined}),
TimeZero = - (?RES_FILE_UPDATE_TM + 1), % Early enough
- ets:insert(Db, {TagTm, TimeZero})
+ ets:insert(Db, {TagTm, TimeZero}),
+ <<>>
end,
handle_set_file(ParseFun, Bin, From, State);
false -> {reply,error,State}
diff --git a/lib/kernel/test/inet_res_SUITE.erl b/lib/kernel/test/inet_res_SUITE.erl
index cbec8d430c..6b545fa414 100644
--- a/lib/kernel/test/inet_res_SUITE.erl
+++ b/lib/kernel/test/inet_res_SUITE.erl
@@ -46,15 +46,16 @@
%% a temporary local nameserver BIND 8 or 9 that must be installed
%% on your machine.
%%
-%% For example, on Ubuntu 14.04, as root:
+%% For example, on Ubuntu 16.04 / 18.04, as root:
%% apt-get install bind9
%% Now, that is not enough since Apparmor will not allow
%% the nameserver daemon /usr/sbin/named to read from the test directory.
%% Assuming that you run tests in /ldisk/daily_build, and still on
-%% Ubuntu 14.04, make /usr/apparmor.d/local/usr.sbin.named contain:
+%% Ubuntu 14.04, make /etc/apparmor.d/local/usr.sbin.named contain:
%% /ldisk/daily_build/** r,
%% And yes; the trailing comma must be there...
-
+%% And yes; create the file if it does not exist.
+%% And yes; restart the apparmor daemon using "service apparmor restart"
suite() ->