projects
/
oweals
/
procd.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
c30b23e
)
jail: mount-bind /etc/resolv.conf for non-netns jails
author
Daniel Golle
<daniel@makrotopia.org>
Thu, 12 Mar 2020 21:54:19 +0000
(22:54 +0100)
committer
Daniel Golle
<daniel@makrotopia.org>
Thu, 12 Mar 2020 21:57:16 +0000
(22:57 +0100)
Many applications won't work without name resolution and expect
/etc/resolv.conf in place. While this is already handled for
netns-jails, simply mount-bind /etc/resolv.conf for non-netns-jails.
Signed-off-by: Daniel Golle <daniel@makrotoia.org>
jail/jail.c
patch
|
blob
|
history
diff --git
a/jail/jail.c
b/jail/jail.c
index eb976cb113b1cc9e5ed8425f66d883893f4df5a9..5414519ce4d397474d293f290fd9aef60e124ad5 100644
(file)
--- a/
jail/jail.c
+++ b/
jail/jail.c
@@
-544,6
+544,10
@@
int main(int argc, char **argv)
add_mount("/etc/passwd", 0, -1);
add_mount("/etc/group", 0, -1);
}
+
+ if (!(opts.namespace & CLONE_NEWNET)) {
+ add_mount("/etc/resolv.conf", 0, -1);
+ }
}
if (opts.hostname)