blob: dc971b8a35bc1c40ce0aac890e77ccda991a2553 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
|
This is an object oriented perl interface to the FreeBSD jail subsystem.
Here's a replica of the 'jls' utility in just a few lines of perl:
use BSD::Jail::Object 'jids';
print " JID IP Address Hostname Path\n";
printf "%6d %-15.15s %-29.29s %.74s\n",
$_->jid, $_->ip, $_->hostname, $_->path foreach jids( instantiate => 1 );
And here's 'jexec':
my $j = BSD::Jail::Object->new( $ARGV[0] ) or die $@;
$j->attach && chdir('/') && exec $ARGV[1] or exit;
For more info please use 'perldoc' on the module.
WWW: https://metacpan.org/release/BSD-Jail-Object
|