Page MenuHomeFreeBSD

jail(3lua): add jail.attach()/jail.remove() methods
ClosedPublic

Authored by kevans on Oct 24 2020, 3:55 PM.
Tags
None
Referenced Files
Unknown Object (File)
Sat, Nov 29, 8:52 AM
Unknown Object (File)
Sat, Nov 29, 3:23 AM
Unknown Object (File)
Fri, Nov 28, 9:40 PM
Unknown Object (File)
Fri, Nov 28, 12:20 AM
Unknown Object (File)
Thu, Nov 27, 11:52 PM
Unknown Object (File)
Wed, Nov 26, 4:47 AM
Unknown Object (File)
Tue, Nov 25, 4:07 AM
Unknown Object (File)
Mon, Nov 24, 3:29 PM

Details

Summary

These aren't a part of or use libjail(3), but rather are direct syscalls. Still, they seem like good additions, allowing us to attach to already-running jails.

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

Rebase... I reparented it to the jail.list() review because that's, unfortunately, how I've worked on it locally... if it's easier to work with a git branch, I've got it published here: https://github.com/kevans91/freebsd/tree/kbsd/lua-libs

lib/flua/libjail/lua_jail.c
682

It could also be the name as a string. Likewise below for remove.

Apart from the comment nit this looks good. Tested it a bit with io.popen("ps ax") to verify we do get jailed.

This revision is now accepted and ready to land.Mar 5 2021, 1:13 AM