Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 15 Feb 2004 21:09:47 +0100
From:      Melvyn Sopacua <freebsd-current@webteckies.org>
To:        current@FreeBSD.org
Subject:   Re: Jails that keep hanging around
Message-ID:  <200402152109.48098.freebsd-current@webteckies.org>
In-Reply-To: <20040215225542.L40303@news1.macomnet.ru>
References:  <Pine.NEB.3.96L.1040215130356.56481G-100000@fledge.watson.org> <200402152049.07516.freebsd-current@webteckies.org> <20040215225542.L40303@news1.macomnet.ru>

next in thread | previous in thread | raw e-mail | index | archive | help

--Boundary-02=_MI9LA22YOfRith7
Content-Type: text/plain;
  charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable
Content-Disposition: inline

On Sunday 15 February 2004 20:56, Maxim Konovalov wrote:
> On Sun, 15 Feb 2004, 20:49+0100, Melvyn Sopacua wrote:
> > On Sunday 15 February 2004 19:44, Melvyn Sopacua wrote:
> > > (poking around sys/kern/kern_jail.c to try and get the value
> > > p->pr_ref).
> >
> > Ok, I'm stuck. How does one get a struct prison (read-only for all I
> > care), when only having a jail id, in userland?
>
> As I already wrote sysctl -o security.jail.list.

No, a 'struct prison' in C. All you get with sysctlbyname is xprison, which=
=20
doesn't expose the prison structure (which holds the refcount). Seems I'll=
=20
have to go through kvm_open -> proc -> td_ucred -> cr_prison and some=20
forking.
=2D-=20
Melvyn

=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D
=46reeBSD sarevok.webteckies.org 5.2-CURRENT FreeBSD 5.2-CURRENT #1: Sat Fe=
b 14=20
02:48:30 CET 2004    =20
root@sarevok.webteckies.org:/usr/obj/usr/src/sys/SAREVOK_NOAPM_NODEBUG  i386
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D

--Boundary-02=_MI9LA22YOfRith7
Content-Type: application/pgp-signature
Content-Description: signature

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.4 (FreeBSD)

iD8DBQBAL9IMOv9JNmfFN5URAlr/AKCWxzS41m1JLAhT6nByZMkVCmEZygCcDAhI
6ODB38W1No+DtSuN3j45pi8=
=FGa1
-----END PGP SIGNATURE-----

--Boundary-02=_MI9LA22YOfRith7--



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200402152109.48098.freebsd-current>