/etc/nsswitch.conf is needed to resolve usernames and groups from
/etc/passwd and /etc/groups, name resoultion and a bunch of other
things when using glibc.
Mount /etc/nsswitch.conf in jail when building against glibc.
Reported-by: Tobias Waldvogel <tobias.waldvogel@gmail.com>
Signed-off-by: Daniel Golle <daniel@makrotopia.org>
add_mount("/etc/group", 0, -1);
}
+#if defined(__GLIBC__)
+ if (!opts.extroot)
+ add_mount("/etc/nsswitch.conf", 0, -1);
+#endif
+
if (!(opts.namespace & CLONE_NEWNET)) {
add_mount("/etc/resolv.conf", 0, -1);
}