Georg Brandl <ge...@python.org> added the comment: This is not a bug in Python: name resolution may not work in the chroot unless you add the libraries that are loaded on the fly by the libc.
It *may* also work if you make one name resolution (using socket.getaddressinfo for example) *before* chrooting. To demonstrate that Python is not involved, you can reproduce the failure with the C program below. #include <sys/types.h> #include <sys/socket.h> #include <netdb.h> #include <stdio.h> #include <unistd.h> int main() { int res; struct addrinfo *ai; if ((res = chroot("/tmp")) < 0) { printf("chroot failed with errno %d\n", -res); } else if ((res = getaddrinfo("google.de", "80", NULL, &ai)) < 0) { printf("getaddrinfo failed with errno %d: %s\n", -res, gai_strerror(res)); } return 0; } ---------- nosy: +georg.brandl resolution: -> invalid status: open -> closed _______________________________________ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue10865> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com