[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bugfix of Re: [Mldonkey-users] Problem in Bittorrent
From: |
Thoran |
Subject: |
bugfix of Re: [Mldonkey-users] Problem in Bittorrent |
Date: |
09 May 2003 13:46:40 +0200 |
User-agent: |
Gnus/5.09 (Gnus v5.9.0) Emacs/21.2 |
Sven> On Thu, 8 May 2003, Thoran wrote:
>> Error: f.scarywater.net: address not found
>>
>> I am running mlnet chrooted with MLDONKEY_CHROOT. Thus, maybe the libc try
>> to read /etc/resolv.conf (or other resources) *after* mlnet chroots.
>> I will try to copy files like this one in the jail to see if changes
>> things.
Sven> Name-Resolution is not directly contained in glibc.
Sven> It uses /lib/libnss_*, configured by /etc/nsswitch.conf (and all the old
Sven> files like /etc/resolv.conv and more)
That's what I put in "other resources".
Anyway, there is a trivial hack to solve this problem. It's not very
beautiful, but it is certainly the quickest way. We just have to
resolve any name, before entering the jail. It works under the
assumption the libc will cache all its resources related to name
resolution after it has loaded them, and don't try to read them again.
Here is the patch. It seems to work.
I submitted it on savannah
patch id: 1466
It's related to the bug I submitted some weeks ago (bugid 3202)
Index: src/config/unix/mlUnix.ml
===================================================================
RCS file: /cvsroot/mldonkey/mldonkey/src/config/unix/mlUnix.ml,v
retrieving revision 1.1
diff -r1.1 mlUnix.ml
85c85,90
< let chroot = Unix.chroot
---
> let chroot s =
> (try
> let _ = Unix.gethostbyname "www.gnu.org" in ()
> with
> Not_found -> lprintf "www.gnu.org not found ?! don't care");
> Unix.chroot s
- [Mldonkey-users] Problem in Bittorrent, Thoran, 2003/05/08
- Re: [Mldonkey-users] Problem in Bittorrent, Sven Koch, 2003/05/08
- Re: [Mldonkey-users] Problem in Bittorrent, Christian Roerecke, 2003/05/09
- Re: [Mldonkey-users] Problem in Bittorrent, Bernd Kuhls, 2003/05/09
- Re: [Mldonkey-users] Problem in Bittorrent, Pierre Etchemaite, 2003/05/09
- Re: [Mldonkey-users] Problem in Bittorrent, Bernd Kuhls, 2003/05/24
- Re: [Mldonkey-users] Problem in Bittorrent, Christian Roerecke, 2003/05/26
- Re: [Mldonkey-users] Problem in Bittorrent, b8_bavard, 2003/05/27
- Re: [Mldonkey-users] Problem in Bittorrent, Christian Roerecke, 2003/05/27
- Re: [Mldonkey-users] Problem in Bittorrent, Thoran, 2003/05/27
bugfix of Re: [Mldonkey-users] Problem in Bittorrent,
Thoran <=