Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 16 Nov 2017 16:04:47 +0300
From:      KOT MATPOCKuH <matpockuh@gmail.com>
To:        =?UTF-8?B?R29yYW4gTWVracSH?= <meka@tilda.center>
Cc:        Oleg Ginzburg <olevole@olevole.ru>, Kristof Provost <kristof@sigsegv.be>,  FreeBSD Current <freebsd-current@freebsd.org>, freebsd-jail@freebsd.org
Subject:   Re: VNET jail and dhclient
Message-ID:  <CALmdT0Vpw8X59f63F-hOd2x9mAdRkcEqs=_t5gBgOS7KmMCtuw@mail.gmail.com>
In-Reply-To: <20171011192826.xkscmrovch3g7gni@thinker.meka.no-ip.org>
References:  <20171009072547.jauim6tlfennydf5@hal9000.meka.no-ip.org> <6D37D4AC-9DF4-4D55-8614-43CFC6BDD45E@sigsegv.be> <CAMsb%2BmaactJTDcK=j%2BawqkXB6YitQ_dQTp9vvs=a%2BTFjrQTA7w@mail.gmail.com> <20171011192826.xkscmrovch3g7gni@thinker.meka.no-ip.org>

next in thread | previous in thread | raw e-mail | index | archive | help
Hello, all!

I'm got same problem...
Did someone open an PR for this issue?

2017-10-11 22:48 GMT+03:00 Goran Meki=C4=87 <meka@tilda.center>:

> On Tue, Oct 10, 2017 at 09:10:37PM +0000, Oleg Ginzburg wrote:
> > I think I found something, but I do not understand why this is only
> > observed in jail and with commit change this.
> > The problem about which the Goran wrote can be fixed with:
> >
> > # diff -ruN dhclient.c-orig dhclient.c
> > --- dhclient.c-orig     2017-10-10 23:51:52.451361000 +0000
> > +++ dhclient.c  2017-10-10 23:54:55.803404000 +0000
> > @@ -479,6 +479,7 @@
> >
> >         fork_privchld(pipe_fd[0], pipe_fd[1]);
> >
> > +       pidfile_close(pidfile);
> >         close(ifi->ufdesc);
> >         ifi->ufdesc =3D -1;
> >         close(ifi->wfdesc);
> >
> >
> >
> >
> > From pidfile(3) man page:
> >
> >     The pidfile_close() function closes a pidfile.  It should be used
> after
> >      daemon fork()s to start a child process.
> >
> >
> > chroot(2) in dhclient return NOPERM (via global errno). it seems to be
> > related to open descriptor outside the chroot.
> >
> > I'm not sure if this fd leak (due to pidfile_remove at the end of
> > dhclient),  nevertheless closing pid fd in my jail/FreeBSD12 before
> chroot
> > solve dhclient issue.
>
> I can confirm Oleg's patch works for me. Weird one, for sure!
>



--=20
MATPOCKuH



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CALmdT0Vpw8X59f63F-hOd2x9mAdRkcEqs=_t5gBgOS7KmMCtuw>