Date: Fri, 26 Nov 2004 20:38:00 +0100 From: Koen Martens <fbsd@metro.cx> To: freebsd-hackers@freebsd.org Subject: Jail + sysv shmem Message-ID: <20041126193800.GB11747@metro.cx>
next in thread | raw e-mail | index | archive | help
[-- Attachment #1 --]
Hello Hackers,
For a while i've been wanting shared memory to be usable withing jails,
but with cross-jail protection. Ie. shared memory is restricted to a
jail.
Recently I've been digging a bit in the freebsd kernel source code
(which is new to me, been doing quite some linux kernel hacking though).
It looks like this is actually not _that_ difficult to implement.
So, did anyone try this yet? Any pointers?
I think it can be done by putting the jail id in struct ipc_perm (in
sys/ipc.h), and then basically editing sysv_{msg,sem,shm}.c to extend
these checks that are all over there:
if (!jail_sysvipc_allowed && jailed(td->td_ucred))
return (ENOSYS);
Does that sound ok?
Kind regards,
Koen
--
K.F.J. Martens, Sonologic, http://www.sonologic.nl/
Networking, embedded systems, unix expertise, artificial intelligence.
Public PGP key: http://www.metro.cx/pubkey-gmc.asc
Wondering about the funny attachment your mail program
can't read? Visit http://www.openpgp.org/
[-- Attachment #2 --]
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.4 (GNU/Linux)
iD8DBQFBp4YXktDgRrkFPpYRAqb6AJ9J3Kak1sSOrgOM3TmKOE/fQ3AOUACguWGr
qSJnuFD2ViN7nhgrSMAfbdQ=
=j4mc
-----END PGP SIGNATURE-----
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20041126193800.GB11747>
