Jails that keep hanging around

Melvyn Sopacua freebsd-current at webteckies.org
Sun Feb 15 12:09:51 PST 2004


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 
doesn't expose the prison structure (which holds the refcount). Seems I'll 
have to go through kvm_open -> proc -> td_ucred -> cr_prison and some 
forking.
-- 
Melvyn

=======================================================
FreeBSD sarevok.webteckies.org 5.2-CURRENT FreeBSD 5.2-CURRENT #1: Sat Feb 14 
02:48:30 CET 2004     
root at sarevok.webteckies.org:/usr/obj/usr/src/sys/SAREVOK_NOAPM_NODEBUG  i386
=======================================================
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 187 bytes
Desc: signature
Url : http://lists.freebsd.org/pipermail/freebsd-current/attachments/20040215/83d66f5b/attachment.bin


More information about the freebsd-current mailing list