diff options
author | Lukas Larsson <[email protected]> | 2019-05-07 11:02:05 +0200 |
---|---|---|
committer | Lukas Larsson <[email protected]> | 2019-05-07 11:02:05 +0200 |
commit | bde9e42ec8c5dee5ba1333d70f87515d8f38e798 (patch) | |
tree | c338d66835d49b53af6aee22cf2fa0d8a0cd5278 | |
parent | e90dfd8814cc086349863d66a35e7cdefc69947a (diff) | |
parent | f92fc026fe6f34bc869a5166a2726f890986929a (diff) | |
download | otp-bde9e42ec8c5dee5ba1333d70f87515d8f38e798.tar.gz otp-bde9e42ec8c5dee5ba1333d70f87515d8f38e798.tar.bz2 otp-bde9e42ec8c5dee5ba1333d70f87515d8f38e798.zip |
Merge branch 'lukas/kernel/inet_db_fix_set_of_non-existing_file/OTP-15806'
* lukas/kernel/inet_db_fix_set_of_non-existing_file/OTP-15806:
kernel: Fix setting of non-existing file as inet_db resolv_conf
-rw-r--r-- | lib/kernel/src/inet_db.erl | 3 | ||||
-rw-r--r-- | lib/kernel/test/inet_res_SUITE.erl | 7 |
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() -> |