Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 16 Aug 2018 14:39:03 -0600
From:      James Gritton <jamie@freebsd.org>
To:        python@FreeBSD.org
Subject:   devel/py-freebsd and deprecation of jail(2)
Message-ID:  <40cbb5b104f2c563f92a5ff158ed920c@freebsd.org>

next in thread | raw e-mail | index | archive | help
--=_86ad2306758396fa4d87703cbb45da68
Content-Transfer-Encoding: 7bit
Content-Type: text/plain; charset=US-ASCII;
 format=flowed

Hello,

I'd like to have jsil(2) moved to COMPAT_FREEBSD11 for the release of 
12.0, which means that userspace utilities will need to be moved off of 
jail(2) and onto jail_set(2).

In the case of py-freebsd, the PyFB_jail function uses the old jail(2) 
interface.  It's simple enough to change that to use jail_setv(3) 
instead, and add libjail.  Perhaps it would be better to add a new 
function for a more complete interface to jail_set(2), but that's beyond 
the scope of just making sure the program doesn't stop working.  
Considering it uses Python 2.7, I don't know if there's much interest in 
updating its functionality.

I'm including an updated version of patch-src-jail.c, as well as a new 
patch-src-.libraries.def - but I don't know how to make the later patch 
actually get used; so all I can say right now is this ought to work if I 
knew how to get the patches right.

Thanks,
  Jamie
--=_86ad2306758396fa4d87703cbb45da68
Content-Transfer-Encoding: base64
Content-Type: text/x-diff;
 name=patch-src-.libraries.def
Content-Disposition: attachment;
 filename=patch-src-.libraries.def;
 size=197

LS0tIHNyYy8ubGlicmFyaWVzLmRlZi5vcmlnCTIwMTgtMDgtMTYgMTQ6MTc6MjkuMzUxNTE3MDAw
IC0wNjAwCisrKyBzcmMvLmxpYnJhcmllcy5kZWYKQEAgLTEsMyArMSw2IEBACiAjaWYgX19GcmVl
QlNEX3ZlcnNpb24gPj0gNTAwMTAxCiBnZW9tCiAjZW5kaWYKKyNpZiBfX0ZyZWVCU0RfdmVyc2lv
biA+PSA4MDAxMDEKK2phaWwKKyNlbmRpZgo=
--=_86ad2306758396fa4d87703cbb45da68
Content-Transfer-Encoding: base64
Content-Type: text/x-diff;
 name=patch-src-jail.c
Content-Disposition: attachment;
 filename=patch-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T05FKSB7Ci0JCVB5RXJyX1NldFN0cmluZyhQeUV4Y19WYWx1ZUVycm9yLCAibWFsZm9y
bWVkIGludGVybmV0IGFkZHJlc3MiKTsKLQkJcmV0dXJuIE5VTEw7Ci0JfQotCi0JaWYgKGphaWwo
JmpwKSA9PSAtMSkKKwlpZiAoZXJyb3IgPT0gLTEpIHsKKwkJUHlFcnJfU2V0U3RyaW5nKFB5RXhj
X1ZhbHVlRXJyb3IsIGphaWxfZXJybXNnKTsKIAkJcmV0dXJuIE9TRVJST1IoKTsKKwl9CiAKIAlQ
eV9SRVRVUk5fTk9ORTsKIH0K
--=_86ad2306758396fa4d87703cbb45da68--



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