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)
Tue, Oct 14, 6:34 AM
Unknown Object (File)
Tue, Oct 14, 5:06 AM
Unknown Object (File)
Sun, Oct 12, 7:00 AM
Unknown Object (File)
Sun, Oct 12, 7:00 AM
Unknown Object (File)
Sun, Oct 12, 7:00 AM
Unknown Object (File)
Sun, Oct 12, 7:00 AM
Unknown Object (File)
Sat, Oct 11, 8:42 PM
Unknown Object (File)
Sat, Sep 27, 4:12 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