[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: bind() broken for AF_UNIX in chroots
From: |
Michael Banck |
Subject: |
Re: bind() broken for AF_UNIX in chroots |
Date: |
Fri, 29 Jun 2007 13:40:55 +0200 |
User-agent: |
Mutt/1.5.13 (2006-08-11) |
Hi,
On Fri, Jun 29, 2007 at 01:30:37PM +0200, olafBuddenhagen@gmx.net wrote:
> On Fri, Jun 29, 2007 at 03:00:54AM +0200, Michael Banck wrote:
>
> > The following program works fine in a real installation, but fails with
> > EADDRNOTAVAIL if run in a chroot:
>
> I think I get the same effect: Running it the first time (non-chrooted
> Linux or Hurd) works; second run always gets "address already in use".
> Same for "chroot /". chroot to another partition gives "address not
> available" on first run, and again "address already in use" on later
> runs.
That is EADDRINUSE and is expected if the socket already exists (so
you'd need to rm /tmp/foo in my example, or modify it to unlink the file
first).
The human readable error you get when running in a chroot is 'Cannot
assign requested address' when /tmp/foo does not exists (otherwise
you'll get EADDRINUSE as well), having /tmp/foo in the main root or not
does not matter in this case.
Sorry for being unclear,
Michael