From owner-freebsd-current@FreeBSD.ORG Sun Feb 15 12:09:51 2004 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 7D7A516A4CE for ; Sun, 15 Feb 2004 12:09:51 -0800 (PST) Received: from sarevok.webteckies.org (node123e0.a2000.nl [24.132.35.224]) by mx1.FreeBSD.org (Postfix) with ESMTP id 432A343D1D for ; Sun, 15 Feb 2004 12:09:51 -0800 (PST) (envelope-from mdev@sarevok.webteckies.org) Received: by sarevok.webteckies.org (Postfix, from userid 100) id 3F8BBB83A; Sun, 15 Feb 2004 21:09:48 +0100 (CET) From: Melvyn Sopacua Organization: WebTeckies.org To: current@FreeBSD.org Date: Sun, 15 Feb 2004 21:09:47 +0100 User-Agent: KMail/1.5.94 References: <200402152049.07516.freebsd-current@webteckies.org> <20040215225542.L40303@news1.macomnet.ru> In-Reply-To: <20040215225542.L40303@news1.macomnet.ru> MIME-Version: 1.0 Content-Type: multipart/signed; protocol="application/pgp-signature"; micalg=pgp-sha1; boundary="Boundary-02=_MI9LA22YOfRith7"; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Message-Id: <200402152109.48098.freebsd-current@webteckies.org> Subject: Re: Jails that keep hanging around X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 15 Feb 2004 20:09:51 -0000 --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--