Commit graph

5 commits

Author SHA1 Message Date
Gordon Bergling
a89444e7b5 flua: Fix a typo in a source code comment
- s/paramter/parameter/

(cherry picked from commit f2411b9257)
2022-09-18 08:05:32 +02:00
Kyle Evans
188c088fe3 jail(3lua): add jail.attach()/jail.remove() methods
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.

(cherry picked from commit a6499c56ab)
2021-10-06 02:13:27 -05:00
Kyle Evans
44175ec8ce jail(3lua): add a jail.list() method
This is implemented as an iterator, reusing parts of the earlier logic
to populate jailparams from a passed in table.

The user may request any number of parameters to pull in while we're
searching, but we'll force jid and name to appear at a minimum.

(cherry picked from commit 6a7647eccd)
2021-10-06 02:13:23 -05:00
Ryan Moeller
4e535a1ba7 lib/flua/libjail: Allow empty params table
The name or jid always gets added to the params, and that's enough to
avoid allocating a 0 length params array.

Reported by:	kevans
Reviewed by:	kevans
Differential Revision:	https://reviews.freebsd.org/D28778

(cherry picked from commit e175b519a6)
2021-03-14 04:09:20 -04:00
Ryan Moeller
73577bf01d flua: Add a libjail module
libjail is pretty small, so it makes for a good proof of concept demonstrating
how a system library can be wrapped to create a loadable Lua module for flua.

* Introduce 3lua section for man pages
* Add libjail module

Reviewed by:	kevans, manpages
Relnotes:	yes
Differential Revision:	https://reviews.freebsd.org/D26080
2020-10-24 17:08:59 +00:00